Reading soap Request

Discussion in 'ASP .Net Web Services' started by Aditya, Jun 14, 2006.

  1. Aditya

    Aditya Guest

    Hello guys,

    I am calling a web service from a gadget using the following code. The thing
    i want to do is retrieve the value sname in the web service. How can i do
    it. Pls help

    var url = "http://localhost/VS2005WebSite/ReturnName.asmx";

    var aObjHeaders = new Array();
    aObjHeaders["SOAPAction"] = "http://tempuri.org/NamePls";
    aObjHeaders["Content-Type"] = "text/xml";
    aObjHeaders["host"] = "localhost";

    var strPostArgs = new Web.StringBuilder();
    strPostArgs.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
    strPostArgs.append("<soap:Envelope
    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ");
    strPostArgs.append("xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
    xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">");
    strPostArgs.append("<soap:Body>");
    strPostArgs.append("<NamePls xmlns=\"http://tempuri.org\">");
    strPostArgs.append("<sname>");
    strPostArgs.append(sname);
    strPostArgs.append("</sname>");
    strPostArgs.append("</NamePls>");
    strPostArgs.append("</soap:Body>");
    strPostArgs.append("</soap:Envelope>");



    // Fetch RSS feed
    var req = Web.Network.createRequest(
    Web.Network.Type.XMLPost,
    url,
    null,//{proxy:"generic", numItems:5},
    RssDownloadComplete,Web.Utility.Prioritizer.Priorities.Medium,
    strPostArgs.toString(),aObjHeaders );
    req.execute();
    Aditya, Jun 14, 2006
    #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. Sham Ramakrishnan
    Replies:
    2
    Views:
    8,360
    Sham Ramakrishnan
    Jul 1, 2003
  2. Brian Birtle
    Replies:
    2
    Views:
    2,016
    John Saunders
    Oct 16, 2003
  3. comp.text.xml
    Replies:
    0
    Views:
    510
    comp.text.xml
    Sep 20, 2006
  4. Ivan S
    Replies:
    0
    Views:
    532
    Ivan S
    Aug 13, 2008
  5. Frederik Vanderhaegen

    Soap Extension problem (seems that soap request is not sent to server)

    Frederik Vanderhaegen, Oct 20, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    270
    Frederik Vanderhaegen
    Oct 20, 2006
Loading...

Share This Page