aspose file tools*
The moose likes Web Services and the fly likes Axis and SAAJ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis and SAAJ" Watch "Axis and SAAJ" New topic
Author

Axis and SAAJ

Kasi Viswan
Ranch Hand

Joined: Sep 27, 2008
Posts: 42
Hello

I want to write a web service client using Axis and SAAJ. I have written one using JWSDP but have to trash it because i wasn't able to set timeout in SOAPConnection object.
I couldn't find links in apache axis website that says how to write saaj client or i might have missed it.

Can someone please send me to beginners links or code camps for this axis and saaj client.

And please also tell me if i should use axis1 or axis2.

Thanks
Kasi

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41869
    
  63
Here's an example of a simple SAAJ client that doesn't rely on any particular client-side SOAP stack: http://faq.javaranch.com/java/WebServicesHowTo#saaj-client


Ping & DNS - my free Android networking tools app
Kasi Viswan
Ranch Hand

Joined: Sep 27, 2008
Posts: 42
Thanks for the link Ulf but I am particularly looking for information on how to write SAAJ client using Axis because I need Client timeout feature in my application.
1. I am looking for information like which Axis version i should use Axis1 or Axis2
2. What Axis jars i need to use.
3. Does the code I wrote using JWSDP still works if i replace with Axis Jars.
4. How do i construct Element, Attributes, Namespaces, timeouts when working with Axis.
Any pointers to these will be very helpful.

Thanks
Kasi
Kasi Viswan
Ranch Hand

Joined: Sep 27, 2008
Posts: 42
Just figured out I have to use addBodyElement when using Axis instead of addChildElement when using JWSDP from
http://www.ibm.com/developerworks/xml/library/x-jaxmsoap/

I still don't know what are the jars to replace, can someone experienced in using Axis please throw me some light on this.
The client i am working on is a Desktop client not web.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41869
    
  63
I am particularly looking for information on how to write SAAJ client using Axis because I need Client timeout feature

You'd still be using the same client code, you'd just be running it in a way that allows you to find out if it hasn't terminated after a given period of time. One way to achieve that is by wrapping the call in a java.util.concurrent.Future, and then using a timed get to retrieve the result.

I am looking for information like which Axis version i should use Axis1 or Axis2

Axis2

What Axis jars i need to use.

Why wouldn't you use all of them? Are you saying you want to go to the trouble of finding out which jar files might conceivably not be needed?

Does the code I wrote using JWSDP still works if i replace with Axis Jars.

That depends on which APIs it's using. Note that the sample code does not use proprietary APIs, and thus works with any SAAJ implementation.

How do i construct Element, Attributes, Namespaces, timeouts when working with Axis.

Doesn't the sample code demonstrate all that, except for timeouts? What else are you looking for?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Axis and SAAJ