Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-732

Empty unwrapped arrays incorrectly unmarshalled as a null value

XMLWordPrintable

      There are several problems with the way JBossWS handles marshalling of arrays that are either empty or null.
      Upon response null arrays become empty arrays, or empty arrays with one null element, depending on the encoding style:

      DocLitWrapped:

      <s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
      <s:Header/>
      <s:Body>
      <RetByteArray xmlns='http://tempuri.org/'>
      <inByteArray a:nil='true' xmlns:a='http://www.w3.org/2001/XMLSchema-instance'/>
      </RetByteArray>
      </s:Body>
      </s:Envelope>

      <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
      <env:Header/>
      <env:Body>
      <ns1:RetByteArrayResponse xmlns:ns1='http://tempuri.org/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
      <ns1:RetByteArrayResult/>
      </ns1:RetByteArrayResponse>
      </env:Body>
      </env:Envelope>

      DocLitBare:

      <s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
      <s:Header/>
      <s:Body>
      <inArrayString1D i:nil='true' xmlns='http://tempuri.org/' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'/>
      </s:Body>
      </s:Envelope>

      <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
      <env:Header/>
      <env:Body>
      <ns1:RetArrayString1DResult xmlns:ns1='http://tempuri.org/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
      <ns_string:string xmlns:ns_string='http://schemas.microsoft.com/2003/10/Serialization/Arrays' xsi:nil='1'/>
      </ns1:RetArrayString1DResult>
      </env:Body>
      </env:Envelope>

              olubyans@redhat.com Alexey Loubyansky
              rhn-support-hbraun Heiko Braun
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: