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

CXF uses wsdl4j implementation classes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.3
    • 2.4.5, 2.5.1
    • CORBA Binding, Core
    • Built with JDK 1.6.

    • Novice

    Description

      WSDLFactory as provided by wsdl4j-1.6.2.jar allows for a different factory implementation to be used. However, there are parts of the CXF codebase that are hardcoded to use the default implementation (i.e. that which is provided by wsdl4j). There are only a few places where this happens, and it seems that there are more general ways to accomplish the same things. It also hinders those who need to use a different implementation than is provided by wsdl4j.

      I am including a patch which fixes these issues.

      In rt/core:

      • cxf/endpoint/ClientImpl.java: using SOAPBinding interface for casting instead of SOAPBindingImpl. (getTransportURI is defined for both).
      • cxf/wsdl11/ServiceWSDLBuilder.java: get Schema implementations by ExtensionRegistry.createExtension mechanism, instead of calling new SchemaImpl().
      • cxf/wsdl11/WSDLManagerImpl.java: create entries for MimePart.class by copying them from BindingInput.class entries in the registry, instead of hardcoding them to use SOAPHeaderImpl and SOAPHeaderSerializer.

      In rt/bindings/corba:

      • cxf/binding/corba/utils/CorbaObjectReferenceHelper.java: cast to Import instead of ImportImpl in order to call getDefinition().

      Two other things:

      • The test in rt/bindings/soap for cxf/binding/soap/SoapDestinationFactoryTest doesn't actually test anything. It constructs a SOAPAddressImpl object, but doesn't use it. This should probably be mocked when the test is made to work, but in the meantime the SOAPAddressImpl should be removed.
      • In tools/common, cxf/tools/common/ExtensionInvocationHandler.java makes a call to getDeclaredMethod. This assumes that all methods are declared in the object's class. This breaks if the object was implemented using an ancestor class to define the method being called. This is an unnecessary burden on the implementor of alternative (non-WSDL4J) extensions. In order to find all methods, the call to getDeclaredMethod() should be replaced by a call to getMethod().

      Attachments

        1. cxf-2.4.3-wsdl4j
          13 kB
          Brian Wilson

        Activity

          People

            dkulp Daniel Kulp
            bwilson Brian Wilson
            Votes:
            5 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: