Problem retreiving data from Soap message




I've written a webservice in Asp.Net that has to retreive data from a
soap message.
See below for the example soap message:

<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="
envelope/" xmlns:xsd=""
xmlns:xsi="" xmlns:SOAP-
ENC="" xmlns:ns3112="http://">
<![CDATA[ <?xml version="1.0" encoding="UTF-8"?><Test><Dag>23</
Dag></Test> ]]>

I want to retreive the data in the CDATA section to process in my
Here are some lines of my code:

Public Function getData(ByVal XMLString As XmlDocument) As
Dim strString As String
strString = XMLString.InnerText.ToString
End Fuction

The error I receive is:
Object reference not set to an instance of an object.

Can someone please help me? I've tried several options to get the
information in the CDATA section but it looks like the webservice
thinks there's no data in the soap message.

best regards,


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question