File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Axis2 - How to write client without using AXIOM API

 
Sam Gehouse
Ranch Hand
Posts: 281
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic