axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Håkon Sagehaug <hakon.sageh...@uni.no>
Subject Re: [Axis2][Axis 1.4.1]Look for the Workable Sample Codes Related to Asynchronous Web Service Invocation
Date Thu, 07 Jan 2010 07:38:57 GMT
Hi

You could take a look here[1], I wrote a short tutorial on how to do it. I
think I used both axis2 1.4.1 and 1.5 for the client and it  worked.

Håkon

[1] http://www.bccs.uni.no/~hakont/ws-samples/AsyncWSTutorial.html

2010/1/6 浮生半世情 <adolf.pen@gmail.com>

> Dears:
>          I have one problem needed your recommendations. At present, I want
> to code my web service client with non-blocking or asynchronous manner. It
> measn once my client sends its requests, it can do other things continually
> without waiting for its replies. However, I still have not found any
> suitable sample codes after surveying many on-line documentations or
> materals.
>          Since I use the Axis 1.4.1 version, I found some on-line sample
> codes use those deprecated classes or methods. Therefore, anyone can give me
> the workable sample codes. I will appreciate your assistances.
>          In addition, I need to handle the replied data even if I use the
> asynchronous web service. So, the sample code should demonstrate how to get
> the replied data. Because I aslo find some on-line code doesn't claim the
> following story after asynchronous web service invocation looked like the
> following code snippet.
>
>
> 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);
>            // After the above line, I don't know how to get the replied
> data
>         } catch (java.rmi.RemoteException e) {
>           e.printStackTrace();
>        }
>



-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science(BCCS)
Uni BCCS/Uni Research
Hakon.Sagehaug@uni.no, phone +47 55584125

Mime
View raw message