• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SOAP body - Java client

 
swapnil paranjape
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Ivan. This code helped me a lot.

 
Atul Mishra
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic