aspose file tools*
The moose likes Web Services and the fly likes SOAP body - Java client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "SOAP body - Java client" Watch "SOAP body - Java client" New topic
Author

SOAP body - Java client

swapnil paranjape
Ranch Hand

Joined: May 15, 2005
Posts: 126
Hi,

I am trying to form the SOAP request and the message body should be like this




I have written the java client to form this soap message body but I dont know how to add these owner,email,requestdescription attributes in the body. Can you please provide me some code snippets or web refrences?
This is what I have written but not able to get the exact soap body mentioned above.



Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hello!
Here you go, two ways of creating the message you want. One uses DOM, the other uses SAAJ.
An option would also be to read the message from a text file and then fill in the values of the different elements.

Best wishes!
swapnil paranjape
Ranch Hand

Joined: May 15, 2005
Posts: 126
Thanks a lot Ivan. This code helped me a lot.

Atul Mishra
Ranch Hand

Joined: Jun 08, 2006
Posts: 140
Hi Ivan,

I tried running your call and go a SOAPexception.

Could you please mention what all jar files I need to have ?

I am using eclipse, JRE1.5. This is a stand alone class I am trying without trying to connect to any app servers.

Thanks
Atul
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Try using JRE/JDK 6, if you can - I am lazy, so that is what I did to get all the JAXP and SAAJ stuff. :-)
Best wishes!
Atul Mishra
Ranch Hand

Joined: Jun 08, 2006
Posts: 140
Thanks Ivan...
The company standard so far is JRE 1.5, we are not yet allowed to move towards JRE 1.6

For me to achive this using JRE 1.5_017 version, do I need to have any additional jar files ?

Thanks again
Atul
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42280
    
  64
For me to achive this using JRE 1.5_017 version, do I need to have any additional jar files ?

Yes, it's called saaj.jar.


Ping & DNS - my free Android networking tools app
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Go to this page, where you can find a Downloads section: https://saaj.dev.java.net/
Following the link will allow you to download an archive which contains the SAAJ JARS.
Also check this page to make sure you have the other required components: https://saaj.dev.java.net/overview.html
Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SOAP body - Java client