You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Axis2 Subscribe <ax...@gmail.com> on 2009/04/15 22:15:29 UTC
Use of XXXcallbackhandler.java
Hi all,
I have a question on the code generated by wsdl2java
There is a class named <service_name>CallbackHandler.java
And I used this callbackhandler in my asynchronous client code with
service.startAction(request, callbackhandler);
but the service is not called and callbackhandler is not invoked somehow.
Also, if I engage the addressing, the exception will be thrown
Unable to engage module : addressing
Does someone know an example to use callbackhandler?
or I have to use non blocking invocation?
I am using Axis2-1.4.1 and ran the client from Eclipse
my code looked like
SimpleServiceStub service = new SimpleServiceStub();
ConcatRequest request = new ConcatRequest();
ServiceClient client = service._getServiceClient();
Options options = client.getOptions();
options.setAction("urn:concat");
//Callback to handle the response
SimpleServiceCallbackHandler call = new SimpleServiceCallbackHandler(){
public void receiveResultconcat(ConcatResponse result) {
System.out.println(result.getConcatResponse());
}
};
client.setOptions(options);
//Cause Unable to engage module : addressing
//client.engageModule("addressing");
request.setS1("123");
request.setS2("456");
service.startconcat(request, call);
Thank you in advance
David