Problem retreiving data from Soap message

J

Jens

Hello,

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="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns3112="http://
tempuri.org">
<SOAP-ENV:Body>
<TheData>
<![CDATA[ <?xml version="1.0" encoding="UTF-8"?><Test><Dag>23</
Dag></Test> ]]>
</TheData>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

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

Public Function getData(ByVal XMLString As XmlDocument) As
XmlDataDocument
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,
Jens
 

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

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top