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 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to