tags:

views:

10

answers:

1

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.

+1  A: 

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.

Andrzej Doyle
Aah I was passing the unescaped XML which had a conflict. Used StringEscapeUtils.escapeXml(validXml) from commons-land and problem solved !
Calm Storm