Web Services return string: An XML string

D

DotNetGruven

We have a Web Service that returns an XML string. The client is getting the
returned value with the angle brackets changed to &gt and &lt.

It looks like the 'payload' is HTML.encoded. Is that the default action of
a web service?

Is that spec'ed somewhere and can it be changed?

I suspose the client s/w just needs to HTML.unencode() it.

TIA
geo
 
A

ashelley

We have a Web Service that returns an XML string. The client is getting the
returned value with the angle brackets changed to &gt and &lt.

It looks like the 'payload' is HTML.encoded. Is that the default action of
a web service?

Is that spec'ed somewhere and can it be changed?

I suspose the client s/w just needs to HTML.unencode() it.

TIA
geo

I return xml as strings from web services with no problems. I assume
that the webservice itself is changing the string.

-Adam
 
M

[MSFT]

Hi Geo,

How did you send the XML string from your web service, with a string or
XMLNode object? Can you give a sample on this. Normally, we can pass a
XMLNode or XMLDocument object from a web service, and this won't cause such
a problem. For other objects, there may be some &gt and &lt during Web
service XML encoding.

Luke
 
D

DotNetGruven

Changing the return value of the web method from string to XmlDocument fixed
the problem.

Not only that, but the returned characters are nicely formated with great
indentation.

Thanks,
Geo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top