use of org.apache.hello_world_soap_http.types.SayHiResponse in project cxf by apache.
the class DispatchTest method testJAXB.
@Test
public void testJAXB() throws Exception {
d.setMessageObserver(new MessageReplayObserver("/org/apache/cxf/jaxws/sayHiResponse.xml"));
URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
assertNotNull(wsdl);
SOAPService service = new SOAPService(wsdl, serviceName);
assertNotNull(service);
JAXBContext jc = JAXBContext.newInstance("org.apache.hello_world_soap_http.types");
Dispatch<Object> disp = service.createDispatch(portName, jc, Service.Mode.PAYLOAD);
SayHi s = new SayHi();
Object response = disp.invoke(s);
assertNotNull(response);
assertTrue(response instanceof SayHiResponse);
}
Aggregations