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