axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thushantha De Alwis" <r...@opensource.lk>
Subject [Axis2] Writing Axis2 Client
Date Fri, 24 Feb 2006 05:40:44 GMT
Hi All

I have successfully deployed a WebService called "Echo"

So I want to invoke that web service. For that I tried to write a client.
When writing it I used the following code
sample got from 0.93 release.

try{
 EndpointReference targetEPR =3D new EndpointReference(
     "http://localhost:8080/axis2/services/StockQuoteService");

 // Make the request message
 OMFactory fac =3D OMAbstractFactory.getOMFactory();
 OMNamespace omNs =3D fac.createOMNamespace(
     "http://www.developerworks.com/example", "example");
 OMElement payload =3D fac.createOMElement("subscribe", omNs);
 payload.setText("IBM");

 // Send the request
 MessageSender msgSender =3D new MessageSender();
 msgSender.setTo(targetEPR);
 msgSender.setSenderTransport(Constants.TRANSPORT_HTTP);
 msgSender.send("subscribe", payload);
 }catch (AxisFault axisFault) {
     axisFault.printStackTrace();
 }



But Messagesender was depricated.

Is there any other way to write a client to invike the service. I went
through 0.94 release document also. If some
one have very simple code for cient to invike a service please send me.

Best Regards
Thushantha


Mime
View raw message