use of org.apache.cxf.systest.ws.transfer.resolver.MyResourceResolver 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();
}
Aggregations