If you're clients are not .NET clients, it's still possible to return custom
classes for example. So if your only concern is interoperability you may
want to check out these as well.
Concerning your question, you can return an XMLDocument. Here's an example:
http://www.xmlwebservices.cc/index_Samples.htm
Source:
<!--StartFragment--><%@ WebService Language="vb" Class="XMLTest" %>
Imports System.Web.Services
Imports System.Xml
Imports System.Xml.Serialization
<WebService(Namespace:="http://eyesoft.de/webservices/")> _
Public Class XMLTest
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function _
GetXML() As System.Xml.XmlDocument
Dim myXML As New XmlDocument()
myXML.Load(Server.MapPath(".\") & "AddrBook.xml")
GetXML = myXML
End Function
End Class
--
Greetz
Jan Tielens
________________________________
Read my weblog:
http://weblogs.asp.net/jan
"Mahesha" <> wrote in message
news: m...
> Hello,
> I want to write a .net webservice which returns the data as a xml.
> I get this xml from a dataset by calling GetXml method.This web
> service will be used by clients who donot use .net or microsoft
> platforms. This size of the xml string could be quite big.I would like
> to know whats the best method to return the data.
>
> a)Should I just return this xml as a string from my webservice.
> b)Is there a better efficient approach to handle this using SOAP.
>
> I'm a newbie and it would be great if someone could direct me to a
> tutorial/link which can help me on this.
>
> Regards,
> Mahesha