You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Michael Svoboda <mi...@softwired-inc.com> on 2001/08/09 15:59:45 UTC

Best way to send XML over Soap?

I'd like to send plain XML inside the envelope from the client to the
server and back. 
(I use XML because the client doesn't have to be written in Java and
because I don't wan't to write Serializer/Deserializer)

I know that one could use a literal_xml encoding or just put the whole
XML-file in a string, but
are these the only possible solutions? Which are the drawbacks? What's
your experience?
Are there any documents or articles (or examples) discussing this issue?

Thanks for your inputs
Michael Svoboda

Re: Best way to send XML over Soap?

Posted by Rich Catlett <ri...@more.net>.
I am doing the same thing, this is what I have found.  You can send the 
XML as a string, but if that String gets to large there can be 
performance problems on the order of a minute or two.  Sending the XML 
in the body of the Envelope you have to unmarshall it into an envelope 
and then you have to marshall it back to the XML on the other side, 
which is extra work if your dealing with XML already, and it can be kind 
of tricky if your new to XML as it is not very well documented, 
especially if you extract the body of the envelope, which should be 
where you passed the XML.  The final option is to send the XML as an 
attachment inside a message, no marshalling and unmarshalling, you don't 
have to deal with serializing and deserializing a String, and this is 
the one I have decided to use.

Rich Catlett

Michael Svoboda wrote:

>I'd like to send plain XML inside the envelope from the client to the
>server and back. 
>(I use XML because the client doesn't have to be written in Java and
>because I don't wan't to write Serializer/Deserializer)
>
>I know that one could use a literal_xml encoding or just put the whole
>XML-file in a string, but
>are these the only possible solutions? Which are the drawbacks? What's
>your experience?
>Are there any documents or articles (or examples) discussing this issue?
>
>Thanks for your inputs
>Michael Svoboda
>




Re: Best way to send XML over Soap?

Posted by Rich Catlett <ri...@more.net>.
I am doing the same thing, this is what I have found.  You can send the 
XML as a string, but if that String gets to large there can be 
performance problems on the order of a minute or two.  Sending the XML 
in the body of the Envelope you have to unmarshall it into an envelope 
and then you have to marshall it back to the XML on the other side, 
which is extra work if your dealing with XML already, and it can be kind 
of tricky if your new to XML as it is not very well documented, 
especially if you extract the body of the envelope, which should be 
where you passed the XML.  The final option is to send the XML as an 
attachment inside a message, no marshalling and unmarshalling, you don't 
have to deal with serializing and deserializing a String, and this is 
the one I have decided to use.

Rich Catlett

Michael Svoboda wrote:

>I'd like to send plain XML inside the envelope from the client to the
>server and back. 
>(I use XML because the client doesn't have to be written in Java and
>because I don't wan't to write Serializer/Deserializer)
>
>I know that one could use a literal_xml encoding or just put the whole
>XML-file in a string, but
>are these the only possible solutions? Which are the drawbacks? What's
>your experience?
>Are there any documents or articles (or examples) discussing this issue?
>
>Thanks for your inputs
>Michael Svoboda
>