HighTechTalks DotNet Forums  

Problem retreiving data from Soap message

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Problem retreiving data from Soap message in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jens
 
Posts: n/a

Default Problem retreiving data from Soap message - 07-23-2007 , 09:11 AM






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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.