Search in sources :

Example 1 with ResourceFactoryImpl

use of org.apache.cxf.ws.transfer.resourcefactory.ResourceFactoryImpl 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();
}
Also used : MyResourceResolver(org.apache.cxf.systest.ws.transfer.resolver.MyResourceResolver) StreamSource(javax.xml.transform.stream.StreamSource) XSLTResourceTransformer(org.apache.cxf.ws.transfer.validationtransformation.XSLTResourceTransformer) ResourceFactoryImpl(org.apache.cxf.ws.transfer.resourcefactory.ResourceFactoryImpl) XSDResourceTypeIdentifier(org.apache.cxf.ws.transfer.validationtransformation.XSDResourceTypeIdentifier) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean)

Example 2 with ResourceFactoryImpl

use of org.apache.cxf.ws.transfer.resourcefactory.ResourceFactoryImpl in project cxf by apache.

the class IntegrationBaseTest method createLocalResourceFactory.

protected Server createLocalResourceFactory(ResourceManager manager) {
    ResourceFactoryImpl implementor = new ResourceFactoryImpl();
    implementor.setResourceResolver(new SimpleResourceResolver(RESOURCE_ADDRESS, manager));
    JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
    factory.setBus(bus);
    factory.setServiceClass(ResourceFactory.class);
    factory.setAddress(RESOURCE_FACTORY_ADDRESS);
    factory.setServiceBean(implementor);
    return factory.create();
}
Also used : SimpleResourceResolver(org.apache.cxf.ws.transfer.resourcefactory.resolver.SimpleResourceResolver) ResourceFactoryImpl(org.apache.cxf.ws.transfer.resourcefactory.ResourceFactoryImpl) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean)

Example 3 with ResourceFactoryImpl

use of org.apache.cxf.ws.transfer.resourcefactory.ResourceFactoryImpl in project cxf by apache.

the class IntegrationBaseTest method createRemoteResourceFactory.

protected Server createRemoteResourceFactory() {
    ResourceFactoryImpl implementor = new ResourceFactoryImpl();
    implementor.setResourceResolver(new SimpleResourceResolver(RESOURCE_REMOTE_ADDRESS, null));
    JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
    factory.setBus(bus);
    factory.setServiceClass(ResourceFactory.class);
    factory.setAddress(RESOURCE_FACTORY_ADDRESS);
    factory.setServiceBean(implementor);
    return factory.create();
}
Also used : SimpleResourceResolver(org.apache.cxf.ws.transfer.resourcefactory.resolver.SimpleResourceResolver) ResourceFactoryImpl(org.apache.cxf.ws.transfer.resourcefactory.ResourceFactoryImpl) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean)

Aggregations

JaxWsServerFactoryBean (org.apache.cxf.jaxws.JaxWsServerFactoryBean)3 ResourceFactoryImpl (org.apache.cxf.ws.transfer.resourcefactory.ResourceFactoryImpl)3 SimpleResourceResolver (org.apache.cxf.ws.transfer.resourcefactory.resolver.SimpleResourceResolver)2 StreamSource (javax.xml.transform.stream.StreamSource)1 MyResourceResolver (org.apache.cxf.systest.ws.transfer.resolver.MyResourceResolver)1 XSDResourceTypeIdentifier (org.apache.cxf.ws.transfer.validationtransformation.XSDResourceTypeIdentifier)1 XSLTResourceTransformer (org.apache.cxf.ws.transfer.validationtransformation.XSLTResourceTransformer)1