Uploaded image for project: 'WSS4J'
  1. WSS4J
  2. WSS-205

WSS4J Handler passes null to MessageContext.setProperty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.7, 1.5.8
    • 1.5.9, 1.6
    • WSS4J Handlers
    • None
    • IBM WebSphere Application Server v6, IBM WebServices Engine

    Description

      WSS4JHandler cannot be used in an IBM WebSphere web services engine runtime because it attempts to set a MessageContext property to null instead of calling MessageContext.removeProperty(). Doing so raises an exception while using UsernameToken (perhaps more) functionality with the WebSphere error "WSWS3211E: Error: Null property value specified."

      I was able to track this down in a debugger session to (WSS4J 1.5.7, 1.5.8) WSS4JHandler, line 314:

      mc.setProperty(WSHandlerConstants.SND_SECURITY, null);

      As it turns out, the WebSphere implementation of MessageContext is a descendant of java.util.Hashtable, which does not allow null values.

      I will attach a patch (passes all unit tests in the maven2 build) with a proposed fix, which is to use MessageContext.removeProperty() instead of setProperty(..., null).

      Attachments

        1. wss4jhandler1_5_8_patch_sheaberlin.txt
          0.7 kB
          Scott Heaberlin

        Activity

          People

            coheigea Colm O hEigeartaigh
            sheaberlin Scott Heaberlin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: