Hi,

We're integrating with an external provider that is sending their full
stacktrace back to us in their SoapFault (yes, I'm not kidding).
This causes the StaxInInterceptor to fail, or rather the XML parsing part,
since the reader used by Stax only gets 4000 bytes of data before trying to
validate the XML and since the tag is larger than that is fails with the
exception below.
We've found a workaround by inserting a CorrectingStaxInInterceptor that
creates a different XMLInputFactory and sets the
"com.ctc.wstx.inputBufferLength" property to a larger value and that seems
to work.
Is there a way to set this property in any other way? Browsing the CXF and
STAX code there is no obvious way. 

Stacktrace:

Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected end of input block
in start tag
 at [row,col {unknown-source}]: [1,4000]
        at
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOB(StreamScanner.java:700)
        at
com.ctc.wstx.sr.StreamScanner.loadMoreFromCurrent(StreamScanner.java:1054)
        at
com.ctc.wstx.sr.StreamScanner.getNextCharFromCurrent(StreamScanner.java:811)
        at
com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:3003)
        at
com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2936)
        at
com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2848)
        at
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
        at
org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:849)
        at
org.apache.cxf.staxutils.StaxUtils.startElement(StaxUtils.java:771)
        at
org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:808)
        at
org.apache.cxf.staxutils.StaxUtils.startElement(StaxUtils.java:771)
        at
org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:808)
        at
org.apache.cxf.staxutils.StaxUtils.startElement(StaxUtils.java:771)
        at
org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:808)
        at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:708)
        at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:66)

-- 
View this message in context: 
http://cxf.547215.n5.nabble.com/Stax-exception-for-extremely-large-content-in-tag-tp2805384p2805384.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Reply via email to