Tutorial :Known issues with sending an XML document as a web service parameter?



Question:

I am consuming a webservice and one of the methods takes a String parameter. This parameter is actually a well formed xml document in itself and the client sends an xml document.

Apart from the fact that it is going to be expensive to wire the xml document are there any obvious gotchas I should factor in?

I am using over SOAP over HTTP and the web service is exposed as a WSDL.


Solution:1

This should not be a problem at all.

The only way that the XML nature might be a problem is if your webservice library has bugs escaping Strings properly. (In this case, the tags of the parameter would intermingle with the tags of the SOAP message and invalidate the document). A proper implementation however will escape the string parameter correctly, so there will be no issues with the fact it's XML.

Then all you've got is a big string as a parameter - which asides from the size-related expense, is most definitely well supported in web services.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »