This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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

 
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
 
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!