views:

296

answers:

1

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?

+1  A: 

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.

Ken Sykora
Yes, this is generated from a published WSDL. The WSDL says that the function being called simply takes in a string, and that's exactly what I'm passing it. Unfortunately, when the web service proxy class generates the XML, it encodes the string I passed in.
Kevin Pang