cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BillJames@Q" <>
Subject Configuring CXF to expect XML 1.1
Date Fri, 30 Mar 2012 01:56:25 GMT
I'm using CXF to generate an interface to a .NET web service client. 
However, sometimes when I use the client, I get an error:

    WARNING: Interceptor for
has thrown exception, unwinding now
com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion
character (code 0x1b
     at [row,col {unknown-source}]: [76,44]

>From many other sources online, it's obvious that this is because the
webservice is encoding its response in XML 1.1, while my CXF client is
reading that response expecting XML 1.0, and the special character 0x1b is
illegal in XML 1.0.  Now, I don't want to argue about whether the .NET
service *should* be using XML 1.1 in its response, when the WSDL is
obviously 1.0 (since that's the spec).  I just want to be able to read what
they send without errors.

Looking at the dependencies in the CXF client, they use WoodStox 4.1.1 which
(from their site) clearly supports XML 1.1.  **What I want to know is, is
there any way to configure my CXF client (via binding at wsdl2java time, or
during run-time) to use an XML 1.1 parser when receiving responses?**  All I
can find is people saying that they shouldn't be using 1.1, or having the
server-side filter these characters.  Note that I can't filter the
characters client-side, as I have to send the data back to the server, and
validation would fail.

As an alternative, I suppose the .NET service could in some fashion SPECIFY
that they're using XML 1.1 in their response, but I don't control that
service, so it would be more troublesome to figure out their problem for
them and then suggest they fix it.  Plus, the data they're sending is in a
DB, so it's not the web service's fault that it has XML 1.1-only characters
in it.

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message