Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

To attach xml document to soap body using saaj api.  RSS feed

 
kranthi chamarthi
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
Iam developing a component for web services.In that i have this requirement of attaching the xml document(pre built) to the soap body.
There is a method called addDocument() in SOAPBody of saaj1.2.I downloaded the .jar file from sun site and set it in classpath.I tried to use it.But iam getting some error with it.Probably because of incompatibility between the versions of saaj-api.jar(newly downloaded) and saaj-ri.jar(already existing) in my application.
Could some some one suggest me some solution.Whether it is through using addDocument() in saaj1.2 or by some other way using the methods in saaj1.1
Thanks in advance
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you actually need both jars in your classpath? Maybe it will work just the saaj-api? If not, how much work is it to get the existing code to work with saaj-api instead of saaj-ri?

You also may want to have a look at page 132, "SOAP with attachments" of Java Web Services in a Nutshell: Chapter 3 SAAJ (pdf) for any additional information about attachments with SAAJ.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!