You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2009/01/19 03:46:59 UTC
[jira] Updated: (SM-1770) Cxf BC Provider can't handle response
soap message correctly if there is "whitespace" after tag
[ https://issues.apache.org/activemq/browse/SM-1770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Freeman Fang updated SM-1770:
-----------------------------
Description:
if there is "whitespace" after <soap:Body> tag in the response soap message of cxf bc provider
then get exception
org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.
at org.apache.xerces.dom.ParentNode.internalInsertBefore(Unknown Source)
at org.apache.xerces.dom.ParentNode.insertBefore(Unknown Source)
at org.apache.xerces.dom.CoreDocumentImpl.insertBefore(Unknown Source)
at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source)
at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:732)
at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:618)
at org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor.getBodyElement(JbiInWsdl1Interceptor.java:317)
at org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor.handleMessage(JbiInWsdl1Interceptor.java:153)
at org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor.handleMessage(JbiInWsdl1Interceptor.java:61)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:226)
at org.apache.servicemix.cxfbc.CxfBcProviderMessageObserver.onMessage(CxfBcProviderMessageObserver.java:139)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2029)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1907)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
at org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:228)
at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:540)
at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:492)
at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)
at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
That's because in the ReadHeadersInterceptor the XmlStreamReader only advance to just outside the <soap:body> opening tag, but left the whitespace, see the comment there
//advance to just outside the <soap:body> opening tag, but not
//to the nextTag as that may skip over white space that is
//important to keep for ws-security signature digests and stuff
So in the JbiInWsdl1Interceptor we need ensure the whitespace is parsed before try to read the body content.
was:
if there is "whitespace" after <soap:Body> tag in the response soap message of cxf bc provider
then get exception
org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is n
t permitted.
at org.apache.xerces.dom.ParentNode.internalInsertBefore(Unknown Source)
at org.apache.xerces.dom.ParentNode.insertBefore(Unknown Source)
at org.apache.xerces.dom.CoreDocumentImpl.insertBefore(Unknown Source)
at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source)
at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:719)
at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:605)
at org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor.getBodyElement(JbiInWsdl1
nterceptor.java:306)
That's because in the ReadHeadersInterceptor the XmlStreamReader only advance to just outside the <soap:body> opening tag, but left the whitespace, see the comment there
//advance to just outside the <soap:body> opening tag, but not
//to the nextTag as that may skip over white space that is
//important to keep for ws-security signature digests and stuff
So in the JbiInWsdl1Interceptor we need ensure the whitespace is parsed before try to read the body content.
> Cxf BC Provider can't handle response soap message correctly if there is "whitespace" after <soap:Body> tag
> -----------------------------------------------------------------------------------------------------------
>
> Key: SM-1770
> URL: https://issues.apache.org/activemq/browse/SM-1770
> Project: ServiceMix
> Issue Type: Bug
> Components: servicemix-cxf-bc
> Reporter: Freeman Fang
> Assignee: Freeman Fang
> Fix For: servicemix-cxf-bc-2008.02, 3.3.1, 3.2.4
>
>
> if there is "whitespace" after <soap:Body> tag in the response soap message of cxf bc provider
> then get exception
> org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.
> at org.apache.xerces.dom.ParentNode.internalInsertBefore(Unknown Source)
> at org.apache.xerces.dom.ParentNode.insertBefore(Unknown Source)
> at org.apache.xerces.dom.CoreDocumentImpl.insertBefore(Unknown Source)
> at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source)
> at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:732)
> at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:618)
> at org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor.getBodyElement(JbiInWsdl1Interceptor.java:317)
> at org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor.handleMessage(JbiInWsdl1Interceptor.java:153)
> at org.apache.servicemix.cxfbc.interceptors.JbiInWsdl1Interceptor.handleMessage(JbiInWsdl1Interceptor.java:61)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:226)
> at org.apache.servicemix.cxfbc.CxfBcProviderMessageObserver.onMessage(CxfBcProviderMessageObserver.java:139)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2029)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1907)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832)
> at org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:228)
> at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:540)
> at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:492)
> at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
> at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:623)
> at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
> at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
> at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> That's because in the ReadHeadersInterceptor the XmlStreamReader only advance to just outside the <soap:body> opening tag, but left the whitespace, see the comment there
> //advance to just outside the <soap:body> opening tag, but not
> //to the nextTag as that may skip over white space that is
> //important to keep for ws-security signature digests and stuff
> So in the JbiInWsdl1Interceptor we need ensure the whitespace is parsed before try to read the body content.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.