Dont know if this is a "best practice", but it works for me, Send it back
via another class. but make sure the secondary class is not the first one
within the namespace, VS.net doesn't like that, it'll say, "The Class
Service1 can be designed, but it is not the first class in the file", so
make sure its something like this:
public class Service1 : System.Web.Services.WebService
public URLstr ReturnMyURL()
URLstr ustring = new URLstr();
ustring.somestring = "ewws.example.com";
public class URLstr
public string somestring;
Output I got:
<?xml version="1.0" encoding="utf-8" ?>
- <URLstr xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Hope this helps.
"Christopher Ambler" <chrisambler.net> wrote in message
news:eH2l3cWfDHA.2364TK2MSFTNGP09.phx.gbl...string,> When I create a web service, and create a web method that returns a> the output is always framed within a tag that looks like:
> <string xmlns="http://ewws.example.com/"> </string>
> What I'd really like to do is eliminate this string and form my own XML to
> send back.
> Is this possible?