Search in sources :

Example 1 with StudentPutResourceValidator

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();
}
Also used : StreamSource(javax.xml.transform.stream.StreamSource) ResourceLocal(org.apache.cxf.ws.transfer.resource.ResourceLocal) StudentPutResourceValidator(org.apache.cxf.systest.ws.transfer.validator.StudentPutResourceValidator) XSLTResourceTransformer(org.apache.cxf.ws.transfer.validationtransformation.XSLTResourceTransformer) XSDResourceTypeIdentifier(org.apache.cxf.ws.transfer.validationtransformation.XSDResourceTypeIdentifier) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean)

Aggregations

StreamSource (javax.xml.transform.stream.StreamSource)1 JaxWsServerFactoryBean (org.apache.cxf.jaxws.JaxWsServerFactoryBean)1 StudentPutResourceValidator (org.apache.cxf.systest.ws.transfer.validator.StudentPutResourceValidator)1 ResourceLocal (org.apache.cxf.ws.transfer.resource.ResourceLocal)1 XSDResourceTypeIdentifier (org.apache.cxf.ws.transfer.validationtransformation.XSDResourceTypeIdentifier)1 XSLTResourceTransformer (org.apache.cxf.ws.transfer.validationtransformation.XSLTResourceTransformer)1