HighTechTalks DotNet Forums  

Reading soap Request

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Reading soap Request in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Aditya
 
Posts: n/a

Default Reading soap Request - 06-14-2006 , 08:12 AM






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.Priori ties.Medium,
strPostArgs.toString(),aObjHeaders );
req.execute();



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.