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

Using Dispatch API with Source type fails to set WS-Addressing action header properly in MESSAGE mode with SOAP 1.2

    XMLWordPrintableJSON

Details

    • Novice

    Description

      Prior tests with PAYLOAD mode were successful with SOAP 1.2, but a quick test on MESSAGE mode with a StaxSource revealed that the WS-Addressing action header is not properly set in SOAP 1.2. In one of the DispatchImpl.java's getPayloadElementName methods, there is the following code with a SOAP 1.1 namespace hardcoded:
      if (this.mode == Service.Mode.MESSAGE)

      { StaxUtils.skipToStartOfElement(reader); StaxUtils.toNextTag(reader, new QName("http://schemas.xmlsoap.org/soap/envelope/", "Body")); reader.nextTag(); return reader.getName().toString(); }

      To work with SOAP 1.1 or SOAP 1.2, it should be changed to:
      if (this.mode == Service.Mode.MESSAGE)

      { StaxUtils.skipToStartOfElement(reader); StaxUtils.toNextTag(reader, new QName(ele.getNamespaceURI(), "Body")); reader.nextTag(); return reader.getName().toString(); }

      I've tested this fix with a Source type in MESSAGE mode and it works with SOAP 1.1 and 1.2.

      Attachments

        1. patch3747and3748and3749.txt
          4 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: