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

bindingId on Client/ServerFactoryBean does not overrule WSDL

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.6, 3.0.9
    • Fix Version/s: 3.0.13, 3.1.11, 3.2.0
    • Component/s: Core
    • Labels:
    • Estimated Complexity:
      Unknown

      Description

      I have a regular service WSDL with a SOAP/HTTP binding.

      I want to use the XML binding with the service, though. If I set up my service like this:

              ServiceImpl implementor = new ServiceImpl();
              JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
              svrFactory.setServiceClass(ServiceInterface.class);
              svrFactory.setAddress(HTTP_ADDRESS);
              svrFactory.setServiceBean(implementor);
              svrFactory.setBindingId("http://cxf.apache.org/bindings/xformat");
      

      everything works as expected. However, if I also add these three lines

              svrFactory.setWsdlURL(wsdlUrl);
              svrFactory.setServiceName(new QName(SERVICE_NS, SERVICE_NAME));
              svrFactory.setEndpointName(new QName(SERVICE_NS, PORT_NAME));
      

      the the port definition from the WSDL takes precedence over the factory configuration, and the service expects a SOAP request. Other properties, like e.g. the transportId, get overridden just fine.

      The same problem also seems to exist on the ClientFactoryBean side.

      This used to work in CXF 2.x.

        Attachments

          Activity

            People

            • Assignee:
              ffang Freeman Fang
              Reporter:
              jensgr@gmx.net Jens Kleine-Herzbruch
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: