use of org.apache.hello_world_soap_http.types.SayHi 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, SERVICE_NAME);
assertNotNull(service);
JAXBContext jc = JAXBContext.newInstance("org.apache.hello_world_soap_http.types");
Dispatch<Object> disp = service.createDispatch(PORT_NAME, jc, Service.Mode.PAYLOAD);
SayHi s = new SayHi();
Object response = disp.invoke(s);
assertNotNull(response);
assertTrue(response instanceof SayHiResponse);
}
Aggregations