Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Send xml from Web Service response

Posted on 2009-04-14
2
Medium Priority
?
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
Gorkem Yuksel earned 1000 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 1000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

688 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