Passing XML as String value to be able to use HTTP Get Test

Passing XML as String value to be able to use HTTP Get Test

Post by monkeydus » Wed, 14 Aug 2002 00:23:42



We've been using pseudo XML web services for a couple of years now.
Recently I have been converting some our our ASP pages that take our XML and
pass it to the COM to ASP.NET C# pages.  We would like to be able to use the
HTTP GET test feature by hitting our .asmx page and supplying an XML string
in the input box.  This works ok, but for me to hit the ASP.NET page via our
front-end client (jscript w/XMLHTTP object), I have to declare the input
into our ASP.NET C# class as an XmlNode type (which doesn't allow the HTTP
GET test page to be utilized).  If I declare it as a String, I get the
following error:  System.Web.Services.Protocols.SoapException: Server was
unable to read request. ---> System.InvalidOperationException: There is an
error in XML document (2, 280). ---> System.Xml.XmlException: 'Element' is
an invalid node type. Line 2, position 280.

How can I pass XML to my web service yet still be able to use the HTTP GET
test wrapper?

thanks

 
 
 

1. XML Newbie question, getting a value from an XML string

I have a web service that returns an xml string:
<USERS>
   <UserID>1</UserID>
   <FirstName>Mark</FirstName>
   <LastName>Moeykens</LastName>
</USERS>

So now that I have this string, how do I find out what the value is for the
field "UserID"?

Just to let you know I have no experience with XML so if you reply with
something like "Just use DOM" I still won't know what to do.

If it is easier I can have the web service return a string like this too:
<USERS UserID="1" FirstName="Mark" LastName="Moeykens"/>

I've been working at this for the last 3 hours and am getting overwhelmed by
the whole XML world.

I've managed to read the string into an XmlDocument object but that's about
it.

Thanks,
Mark Moeykens

2. (no subject)

3. HELP...MODEM AND PRINTER PROBLEMS

4. How to get a node value or inner text from a xml string using xpath

5. Feedback needed on my site

6. SQL Server 2K, XML/XSL for Explicit problem with passing XML paramters values

7. Database Error

8. Getting started with XML - What am I doing wrong?

9. After installing VS .NET when I am getting an error using ADODB stuff

10. test for a null value in a string --- HOW HARD CAN IT BE?

11. Error while passing empty string(system.dbnull.value.tostring) to sp_xml_preparedocument xmltext

12. Passing a string as value to nvarchar parameter to sp fails