Problem retreiving data from Soap message

Discussion in 'ASP .Net Web Services' started by Jens, Jul 23, 2007.

  1. Jens

    Jens Guest

    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
     
    Jens, Jul 23, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    2,100
    Artur-ek
    May 23, 2005
  2. Marty Gagnon
    Replies:
    1
    Views:
    421
    Martin Honnen
    Nov 30, 2004
  3. ElCapitan
    Replies:
    0
    Views:
    136
    ElCapitan
    Mar 14, 2006
  4. Peter van der veen

    How to add SOAP header to a SOAP message?

    Peter van der veen, Nov 8, 2006, in forum: ASP .Net Web Services
    Replies:
    6
    Views:
    593
    J. Dudgeon
    Nov 14, 2006
  5. Jeff

    retreiving data from html page

    Jeff, Oct 8, 2006, in forum: ASP General
    Replies:
    8
    Views:
    143
    Mike Brind
    Oct 8, 2006
Loading...

Share This Page