Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi Everyone,

I make one webservice "myweb" and add reference to this webservice to C# web application. project. I call the web service method validate("5","62") in to web application.
ReconServiceService objReconServiceService = new ReconServiceService();
  String s = objReconServiceService.validate("5", "62")


But i got error,because webservice return the output into XML format and cannot store directly to any variable.
I want to know any functionality that cast the XML output and print the result in to any variable of c# web application.

Thanks in advance
Regards,
Ravi.
Posted
Updated 21-May-11 1:24am
v2

1 solution

Why would you want to change the return value of a function ? Why not store what is being returned ? If you are getting an Xml document back, you can use it's properties to access the underlying XML, but the usefulness of XML is greatly diminished by storing it in a string. Use the right methods to extract the data from your XML instead, unless what you need is to pass the XML verbatim to something that does that. In which case, use the properties of the class containing the XML ( there's more than one, so we'd need to know which one, but you can hit the . and intellisense will show you your options ).
 
Share this answer
 
Comments
Wonde Tadesse 21-May-11 9:03am    
Good answer. My 5 :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900