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

setting wsa:addressing feature in cxf:bus causes wrong action header to be sent when using Dispatch API

    XMLWordPrintableJSON

Details

    • Moderate

    Description

      I configured ws addressing on the cxf bus like this, instead of adding the feature directly to the dispatch client:
      <cxf:bus>
      <cxf:features>
      <wsa:addressing/>
      </cxf:features>
      </cxf:bus>

      However using both SOAP 1.1 and 1.2 Dispatch API clients, I found that it sets the wrong Action header by just using a default rather than the one from the WSDL. I'm not certain which code is responsible for this but I see in the DispatchImpl.java the following code:
      boolean wsaEnabled = false;
      for (AbstractFeature feature : ((JaxWsClientEndpointImpl)client.getEndpoint()).getFeatures()) {
      if (feature instanceof WSAddressingFeature)

      { wsaEnabled = true; }

      }

      This only looks for the features on the endpoint to determine if it should do ws addressing, not the features on the bus too. So the DispatchImpl doesn't set this stuff up. Further investigation shows that if the wsAddressing feature is added via jaxws:client spring configuration, the action header is wrong here too.

      Attachments

        1. patch3754_partial_and3755.txt
          6 kB
          Jesse Pangburn
        2. patch3754and3755.txt
          7 kB
          Jesse Pangburn

        Activity

          People

            dkulp Daniel Kulp
            jpangburn Jesse Pangburn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified