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

Using Dispatch API with SOAPMessage type fails to set WS-Addressing action header properly if there's whitespace after the soap:body

    XMLWordPrintableJSON

Details

    • Novice

    Description

      if you use a SOAPMessage instead of a Source then the following function fails (ignoring the exception) and your ws-addressing action doesn't get set- if you have any whitespace after the soap:body element before your first payload element:
      private String getPayloadElementName(SOAPMessage soapMessage) {
      try

      { SOAPElement element = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next(); return new QName(element.getNamespaceURI(), element.getLocalName()).toString(); }

      catch (Exception e)

      { //ignore }

      return null;

      }

      This fails because the .next() call at the end gets a text node instead of an element object so the cast fails. So inexplicably your ws-addressing action header doesn't get set as far as the user sees.

      Attachments

        1. patch3748.txt
          2 kB
          Jesse Pangburn
        2. patch3747and3748.txt
          3 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 - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified