Solved

Send xml from Web Service response

Posted on 2009-04-14
2
204 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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