use of org.apache.cxf.ws.transfer.resource.ResourceLocal in project cxf by apache.
the class TestUtils method createStudentsResource.
private static Server createStudentsResource(ResourceManager resourceManager, String port) {
ResourceLocal resourceLocal = new ResourceLocal();
resourceLocal.setManager(resourceManager);
resourceLocal.getResourceTypeIdentifiers().add(new XSDResourceTypeIdentifier(new StreamSource(TestUtils.class.getResourceAsStream("/schema/studentPut.xsd")), new XSLTResourceTransformer(new StreamSource(TestUtils.class.getResourceAsStream("/xslt/studentPut.xsl")), new StudentPutResourceValidator())));
JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
factory.setServiceClass(Resource.class);
factory.setServiceBean(resourceLocal);
factory.setAddress("http://localhost:" + port + "/ResourceStudents");
return factory.create();
}
use of org.apache.cxf.ws.transfer.resource.ResourceLocal in project cxf by apache.
the class IntegrationBaseTest method createLocalResource.
protected Server createLocalResource(ResourceManager manager) {
ResourceLocal implementor = new ResourceLocal();
implementor.setManager(manager);
JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
Map<String, Object> props = factory.getProperties(true);
props.put("jaxb.additionalContextClasses", org.apache.cxf.ws.transfer.dialect.fragment.ExpressionType.class);
factory.setProperties(props);
factory.setBus(bus);
factory.setServiceClass(Resource.class);
factory.setAddress(RESOURCE_LOCAL_ADDRESS);
factory.setServiceBean(implementor);
return factory.create();
}
Aggregations