};
}
public void testCallback() {
Bus bus = null;
try {
bus = Bus.init();
} catch (BusException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Object implementor = new CallbackImpl();
String address = "http://localhost:9005/CallbackContext/CallbackPort";
Endpoint.publish(address, implementor);
URL wsdlURL = getClass().getResource("/wsdl/basic_callback.wsdl");
SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
ServerPortType port = ss.getSOAPPort();
EndpointReferenceType ref = null;
try {
ref = EndpointReferenceUtils.getEndpointReference(new WSDLManagerImpl(bus), implementor);
} catch (BusException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String resp = port.registerCallback(ref);
assertTrue(resp.equals("registerCallback called"));
try {
bus.shutdown(true);
} catch (BusException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}