I need to create a web service where the payload will be an industry standard xml document. What's the best way to have the client package the xml doc into the soap message? Sun says that there are three ways to do this. See http://java.sun.com/blueprints/guidelines/designing_webservices/html/webservdesign8.html. 1. The xml doc could be sent as an attachment. 2. The message part could be definined as an xsd:String type. 3. The message part could be definined as an xsd:anyType
The problem with option 1 above is that Sun says it's not very interoperable. I'm not sure why. I'm not sure if 2 and 3 would work because the documents being sent would likely have xml and doctype declarations (The document has a dtd). Obviously, these declarations are not elements and when embedded in a soap message would result in the message not being well formed xml. Would those declarations possibly be encoded? What would the difference be between xsd:String and xsd:anyType with the way the messages would look over the wire? Another option that has been discussed would be to skip using SOAP and just pass the xml doc as the payload of an http post. Might this be a better solution? Any opinions on the merits of this? Thanks for your input. Jason p.s. Anyone need a gmail account? I've got six left to give out.