Search in sources :

Example 1 with ResourceRemote

use of org.apache.cxf.ws.transfer.resource.ResourceRemote in project cxf by apache.

the class TestUtils method createTeachersServers.

protected static void createTeachersServers(String port) {
    ResourceManager teachersResourceManager = new MemoryResourceManager();
    ResourceRemote resource = new ResourceRemote();
    resource.setManager(teachersResourceManager);
    resource.getResourceTypeIdentifiers().add(new XSDResourceTypeIdentifier(new StreamSource(TestUtils.class.getResourceAsStream("/schema/teacher.xsd")), new XSLTResourceTransformer(new StreamSource(TestUtils.class.getResourceAsStream("/xslt/teacherDefaultValues.xsl")), new TeacherResourceValidator())));
    teachersResourceFactoryServer = createTeachersResourceFactoryEndpoint(resource, port);
    teachersResourceServer = createTeacherResourceEndpoint(resource, port);
}
Also used : ResourceRemote(org.apache.cxf.ws.transfer.resource.ResourceRemote) StreamSource(javax.xml.transform.stream.StreamSource) TeacherResourceValidator(org.apache.cxf.systest.ws.transfer.validator.TeacherResourceValidator) XSLTResourceTransformer(org.apache.cxf.ws.transfer.validationtransformation.XSLTResourceTransformer) MemoryResourceManager(org.apache.cxf.ws.transfer.manager.MemoryResourceManager) ResourceManager(org.apache.cxf.ws.transfer.manager.ResourceManager) MemoryResourceManager(org.apache.cxf.ws.transfer.manager.MemoryResourceManager) XSDResourceTypeIdentifier(org.apache.cxf.ws.transfer.validationtransformation.XSDResourceTypeIdentifier)

Example 2 with ResourceRemote

use of org.apache.cxf.ws.transfer.resource.ResourceRemote in project cxf by apache.

the class IntegrationBaseTest method createRemoteResource.

protected Server createRemoteResource(ResourceManager manager) {
    ResourceRemote implementor = new ResourceRemote();
    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(ResourceFactory.class);
    factory.setAddress(RESOURCE_REMOTE_MANAGER_ADDRESS);
    factory.setServiceBean(implementor);
    return factory.create();
}
Also used : ResourceRemote(org.apache.cxf.ws.transfer.resource.ResourceRemote) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean)

Aggregations

ResourceRemote (org.apache.cxf.ws.transfer.resource.ResourceRemote)2 StreamSource (javax.xml.transform.stream.StreamSource)1 JaxWsServerFactoryBean (org.apache.cxf.jaxws.JaxWsServerFactoryBean)1 TeacherResourceValidator (org.apache.cxf.systest.ws.transfer.validator.TeacherResourceValidator)1 MemoryResourceManager (org.apache.cxf.ws.transfer.manager.MemoryResourceManager)1 ResourceManager (org.apache.cxf.ws.transfer.manager.ResourceManager)1 XSDResourceTypeIdentifier (org.apache.cxf.ws.transfer.validationtransformation.XSDResourceTypeIdentifier)1 XSLTResourceTransformer (org.apache.cxf.ws.transfer.validationtransformation.XSLTResourceTransformer)1