Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.aspnet.webservices
return types
Rein Petersen
1/14/2003 5:42:00 AM
Hi Folks,
I'm having a good experience with Web services and ASP.NET however, I'd like
to return data other than a string or some other basic type. Ideally, I'd
like to return an XML document but if the method return type is string, the
enclosed data (which is xml) is escaped. An example response looks like:
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="
http://myDomain.com/webservices"&g...
version="1.0"
encoding="iso-8859-1"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 1.0//EN"
"
http://www.wapforum.org/DTD/pap_1.0.dtd...
<pap>
<push-message push-id="test"
deliver-before-timestamp="2003-01-15T04:33:09Z"
deliver-after-timestamp="2003-01-14T04:33:09Z" source-reference="test">
<address address-value="55555" />
</push-message>
</pap></string>
Really, its just a web service proxy that I've built (which returns the
response document from another service) so it would be better is I could do
away with the xml wrapper that my service adds.
Any suggestions?
Rein
1 Answer
Pierre Greborio
1/14/2003 9:33:00 AM
0
Hi Rein,
in your case I suggest to retun an instance of class, so that it is easier
to use at client side also. If you can't do it, you could use
System.Web.HttpUtilty.HtmlDecode.
Pierre
--
-----------------------------------------------------------
Pierre Greborio
http://www.ugi...
-----------------------------------------------------------
"Rein Petersen" <rmpetersen@hotmail.bogus.com> wrote in message
news:uXtuu74uCHA.1656@TK2MSFTNGP09...
> Hi Folks,
>
> I'm having a good experience with Web services and ASP.NET however, I'd
like
> to return data other than a string or some other basic type. Ideally, I'd
> like to return an XML document but if the method return type is string,
the
> enclosed data (which is xml) is escaped. An example response looks like:
>
> <?xml version="1.0" encoding="utf-8"?>
> <string xmlns="
http://myDomain.com/webservices"&g...
version="1.0"
> encoding="iso-8859-1"?>
> <!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 1.0//EN"
> "
http://www.wapforum.org/DTD/pap_1.0.dtd...
> <pap>
> <push-message push-id="test"
> deliver-before-timestamp="2003-01-15T04:33:09Z"
> deliver-after-timestamp="2003-01-14T04:33:09Z" source-reference="test">
> <address address-value="55555" />
> </push-message>
> </pap></string>
>
> Really, its just a web service proxy that I've built (which returns the
> response document from another service) so it would be better is I could
do
> away with the xml wrapper that my service adds.
>
> Any suggestions?
>
> Rein
>
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
return types
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password