Solved

Send xml from Web Service response

Posted on 2009-04-14
2
208 Views
Last Modified: 2012-05-06
Hello,

I developed a web service method whos response is in the code section below.  How can I send a xmlDocument back from the web service?  When I try to access the method locally it says the return type is an XmlNode instead of XmlDocument which the method returns.

Thanks!
<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <GetBoatByIDResponse xmlns="http://.com/">

      <GetBoatByIDResult>xml</GetBoatByIDResult>

    </GetBoatByIDResponse>

  </soap:Body>

</soap:Envelope>

Open in new window

0
Comment
Question by:grogo21
2 Comments
 
LVL 9

Accepted Solution

by:
Gorkem Yuksel earned 250 total points
ID: 24143824
Can you post the code for the function you are calling?

Basically, in the function, if you set the return type to be XmlDocument, that is the type of object it will return.  

ie:
[WebMethod]
public XmlDocument SomeMethod()
{
     XmlDocument xmlDoc = new XmlDocument();
     return xmlDoc;
}
0
 
LVL 14

Assisted Solution

by:GiftsonDJohn
GiftsonDJohn earned 250 total points
ID: 24144537
Hi,

You can have reference to the following url

HOW TO: Use XmlDocument Elements When Passed to or Returned from WebMethods by Using Visual C# .NET
http://support.microsoft.com/kb/330600
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now