axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pobzeb Armerding <pobzeb.armerd...@vanns.net>
Subject Re: Illegal XML character
Date Tue, 15 Nov 2005 17:42:32 GMT
Sorry about that, I guess I should not assume that because you are using axis, you are also
using Java.  Unfortunately, my C++ skills are far inferior to my Java skills and I will not
be able to offer any suggestions.

Pobzeb Armerding
Vann's Inc.
Software Engineer

On Tue, 15 Nov 2005 11:38:41 -0600, Michael Rudolf wrote:
| Thanks for the quick reply. I guess that would work but
| iunfortunately my server is written in C++ using gsoap. Ill try to
| find out if i can do something similar in that case. Thanks! Michael
|
|| You could just URLEncode your string values as you add them to
|| your xml.  For example:
||
|| String xmlMessage = "Some XML Message with any character types";
|| element.addTextNode(java.net.URLEncoder.encode(xmlMessage));
||
|| I know that the syntax for adding a text node might not work as I
|| have written it, but the encoding will.  Also, in later versions
|| of Java, the encode method has been deprecated and replaced with:
||
|| encode(String text, String characterEncoding)
||
|| so you would use:
||
|| String xmlMessage = "Some XML Message with any character types";
|| element.addTextNode(java.net.URLEncoder.encode(xmlMessage), "UTF-
|| 8");
||
|| or something similar.  I hope this helps.
||
|| Pobzeb Armerding
|| Vann's Inc.
|| Software Engineer
||
|| On Tue, 15 Nov 2005 10:50:46 -0600, Michael Rudolf wrote:
||
||| Hi,
||| i would like to know how i can find out which characters are
||| illegal for WS transmission. I only get messages like Unicode
||| 0x11 but i dunno which char the problem is. Thanks! Michael

Mime
View raw message