• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Axis2 - How to write client without using AXIOM API

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:

Posts: 43011
  • 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.
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!