cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Configuring CXF to expect XML 1.1
Date Fri, 30 Mar 2012 09:50:34 GMT
I feel it should be submitted as an enhancement request to Woodstox,

according to http://www.w3.org/TR/xml11/#sec-xml11,

"XML 1.0 processors must continue to reject documents that contain new 
characters in XML names, new line-end conventions, and references to 
control characters."

which I guess they do with XML 1.0 too, thus version='1.1' in the 
processing instruction should not block them from processing the XML 1.0 
compatible payloads

Sergey

On 30/03/12 02:56, BillJames@Q wrote:
> 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
> {http://xxxxxx.com}ChangeRequestWebService#{http://xxxxxx.com/ChangeRequestWebService}GetChangeRequestById
> has thrown exception, unwinding now
>      [com.ctc.wstx.exc.WstxLazyException]
> 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: http://cxf.547215.n5.nabble.com/Configuring-CXF-to-expect-XML-1-1-tp5605504p5605504.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Mime
View raw message