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 yingchun cai <es...@yahoo.com> on 2011/02/02 07:23:02 UTC
how to correspond an async SOAP request and the response
Hi,
I try to implement an async SOAP client request to a SOAP Server. But I need to
get the response back and need to match the request. I am using similar code
like in the Non-Blocking example
in http://axis.apache.org/axis2/java/core/docs/adv-userguide.html. I try to use
the MessageId in the request and the RelatesTo fields in the response to match
the request/response. However, I cannot find a way to get the RelatesTo field in
the Response in the callback. Any idea what's the best way to do?
Thanks
try { org.apache.axis2.userguide.Axis2SampleDocLitServiceStub stub
= new org.apache.axis2.userguide.Axis2SampleDocLitServiceStub(null,
"http://localhost:8080/axis2/services/Axis2SampleDocLitService");
//implementing the callback online
org.apache.axis2.userguide.Axis2SampleDocLitServiceCallbackHandler callback =
new org.apache.axis2.userguide.Axis2SampleDocLitServiceCallbackHandler() {
public void receiveResultechoString(
org.apache.axis2.userguide.xsd.EchoStringReturnDocument resDoc) {
System.out.println(resDoc.getEchoStringReturn()); }
}; org.apache.axis2.userguide.xsd.EchoStringParamDocument reqDoc =
org.apache.axis2.userguide.xsd.EchoStringParamDocument.Factory.newInstance();
reqDoc.setEchoStringParam("Axis2 Echo"); stub.startechoString(reqDoc,
callback); } catch (java.rmi.RemoteException e) {
e.printStackTrace(); }
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org