wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes Axis2 - How to write client without using AXIOM API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Axis2 - How to write client without using AXIOM API" Watch "Axis2 - How to write client without using AXIOM API" New topic
Author

Axis2 - How to write client without using AXIOM API

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
I am using the post below for learning purses:

https://www.wso2.org/library/90

I would like to know how to write client code using the stubs etc. that get created WITHOUT using AXIOM API. I am familiar with Axis1.

My questions:

1. Can I write client code similar to Axis1 that does not require using AXIOM API?

2. Could anyone provide some example of doing so?

3. In Axis1, I can write client without importing any Axis1 specific class. An example of client code in Axis1 is similar to the following:



In the client code above for Axis1, I only need to call the corresponding Service and ServiceLocator class. I do not need to know any other class specific to Axis1.

Could you please provide similar example of doing so without using the AXIOM API?

I tried coding something similar to the following for Axis2 client:



The attempt to write the code above threw exception in invoke method as:



My services.xml is:



The method add is:

Integer add(int i, int j)

Is there any way to write client code (similar to Axis1) that does not involve AXIOM API? Please provide an example.

Last Question: In the generated wsdl, I see Soap11Binding and Soap12Binding for the single method add. Why are there two different bindings generated?

The generated wsdl is:




Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
This is maybe more basic than you'd like, but it's possible to write a SAAJ client without referencing any particular SOAP stack; an example of that is here.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Axis2 - How to write client without using AXIOM API
 
Similar Threads
how to make the web service client
Axis2 (1.5) - Unable to see POJO deployed as service
Axis2 Issue, Please Help!
Getting exception org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected
axis2/webshpere response != axis2/glassfish response........ why?