python748 / alternate-java-bridge-library

Automatically exported from code.google.com/p/alternate-java-bridge-library
Apache License 2.0
0 stars 0 forks source link

& (Ampersand) coming through as "&" in SoapResponse #159

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use the SoapClient to retrieve a json string from a webservice
2. Make sure that webservice sends a string that has an ampersand in it, like 
"This & That"
3. The SoapResponse reports any "&" as "&". for example "This & That"

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Latest jar

Please provide any additional information below.
This has been happening for some time, thought it was my bug and just got 
around to looking at it now, it is definitely coming in from the soap response 
with the bug

Original issue reported on code.google.com by bric...@gmail.com on 17 May 2013 at 1:18

GoogleCodeExporter commented 8 years ago
Have you tried Html.fromHtml(response).toString() ?

Original comment by IMPINC...@gmail.com on 19 May 2013 at 10:58

GoogleCodeExporter commented 8 years ago
No, I will try that tomorrow

Original comment by bric...@gmail.com on 20 May 2013 at 3:31

GoogleCodeExporter commented 8 years ago
That did not help, still getting & for every ampersand

Original comment by bric...@gmail.com on 20 May 2013 at 1:00

GoogleCodeExporter commented 8 years ago
I take it back, that did solve the problem.  Thanks!

Original comment by bric...@gmail.com on 20 May 2013 at 1:08

GoogleCodeExporter commented 8 years ago
I added the Response(stripHtml) method to the SoapClient class, which when set 
to true, will run Html.fromHtml(response).toString automatically. This will not 
change the response the component has saved (if you call Response again set to 
false, it will return the original unchanged response).

I also added the SOAP_RESPONSE event to the Events class.

Original comment by IMPINC...@gmail.com on 21 May 2013 at 5:51

GoogleCodeExporter commented 8 years ago

Original comment by IMPINC...@gmail.com on 30 May 2013 at 12:46