You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Rainer Menzner <rm...@L1id.com> on 2006/12/21 14:26:32 UTC

[axis2.1] java.lang.RuntimeException: Can not serialize OM Element Envelope / Char '\u001f'

Hi,

I get the error "java.lang.RuntimeException: Can not serialize OM 
Element Envelope" when my webservice returns a string which contains the 
character '\u001f' (an AN2K unit separator).
Although this is not a typical printable character, I would expect that 
it is accepted in UTF-1 soap messages.

Is there a workaround? Your comments are greatly appreciated.

Thanks and best regards,
-Rainer



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [axis2.1] java.lang.RuntimeException: Can not serialize OM Element Envelope / Char '\u001f'

Posted by Javier Kohen <jk...@users.sourceforge.net>.
El jue, 21-12-2006 a las 14:26 +0100, Rainer Menzner escribió:
> Hi,
> 
> I get the error "java.lang.RuntimeException: Can not serialize OM 
> Element Envelope" when my webservice returns a string which contains the 
> character '\u001f' (an AN2K unit separator).
> Although this is not a typical printable character, I would expect that 
> it is accepted in UTF-1 soap messages.

That character is not allowed by XML 1.0. The range of allowed
characters as defined in XML 1.0 4th edition §2.2
(http://www.w3.org/TR/REC-xml/#charsets) is:

[2]   Char   ::=   #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] |
[#x10000-#x10FFFF]/* any Unicode character, excluding the surrogate
blocks, FFFE, and FFFF. */

> Is there a workaround? Your comments are greatly appreciated.

Base64 or binary encoding is the best I can think of. Or just don't pass
that character if you want to keep your XML "human-readable."

Greetings,
-- 
Javier Kohen <jk...@users.sourceforge.net>
ICQ: blashyrkh #2361802
Jabber: jkohen@jabber.org