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

SoapTransportFactory: confused exception by unknown transport protocol

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

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.5
    • 2.3.8, 2.4.5, 2.5.1
    • Core
    • None
    • Windows

    • Unknown

    Description

      If custom transport conduit is resolved via SoapTransportFactory.getConduit(EndpointInfo ei) and transport is not found in ConduitInitiatorManager, following exception is thrown:

      java.lang.NullPointerException
      at org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactor
      y.java:228)[131:org.apache.cxf.bundle:2.4.2]

      The reason is following: ConduitInitiatorManager.getConduitInitiatorForUri() doesn't throw BusException in case if transport is not found, therefore line "return conduitInit.getConduit(ei)" throws NPE.

      I see two possible solutions:
      A) throw BusException in ConduitInitiatorManager.getConduitInitiatorForUri() in the same way as ConduitInitiatorManager.getConduitInitiator()
      B) Check for null in SoapTransportFactory

      (A) is risky, because it has invluence on all calls of ConduitInitiatorManager.getConduitInitiatorForUri()
      Patch for (B) is attached.

      Attachments

        Activity

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

          People

            dkulp Daniel Kulp
            ashakirin Andrei Shakirin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment