Hi,
Okay, but you are now discussing a sligtly different topic.
You might want to inspect what is actualy sent on the wire.
You may find that & is sent encoded/decodedas &
Also, according to
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
& and < are valid characters as they have a Unicode code point > 0x20 , so
the wouldn't throw the same
type of error as for the original problem of 0x19
On 12/12/06, spamsucks <[EMAIL PROTECTED]> wrote:
Wayne,
In the spec, "The ampersand character (&) and the left angle bracket (<)
MUST NOT appear in their literal form"
However, if i send an ampersand character, the serializer escapes it. The
following runs fine, although it contains bad characters:
System.out.println(service.echo ("&bad" );
Why is it okay for us to escape some bad characters, and not other bad
characters?
I do like to argue;)
Phillip
----- Original Message -----
From: Wayne Keenan
To: [email protected]
Sent: Tuesday, December 12, 2006 11:10 AM
Subject: Re: [xfire-user] Simple Test Case and Invalid white space
character
(0x19)
Hi,
It's not a bug, the w3 consortium's XML spec doesn't allow it, please take
a
look at the XML specification:
http://www.w3.org/TR/REC-xml/#charsets
As you can see 0x19 is not included in the 'Char' list and a XML parser
should not accept nor generate it.
A XML conformance test suite explicitly ensures that the low (i.e. <0x20)
characters are rejected by the parser under test.
e.g. for Xerces see:
http://xmlconf.sourceforge.net/xml/reports/report-xerces-cnv.html
#1 switching to parser X may work intitially, but if/when the writers of
parser X make parser X conformant it will 'break' your app,
#2 probably and
#3 probably better.
regards
Wayne
On 12/12/06, spamsucks <[EMAIL PROTECTED] > wrote:
From my research, I am considering 3 options:
1) Would a switch from from woodstox to fast infoset be recommended as a
workaround ?
2) Could I implement a handler that would do string substitution? Does
anyone have an example of adding a handler and springframework?
3) Modify 70+ pojo setters/getters to clean the data as it is set in the
pojo so that it's clean when sent?
I would appreciate your thoughts on which of the 3 choices you would make.
Backgrounder:
Using the "echo" type of web service, I can generate the error on the
client
send of a string that has this whitespace character. Stacktrace is at the
bottom of the email.
char c = (char)0x19;
StringBuffer sb = new StringBuffer();
sb.append(c);
System.out.println(service.echo ("bad " + sb.toString()));
Personally, I think this is a bug, I should not be concerned if my pojo
properties/Strings are valid xml data or not, they are just strings. I
think the serializer should escape these whitespace characters just as it
does other characters (i.e. &, <, >), but such is life and at the end of
the
day, my project has to be working.
org.codehaus.xfire.XFireRuntimeException: Could not invoke service..
Nested
exception is org.codehaus.xfire.fault.XFireFault: Error writing document..
Nested exception is com.ctc.wstx.exc.WstxIOException: Invalid white space
character (0x19) in text to output
org.codehaus.xfire.fault.XFireFault : Error writing document.. Nested
exception is com.ctc.wstx.exc.WstxIOException: Invalid white space
character
(0x19) in text to output
at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at org.codehaus.xfire.client.Client.invoke(Client.java:335)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke (XFireProxy.java:57)
at $Proxy45.echo(Unknown Source)
at
com.reffects.dmiserviceclient.DMIServiceClient.simpleTest(
DMIServiceClient.java:96)
at
com.reffects.dmiserviceclient.DMIServiceClient.main(DMIServiceClient.java
:67)
Caused by: org.codehaus.xfire.XFireRuntimeException: Error writing
document.. Nested exception is com.ctc.wstx.exc.WstxIOException: Invalid
white space character (0x19) in text to output at
org.codehaus.xfire.aegis.stax.ElementWriter.writeValue
(ElementWriter.java:142)
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email