use of org.apache.cxf.ws.transfer.resourcefactory.ResourceFactory in project cxf by apache.
the class DeleteTest method createStudent.
private CreateResponse createStudent() throws XMLStreamException {
Document createStudentXML = StaxUtils.read(getClass().getResourceAsStream("/xml/createStudent.xml"));
Create request = new Create();
request.setRepresentation(new Representation());
request.getRepresentation().setAny(createStudentXML.getDocumentElement());
ResourceFactory rf = TestUtils.createResourceFactoryClient(PORT);
return rf.create(request);
}
use of org.apache.cxf.ws.transfer.resourcefactory.ResourceFactory in project cxf by apache.
the class PutTest method createTeacher.
private CreateResponse createTeacher() throws XMLStreamException {
Document createTeacherXML = StaxUtils.read(getClass().getResourceAsStream("/xml/createTeacher.xml"));
Create request = new Create();
request.setRepresentation(new Representation());
request.getRepresentation().setAny(createTeacherXML.getDocumentElement());
ResourceFactory rf = TestUtils.createResourceFactoryClient(PORT);
return rf.create(request);
}
use of org.apache.cxf.ws.transfer.resourcefactory.ResourceFactory in project cxf by apache.
the class PutTest method createStudent.
private CreateResponse createStudent() throws XMLStreamException {
Document createStudentXML = StaxUtils.read(getClass().getResourceAsStream("/xml/createStudent.xml"));
Create request = new Create();
request.setRepresentation(new Representation());
request.getRepresentation().setAny(createStudentXML.getDocumentElement());
ResourceFactory rf = TestUtils.createResourceFactoryClient(PORT);
return rf.create(request);
}
use of org.apache.cxf.ws.transfer.resourcefactory.ResourceFactory in project cxf by apache.
the class TestUtils method createResourceFactoryClient.
protected static ResourceFactory createResourceFactoryClient(String port) {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(org.apache.cxf.ws.transfer.resourcefactory.ResourceFactory.class);
factory.setAddress("http://localhost:" + port + "/ResourceFactory");
return (ResourceFactory) factory.create();
}
use of org.apache.cxf.ws.transfer.resourcefactory.ResourceFactory in project cxf by apache.
the class ResourceFactoryTest method createClient.
private ResourceFactory createClient() {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setBus(bus);
factory.setServiceClass(ResourceFactory.class);
factory.setAddress(RESOURCE_FACTORY_ADDRESS);
return (ResourceFactory) factory.create();
}
Aggregations