use of org.apache.cxf.ws.transfer.resourcefactory.ResourceFactoryImpl in project cxf by apache.
the class TestUtils method createResourceFactory.
private static Server createResourceFactory(ResourceManager resourceManager, String port, String port2) {
ResourceFactoryImpl resourceFactory = new ResourceFactoryImpl();
resourceFactory.setResourceResolver(new MyResourceResolver("http://localhost:" + port + "/ResourceStudents", resourceManager, "http://localhost:" + port2 + "/ResourceTeachers"));
resourceFactory.getResourceTypeIdentifiers().add(new XSDResourceTypeIdentifier(new StreamSource(TestUtils.class.getResourceAsStream("/schema/studentCreate.xsd")), new XSLTResourceTransformer(new StreamSource(TestUtils.class.getResourceAsStream("/xslt/studentCreate.xsl")))));
resourceFactory.getResourceTypeIdentifiers().add(new XSDResourceTypeIdentifier(new StreamSource(TestUtils.class.getResourceAsStream("/schema/teacherCreateBasic.xsd")), new XSLTResourceTransformer(new StreamSource(TestUtils.class.getResourceAsStream("/xslt/teacherCreateBasic.xsl")))));
JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
factory.setServiceClass(org.apache.cxf.ws.transfer.resourcefactory.ResourceFactory.class);
factory.setServiceBean(resourceFactory);
factory.setAddress("http://localhost:" + port + "/ResourceFactory");
return factory.create();
}
use of org.apache.cxf.ws.transfer.resourcefactory.ResourceFactoryImpl in project cxf by apache.
the class IntegrationBaseTest method createLocalResourceFactory.
protected Server createLocalResourceFactory(ResourceManager manager) {
ResourceFactoryImpl implementor = new ResourceFactoryImpl();
implementor.setResourceResolver(new SimpleResourceResolver(RESOURCE_ADDRESS, manager));
JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
factory.setBus(bus);
factory.setServiceClass(ResourceFactory.class);
factory.setAddress(RESOURCE_FACTORY_ADDRESS);
factory.setServiceBean(implementor);
return factory.create();
}
use of org.apache.cxf.ws.transfer.resourcefactory.ResourceFactoryImpl in project cxf by apache.
the class IntegrationBaseTest method createRemoteResourceFactory.
protected Server createRemoteResourceFactory() {
ResourceFactoryImpl implementor = new ResourceFactoryImpl();
implementor.setResourceResolver(new SimpleResourceResolver(RESOURCE_REMOTE_ADDRESS, null));
JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
factory.setBus(bus);
factory.setServiceClass(ResourceFactory.class);
factory.setAddress(RESOURCE_FACTORY_ADDRESS);
factory.setServiceBean(implementor);
return factory.create();
}
Aggregations