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

TransformOutInterceptor may lose namespace declarations in some elements

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.2
    • Fix Version/s: 2.5.6, 2.6.3, 2.7
    • Component/s: Core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When TransformOutputInterceptor is used to process a list of elements with the same namespace that is declared locally, some namespace declarations may not be correctly seriazlied.

      Given the input message
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Header>
      <Action xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://cxf.apache.org/greeter_control/Greeter/greetMeRequest</Action>
      <MessageID xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:uuid:fac787f8-db6e-4606-a76c-c45ed3bbba4d</MessageID>
      ...

      and transforming the namespace from "http://schemas.xmlsoap.org/ws/2004/08/addressing" to "http://www.w3.org/2005/08/addressing" may lose the namespace declaration in the second element as in:

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Header>
      <Action xmlns="http://www.w3.org/2005/08/addressing">http://cxf.apache.org/greeter_control/Greeter/greetMeRequest</Action>
      <MessageID>urn:uuid:fac787f8-db6e-4606-a76c-c45ed3bbba4d</MessageID>
      ...

      The correct output message should carry the namespace declaration as in

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Header>
      <Action xmlns="http://www.w3.org/2005/08/addressing">http://cxf.apache.org/greeter_control/Greeter/greetMeRequest</Action>
      <MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:fac787f8-db6e-4606-a76c-c45ed3bbba4d</MessageID>
      ...

        Attachments

          Activity

            People

            • Assignee:
              ay Akitoshi Yoshida
              Reporter:
              ay Akitoshi Yoshida
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: