Reading soap Request

A

Aditya

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();
 

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,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top