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

CXF wsdl2java NPE's if it cannot find the wsdl:portType identified by a wsdl:binding

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.2
    • 2.0.3
    • None
    • None
    • Moderate

    Description

      If a user accidentally gives a wrong portType name in the wsdl:binding section, wsdl2java returns a NullPointerException without giving the user any feedback why. For example, for this portType:

      <wsdl:portType name="HelloWorldPortType">
      .....
      </wsdl:portType>

      The name should be tns:HelloWorldPortType in the binding:

      <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorldPortType">
      .....
      </wsdl:binding>

      But if the user accidentally has this in the WSDL:

      <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld"> (wrong type given)
      .....
      </wsdl:binding>

      wsdl2java will return an NPE without any feedback about what the problem is.

      GlassFish Metro correctly returns a user-friendly error message under these circumstances:
      wsdl:portType "

      {http://company.hw.demo/}

      HelloWorld" not found in the wsdl: file:/blah/blah/blah/helloWorld.wsdl

      Attachments

        Activity

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

          People

            maomaode maomaode
            mazzag Glen Mazza
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment