Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Axis2 - How to write client without using AXIOM API  RSS feed

Sam Gehouse
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the post below for learning purses:

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
Posts: 42970
  • 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.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!