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