Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-565

Payload unmarshalling fails when soap body element attribute references namespace declared in envelope

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.5.7
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Sun's SAAJ 1.3 implementation
      Java SE 1.5

      Description

      Unmarshalling of a message like [1] fails. A payload source reference, which in SaajSoapMessage case is DOMSource of soap body, is given to unmarshaller. Since attribute namespace is declared in soap envelope, unmarshaller, in my case CastorMarshaller, it seems can not find attribute namespace declaration by just using Source nodes. Not sure if it is spring-ws-core or spring-oxm / CastorMarshaller issue, or if it is spring-ws issue at all (could be Castor 1.2 issue).

      Oddly enough unmarshalling of message like [2] works well. Both messages are valid XML documents, and in both cases body content is not a valid XML document, but with difference that in case [1] unmarshalling fails, while in [2] it is successful.

      [1] example of message for which unmarshalling fails

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.foo.com/bar/ns1/" xmlns:ns2="http://www.foo.com/bar/ns2/">
         <soapenv:Header/>
         <soapenv:Body>
            <ns1:DoSomethingRequest ns2:anAttribute="attributeValue" />
         </soapenv:Body>
      </soapenv:Envelope>
      

      [2] example of message for which unmarshalling is successful

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.foo.com/bar/ns1/">
         <soapenv:Header/>
         <soapenv:Body>
            <ns1:DoSomethingRequest />
         </soapenv:Body>
      </soapenv:Envelope>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arjen.poutsma Arjen Poutsma
                Reporter:
                sslavic Stevo Slavić
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: