pbenito
asked on
How do I transmit an XML document via SOAP?
Hi,
I am developing a web service in C# 3.0 that extracts an XML document out of an Oracle 11g database and sends the entire document back to the client. I have tried sending and XMLNode via SOAP and noticed that it strips out XML processing instructions (<? & ?>) and document type definitions (<! & >), becuase they are not allowed in SOAP. WIth that said, how can I encode the XML file and be able to send it back to the client without modifying its contents?
Thanks,
Pat
I am developing a web service in C# 3.0 that extracts an XML document out of an Oracle 11g database and sends the entire document back to the client. I have tried sending and XMLNode via SOAP and noticed that it strips out XML processing instructions (<? & ?>) and document type definitions (<! & >), becuase they are not allowed in SOAP. WIth that said, how can I encode the XML file and be able to send it back to the client without modifying its contents?
Thanks,
Pat
ASKER
Thanks Bob.
I do not want to modify the XML document after retrieving it out of the database. Is there an encoding method that I can use to send it via SOAP?
Pat
I do not want to modify the XML document after retrieving it out of the database. Is there an encoding method that I can use to send it via SOAP?
Pat
Pat,
Can you tell me how you are "extracting an XML document out of an Oracle 11g database and sending the entire document back to the client"?
Bob
Can you tell me how you are "extracting an XML document out of an Oracle 11g database and sending the entire document back to the client"?
Bob
ASKER
Sure. I have the XML document stored as an xml type in oracle. I have an XQuery statement to return the XML document, and then I have an XMLNode as the return type on my web service. When the client gets the XMLNode it has the processing instructions parsed out.
Thanks,
Pat
Thanks,
Pat
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Does the SOAP envelope enclose strings with CDATA?
Pat
Pat
Or, even better would be to wrap the XmlNode in a CDATA data, without modifying the source XML.
Bob
Bob
Example
<![CDATA[<client>Smith & Barney</client>]]>
Bob