thanks for the reply. Should I use the same method, even if I am calling it from a web application.
Thanks in advance
Joined: Nov 26, 2008
Thanks for the reply when should I use the AXIOMClient class using AXIOM.
So, I need to have stubs to access the web service. I can't access just by mentioning end point URL and passing parameters as shown in the example.
Could you please elaborate on this.
Thanks in advance, Kalyani
Joined: Aug 19, 2005
Originally posted by kalyani goli: Should I use the same method, even if I am calling it from a web application.
You should be able to use the stub in a web application. However, as you are doing this for the first time, I'd suggest attempting it as a command line client first, so that you can iron out your own understanding of how to use the generated artifacts first.
when should I use the AXIOMClient class using AXIOM
You have a WSDL - so you should be using WSDL2Java to generate a stub. The stub will make Java representations of the XML available. Writing a Web Service Client
By default WSDL2Java uses Axis2 Data Binding (ADB) (So this might interest you).
If you don't mind the extra work you could try data binding with JiBX which lets you configure mappings between your own objects and the XML required by the WSDL.
I can't access just by mentioning end point URL and passing parameters as shown in the example.
Not unless you want to manually derive the formal structure of the supported SOAP requests and responses from the WSDL that you were handed and then programmatically build the requests from scratch, to later pry the result out of the SOAP response with SAAJ (or AXIOM).
The code example you showed accessed a RPC/encoded web service - Axis2 doesn't even support the RPC/encoded messaging mode anymore; it caused nothing but trouble (they weren't compliant with the WS-I Basic Profile).