• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SOAP body - Java client

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.



 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Ivan. This code helped me a lot.

 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic