Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3871

NPE is thrown when ws-addr is configured using policy and ws-addr Action is absent

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.3.7, 2.4.3
    • 2.5, 2.4.4, 2.3.8
    • WS-* Components
    • None
    • Unknown

    Description

      When using ws-policy to configure ws-addressing and when the addressing's Action is not correctly given (e.g., the Action is not set or the namespace is given incorrectly), an NPE is thrown from ws-a's ContextUtils' getAction method shown below (using trunk):

      Caused by: java.lang.NullPointerException
      at org.apache.cxf.ws.addressing.ContextUtils.getAction(ContextUtils.java:921)
      at org.apache.cxf.ws.addressing.ContextUtils.getActionFromMessageAttributes(ContextUtils.java:896)
      at org.apache.cxf.ws.addressing.ContextUtils.getActionFromServiceModel(ContextUtils.java:832)
      at org.apache.cxf.ws.addressing.ContextUtils.getAction(ContextUtils.java:800)
      at org.apache.cxf.ws.addressing.MAPAggregator.assembleGeneric(MAPAggregator.java:687)
      at org.apache.cxf.ws.addressing.MAPAggregator.aggregate(MAPAggregator.java:660)
      at org.apache.cxf.ws.addressing.MAPAggregator.mediate(MAPAggregator.java:515)
      at org.apache.cxf.ws.addressing.MAPAggregator.handleMessage(MAPAggregator.java:228)

      Instead, in this case, a null should be returned from this method so that the subsequent fallback logic gets the addressing action value from the soap action value.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ay Akitoshi Yoshida
            ay Akitoshi Yoshida
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment