Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-2754

SOAPEnvelope addHeader modifies message body/removes whitespace

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.4
    • None
    • Basic Architecture
    • None
    • java 1.4.2

    Description

      Code:

      Message msg=...;

      org.w3c.dom.Element element = ...;
      ....
      msg.getMessage().getSOAPEnvelope().addHeader(new SOAPHeaderElement(element));

      effect:

      some whitespace information is removed from the message body although only the header should be affected from above lines

      assuming the original message is

      <?xml version="1.0" encoding="UTF-8"?><soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap-env:Body>
      <GetWeather xmlns="http://www.webserviceX.NET">
      <CityName>Hamburg</CityName>
      <CountryName>Germany</CountryName>
      </GetWeather>
      </soap-env:Body>
      </soap-env:Envelope>

      Result is

      ...</soap-env:Header><soap-env:Body id="Body"><GetWeather xmlns="http://www.webserviceX.NET">
      <CityName>Hamburg</CityName>
      <CountryName>Germany</CountryName>
      </GetWeather></soap-env:Body></soap-env:Envelope>

      That means, digital signatures etc. can become void.
      This makes Aixs unusable for signatures etc.

      Or, is there a simple way to avoid this?

      Attachments

        Activity

          People

            Unassigned Unassigned
            axxxis Gil Bates
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

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