Uploaded image for project: 'Woden'
  1. Woden
  2. WODEN-189

NPE when interface extension used with Element API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • M8
    • None
    • None

    Description

      A null pointer exception can occur when the Element API is used with WSDL that contains interface extension. This is because the Element API implementation for handling interface extension reuses some of the code written to support the Component API, but that code requires that the Component model is properly initialized. Specifically, it requires that all Interfaces have a reference to their containing Description. The initialization of this reference occurs during correct use of the Component API. However, if the Element API is used prior to the Component API this reference is uninitialized and a NPE will occur.

      This problem was discovered running the Storage-4G testcase from the W3C WSDL 2.0 test suite standalone in a Woden test client. The document validator attempts to resolve the InterfaceFaultElement for an InterfaceFaultReferenceElement and in doing so the Woden implementation uses the above mentioned interface extension code. The component model has not been initialized at this time (this happens next when the component validator is invoked), so the NPE is thrown in InterfaceImpl.getExtendedInterface(QName) because the Description reference is null.

      A solution is to ensure the component model is initialized as early as possible.

      Attachments

        1. woden189_DescriptionImpl.patch
          1.0 kB
          John Alan William Kaputin

        Activity

          People

            jkaputin John Alan William Kaputin
            jkaputin John Alan William Kaputin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: