473,386 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Html encoding SOAP response

Is there anyway I can make my xml webservice not htmlencode the response
from a call to an API?

I have:
public int PerformOperation(string operation, out string result)

The content of result is html encoded, but since it contains valid xml,
I should get away with not htmlencoding it, or not?

<soap:Body>

<PerformOperationResponse xmlns="http://tempuri.org/">

<PerformOperationResult>

0

</PerformOperationResult>

<result>

&lt;RetrieveTreeResponse id=&quot;123&quot;&gt;

&lt;Node id=&quot;1&quot;
title=&quot;TopLevelNode1&quot;&gt;

&lt;Node id=&quot;2&quot;
title=&quot;2LevelNode1&quot; /&gt;

&lt;Node id=&quot;3&quot;
title=&quot;2LevelNode2&quot; /&gt;

&lt;/Node&gt;

&lt;Node id=&quot;4&quot;
title=&quot;TopLevelNode2&quot; /&gt;

&lt;/RetrieveTreeResponse&gt;

</result>

</PerformOperationResponse>

</soap:Body>


Nov 18 '05 #1
1 1944


Casper Hornstrup wrote:
Is there anyway I can make my xml webservice not htmlencode the response
from a call to an API?

I have:
public int PerformOperation(string operation, out string result)

The content of result is html encoded, but since it contains valid xml,
I should get away with not htmlencoding it, or not?
Try to use a parameter of type XmlNode instead of a string.
<soap:Body>

<PerformOperationResponse xmlns="http://tempuri.org/">

<PerformOperationResult>

0

</PerformOperationResult>

<result>

&lt;RetrieveTreeResponse id=&quot;123&quot;&gt;

&lt;Node id=&quot;1&quot;
title=&quot;TopLevelNode1&quot;&gt;

&lt;Node id=&quot;2&quot;
title=&quot;2LevelNode1&quot; /&gt;

&lt;Node id=&quot;3&quot;
title=&quot;2LevelNode2&quot; /&gt;

&lt;/Node&gt;

&lt;Node id=&quot;4&quot;
title=&quot;TopLevelNode2&quot; /&gt;

&lt;/RetrieveTreeResponse&gt;

</result>

</PerformOperationResponse>

</soap:Body>


--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Cantor | last post by:
Hello everyone :) I am writing some dotNET code to "consume" a web service written in PHP. So far I have been getting some error messages and PHP seems to place HTML text in front of the XML...
0
by: Kaimar Seljamäe | last post by:
Hi, I have to create a web service client which uses SOAP encoding but does not use "multi-reference" values (see http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383513 item 10). If I...
4
by: Alex Shirshov | last post by:
Hello, All! I have the following webservice Imports System.Web.Services Imports System.Xml <System.Web.Services.WebService(Namespace:="http://tempuri.org/WebApplication1/test"),...
0
by: Sergey Krutous | last post by:
Hello everybody. I'm trying to consume a web service that acccepts messages in SOAP encoding. I have two classes (Class1 and Class2) and want to serialize them into the following message:...
3
by: Sydney | last post by:
Hi, I am trying to construct a WSE 2.0 security SOAP request in VBScript on an HTML page to send off to a webservice. I think I've almost got it but I'm having an issue generating the nonce...
2
by: lprisr | last post by:
Hi, I have double byte characters in the content that I am returning using Web Services. However, the encoding in the xml file returned by Web Services is utf-8 and I am unable to read the...
0
by: raghuraman_ace | last post by:
Hi i have started a webservice wich has a webmethod with parameters using literal encoding & encoded encoding . The webservice is compiled successfully . But i don know how to pass the...
2
by: =?Utf-8?B?bW9pdGFs?= | last post by:
I have a client application ( web service ) write in vs2005 consuming an external web service with WSE 2.0 (x509). The response is in hebrew ( windows-1255 ). In the Trace files I see the hebrew...
10
by: jollysr | last post by:
Could someone please help me convert the following XML to HTML page? <?xml version="1.0" encoding="UTF-16"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.