[
https://issues.apache.org/jira/browse/AXIOM-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461522#comment-13461522
]
Brian Reinhold commented on AXIOM-439:
--------------------------------------
Okay, I think I updated the project correctly. I certainly do get a different
exception. With the full-fledged example (obtain the SAML token via STS and
then have Rampart/Axis2 generate the secure SOAP message with the SAML token
from the STS) the exception now appears as follows:
nullorg.apache.axiom.om.NodeUnavailableException
at
org.apache.axiom.om.impl.common.OMContainerHelper.getFirstOMChild(OMContainerHelper.java:177)
at
org.apache.axiom.om.impl.dom.ParentNode.getFirstOMChild(ParentNode.java:126)
at
org.apache.axiom.om.impl.dom.ParentNode.getFirstChild(ParentNode.java:185)
at
org.apache.axiom.om.impl.dom.DocumentImpl.importNode(DocumentImpl.java:352)
at
org.apache.rampart.util.RampartUtil.appendChildToSecHeader(RampartUtil.java:826)
at
org.apache.rampart.util.RampartUtil.insertSiblingAfter(RampartUtil.java:834)
at
org.apache.rampart.builder.BindingBuilder.handleSupportingTokens(BindingBuilder.java:381)
at
org.apache.rampart.builder.TransportBindingBuilder.build(TransportBindingBuilder.java:148)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:140)
at
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
That definitely is more informative than 'unexpected end of document.' I do
know the problem arises when Rampart attempts to insert the SAML token into the
security header. I suppose a first guess is that the SAML token (in its saved
form) is somehow corrupted or improperly extracted or improperly deserialized
into the appropriate object when obtained from the TokenStore object. The token
itself is so complicated I have not yet been able to determine what (if
anything) is wrong with it by examining it in the debugger.
The simplified program where I place the SAML token into the TokenStore works
as it should.
> Reporting unexpected END OF DOCUMENT
> ------------------------------------
>
> Key: AXIOM-439
> URL: https://issues.apache.org/jira/browse/AXIOM-439
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.13
> Environment: Axis2 Rampart running in Tomcat
> Reporter: Brian Reinhold
> Assignee: Andreas Veithen
> Fix For: 1.2.14
>
> Attachments: BaseManagerWan_SecureAxis2SendTest.zip, request.xml,
> sendToWan.xml
>
>
> Handling an XML SOAP document on the client that worked with Axis2 version
> 1.5.2, Axiom 1.2.9, Rampart 1.5.1 now throws an OMException "Unexpected
> END_DOCUMENT event" when Axis2 and Rampart is updated to 1.6.2 and Axiom is
> updated to all of the versions above. The 1.2.14 version is especially
> important due to a fix for Rampart on the server side.
> The stack trace is as follows. Attached is the SOAP document as picked up on
> the wire using Wireshark when using the working versions of the above
> libraries. The source code is otherwise unchanged between the the usages of
> the various libraries. I have replaced the SOAP body with the simple text
> string "Hi" to make sure it was not something ugly in the PCD-01 body and the
> error still occurs. The SAML token is generated by the Rampart STS service
> and is generated identically in both the 1.6.2 and 1.5.1 versions.
> org.apache.axiom.om.OMException: Unexpected END_DOCUMENT event
> at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:660)
> at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:189)
> at
> org.apache.axiom.om.impl.dom.OMContainerHelper.buildNext(OMContainerHelper.java:162)
> at
> org.apache.axiom.om.impl.dom.OMContainerHelper.getFirstOMChild(OMContainerHelper.java:174)
> at
> org.apache.axiom.om.impl.dom.ParentNode.getFirstOMChild(ParentNode.java:126)
> at
> org.apache.axiom.om.impl.dom.ParentNode.getFirstChild(ParentNode.java:185)
> at
> org.apache.axiom.om.impl.dom.DocumentImpl.importNode(DocumentImpl.java:352)
> at
> org.apache.axiom.om.impl.dom.DocumentImpl.importNode(DocumentImpl.java:354)
> at
> org.apache.rampart.util.RampartUtil.appendChildToSecHeader(RampartUtil.java:826)
> at
> org.apache.rampart.util.RampartUtil.insertSiblingAfter(RampartUtil.java:834)
> at
> org.apache.rampart.builder.BindingBuilder.handleSupportingTokens(BindingBuilder.java:380)
> at
> org.apache.rampart.builder.TransportBindingBuilder.build(TransportBindingBuilder.java:148)
> at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:140)
> at
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
> at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
> at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
> at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
> at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
> at
> com.lampreynetworks.ahd.wan.sender.axis2.SecureAxis2WanSender.sendDocument(SecureAxis2WanSender.java:113)
> at
> BaseManagerWan_SecureAxis2Send$3.documentClosed(BaseManagerWan_SecureAxis2Send.java:142)
> at
> com.lampreynetworks.ahd.pcd.document.PanToPcdTranslator.documentFinished(PanToPcdTranslator.java:223)
> at
> com.lampreynetworks.ahd.pcd.document.PanToPcdTranslator.notifyStateChange(PanToPcdTranslator.java:208)
> at
> com.lampreynetworks.ahd.oxp.manager.FiniteStateMachine.setState(FiniteStateMachine.java:415)
> at
> com.lampreynetworks.ahd.oxp.manager.FiniteStateMachine.access$4(FiniteStateMachine.java:373)
> at
> com.lampreynetworks.ahd.oxp.manager.FiniteStateMachine$ApduFilter.receive(FiniteStateMachine.java:811)
> at
> com.lampreynetworks.ahd.oxp.manager.FiniteStateMachine$ApduFilter.receive(FiniteStateMachine.java:1)
> at com.lampreynetworks.ahd.oxp.Asn$RlrqApdu.dispatch(Asn.java:7092)
> at
> com.lampreynetworks.ahd.oxp.manager.FiniteStateMachine.filterApdu(FiniteStateMachine.java:316)
> at
> com.lampreynetworks.ahd.oxp.manager.FiniteStateMachine.receiveApdu(FiniteStateMachine.java:186)
> at sockettcp.SocketTcpNexus$1.run(SocketTcpNexus.java:104)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]