[ 
https://issues.apache.org/jira/browse/AXIS2-4663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12880846#action_12880846
 ] 

Jonathan Whitall commented on AXIS2-4663:
-----------------------------------------

I am also experiencing this problem with WebSphere 6.1.0.29. The Sun SAAJ RI 
is, ultimately, not an option for me.

By default, CXF comes with the Sun reference implementation for SAAJ which I 
had included in my WAS application (running with a parent last classloader). 
This didn't work straight out-of-the-box because the Sun RI is hardwired to the 
Sun JRE's internal Xerces implementation (which does not come with the IBM 
JRE). When I included the Sun JAXP RI in my app, the problem went away, though 
now I was using the notoriously slow Sun StAX implementation. I fixed this by 
deleting the standard JAXP entries in META-INF/services in the JAXP RI.

So, all was going fine until we needed to do some SAML 2.0 processing. When I 
included OpenSAML 2, it doesn't even try to be compatible with the Sun JAXP RI, 
citing too many bugs to work around. It will, in fact, inspect the parser 
implementation and throw an exception if you attempt to use it. So then I tried 
ditching the SAAJ RI and replacing it with the Axis2 SAAJ implementation... and 
immediately ran into this problem.

The issue appears to stem from CXF's assumption that factory.createMessage() 
creates an empty DOM tree, when in fact Axis creates an Envelope with an empty 
Body tag. I imagine that overriding appendChild(Node) in SOAPPartImpl would 
solve the problem, but perhaps that breaks the spec? I suppose I could use my 
own factory implementation as a workaround, but I'm not exactly sure what would 
need to change.

Thoughts?

> SAAJ implementation classes do not overrride appendChild(org.w3c.dom.Node) 
> method
> ---------------------------------------------------------------------------------
>
>                 Key: AXIS2-4663
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4663
>             Project: Axis2
>          Issue Type: Bug
>          Components: saaj
>    Affects Versions: 1.5.1
>         Environment: Websphere 6.1.0.29
>            Reporter: Brice FINES
>             Fix For: 1.6
>
>
> This bug was supposedly fixed in nightly builds, but almost 2 years later it 
> still affects official releases.
> See https://issues.apache.org/jira/browse/AXIS2-3808 for more details.
> This bug prevents from using CXF versions above 2.2 in a Websphere 
> environment (when making use of SAAJ interceptors).
> It would be great to see it fixed in version 1.6.
> Meanwhile, is there a way to access Axis2 java nightly source to see how it 
> is fixed?
> Thanks in advance.
> Regards
> org.apache.cxf.common.logging.LogUtils <doLog> Interceptor for 
> {http://xxxxxxxxxxxxxxxxxxxxx}yyyyyyyyyyyy has thrown exception, unwinding now
> org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to 
> insert a node where it is not permitted. 
>       at 
> org.apache.axiom.om.impl.dom.ParentNode.insertBefore(ParentNode.java:224)
>       at org.apache.axiom.om.impl.dom.NodeImpl.appendChild(NodeImpl.java:240)
>       at org.apache.axis2.saaj.SOAPPartImpl.appendChild(SOAPPartImpl.java:989)
>       at 
> org.apache.cxf.staxutils.W3CDOMStreamWriter.setChild(W3CDOMStreamWriter.java:114)
>       at 
> org.apache.cxf.staxutils.W3CDOMStreamWriter.newChild(W3CDOMStreamWriter.java:104)
>       at 
> org.apache.cxf.staxutils.W3CDOMStreamWriter.writeStartElement(W3CDOMStreamWriter.java:132)
>       at 
> org.apache.cxf.staxutils.StaxUtils.writeStartElement(StaxUtils.java:489)
>       at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:427)
>       at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:415)
>       at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:397)
>       at 
> org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:111)
>       at 
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getSOAPMessage(WSS4JInInterceptor.java:127)
>       at 
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:161)
>       at 
> org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:78)
>       at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
>       at 
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110)
>       at 
> org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:98)
>       at 
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:423)
>       at 
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:178)
>       at 
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:142)
>       at 
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
>       at 
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>       at 
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
>       at 
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
>       at 
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087)
>       at 
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
>       at 
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
>       at 
> org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
>       at 
> org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
>       at 
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
>       at 
> org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
>       at 
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>       at 
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
>       at 
> org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
>       at 
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>       at 
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
>       at 
> org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
>       at 
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>       at 
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
>       at 
> org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
>       at 
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
>       at 
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
>       at 
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
>       at 
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
>       at 
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
>       at 
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:837)
>       at 
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:680)
>       at 
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
>       at 
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:525)
>       at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3548)
>       at 
> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
>       at 
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:818)
>       at 
> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
>       at 
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:126)
>       at 
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
>       at 
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
>       at 
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
>       at 
> com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
>       at 
> com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
>       at 
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
>       at 
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
>       at 
> com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
>       at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
>       at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
>       at 
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
>       at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
>       at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to