#635 NullPointerException when using SAML 2 assertion

open
nobody
general (369)
5
2012-08-23
2012-08-23
Anonymous
No

When configured to use a valid SAML 2 assertion using the "SAML (XML)" method, SoapUI throws a NullPointerException when applying the security configuration to the request. After browsing the SoapUI forums a bit I ran across a thread on the issue (http://www.eviware.com/forum/viewtopic.php?f=13&t=14823).

Per the recommendation of the thread, I downloaded the latest version of WSS4J (1.6.7) and copied the wss4j and xmlsec libraries into SoapUI's lib directory and edited the soapui.sh to launch them and now everything works correctly.

Below is the stack trace I was receiving:

2012-08-23 08:36:14,105 ERROR [SoapUI] An error occured [java.lang.NullPointerException], see error log for details
2012-08-23 08:36:14,106 ERROR [errorlog] java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.xml.security.signature.Manifest.generateDigestValues(Unknown Source)
at org.apache.xml.security.signature.XMLSignature.sign(Unknown Source)
at org.opensaml.xml.signature.Signer.signObject(Signer.java:76)
at org.apache.ws.security.saml.ext.OpenSAMLUtil.toDom(OpenSAMLUtil.java:129)
at org.apache.ws.security.saml.ext.AssertionWrapper.toDOM(AssertionWrapper.java:373)
at org.apache.ws.security.message.WSSecSAMLToken.prependToHeader(WSSecSAMLToken.java:82)
at org.apache.ws.security.message.WSSecSAMLToken.build(WSSecSAMLToken.java:118)
at com.eviware.soapui.impl.wsdl.support.wss.entries.ManualSAMLEntry.process(ManualSAMLEntry.java:114)
at com.eviware.soapui.impl.wsdl.support.wss.OutgoingWss.processOutgoing(OutgoingWss.java:192)
at com.eviware.soapui.impl.wsdl.actions.request.ApplyOutgoingWSSToRequestAction.actionPerformed(ApplyOutgoingWSSToRequestAction.java:55)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:137)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6375)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6140)
at java.awt.Container.processEvent(Container.java:2083)
at java.awt.Component.dispatchEventImpl(Component.java:4737)
at java.awt.Container.dispatchEventImpl(Container.java:2141)
at java.awt.Component.dispatchEvent(Component.java:4565)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4619)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4280)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4210)
at java.awt.Container.dispatchEventImpl(Container.java:2127)
at java.awt.Window.dispatchEventImpl(Window.java:2482)
at java.awt.Component.dispatchEvent(Component.java:4565)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:684)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:643)
at java.awt.EventQueue$1.run(EventQueue.java:641)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:657)
at java.awt.EventQueue$2.run(EventQueue.java:655)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:654)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Thanks for all your excellent work!!

Discussion


  • Anonymous
    2012-08-23

    • priority: 5 --> 9
     
    Last edit: Anonymous 2014-03-20

  • Anonymous
    2012-08-23

    • priority: 9 --> 5
     

  • Anonymous
    2012-08-23

    Hi,

    I have created a ticket for upgrading to latest wss4j. Thanks.

    regards!
    Predrag
    SmartBear Software