R – How to stop a Visual Studio generated web service proxy class from encoding

proxy-classesvisual studioweb serviceswsdl

I'm using a Visual Studio generated proxy class to access a web service (added the web service as a web reference to my project). The problem is that the function the web service exposes expects a CDATA element, i.e.:

<Function><![CDATA[<Blah></Blah>]]></Function>

Unfortunately, when I pass in "" into the proxy class, it calls the web service with this:

<Function>&lt;![CDATA[&lt;Blah&gt;&lt;/Blah&gt;]]&gt;</Function>

This appears to be causing problems with the web service. Is there any way to fix this while still using the proxy class generated by Visual Studio?

Best Answer

Can you provide a code sample of how you're calling the webservice? If it's a web service with a published WSDL I don't know why you'd even have to address this level of implementation detail, so I have a suspicion that you're calling it wrong somehow.