Forum Discussion

Jesse_Erdmann's avatar
17 years ago

Null Pointer Exception generating Signature

I'm a new user to SoapUI and I'm having a bit of trouble with the WS-Security pieces.  I've imported a deployed WSDL and generated all of the requests and basic test case.  I added a keystore and an Outbound WSS to the project to encrypt and sign one of the outbound requests.  I enabled the Outbound WSS profile for one of the methods and attempted to send the message.  The error log shows a NullPointerException coming from org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:686).

There is a secondary NullPointerException in the log (not sure if its the cause or not because the "Caused by:" text doesn't appear in the window) that indicates the point of failure to be org.apache.ws.security.message.WSSecEncrypt.prepare(WSSecEncrypt.java:233)

On the OSS Configuration I have set the keystore and alias, the Key Identifier Type to X509 and left the rest of the defaults for the signature.

Any suggestions?  Thanks!

3 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    this is usually because the configuration is incomplete somehow.. can you attach a screenshot of the signature configuration panel so I can see all your settings?

    regards!

    /Ole
    eviware.com
  • soapui's avatar
    soapui
    New Contributor
    hi forum,

    i'm getting the same nullpointerexception (see below for full stack trace).

    although the screenshots show "Issuer Name and Serial Number" or "Binary Security Token" or whatever, i've tried just about every available option in that "Key Identifier Type" dropdown - with the same result: NullpointerException!

    please, can anybody help get soapui's ws-security stuff to work?

    thanks in advance for your help.


    =================

    Thu May 07 23:29:17 BST 2009:ERROR:java.lang.NullPointerException
      java.lang.NullPointerException
      at org.apache.ws.security.message.WSSecEncrypt.addInternalRefElement(WSSecEncrypt.java:418)
      at org.apache.ws.security.message.WSSecEncrypt.build(WSSecEncrypt.java:314)
      at com.eviware.soapui.impl.wsdl.support.wss.entries.AddEncryptionEntry.process(AddEncryptionEntry.java:292)
      at com.eviware.soapui.impl.wsdl.support.wss.OutgoingWss.processOutgoing(OutgoingWss.java:156)
      at com.eviware.soapui.impl.wsdl.actions.request.ApplyOutgoingWSSToRequestAction.actionPerformed(ApplyOutgoingWSSToRequestAction.java:55)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
      at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
      at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225)
      at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266)
      at java.awt.Component.processMouseEvent(Component.java:6216)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
      at java.awt.Component.processEvent(Component.java:5981)
      at java.awt.Container.processEvent(Container.java:2041)
      at java.awt.Component.dispatchEventImpl(Component.java:4583)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Component.dispatchEvent(Component.java:4413)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
      at java.awt.Container.dispatchEventImpl(Container.java:2085)
      at java.awt.Window.dispatchEventImpl(Window.java:2475)
      at java.awt.Component.dispatchEvent(Component.java:4413)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)