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

DOMEnvelopeBuilder misses global namespace declaration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jbossws-1.0.3
    • jbossws-1.0.2
    • None
    • None

      I have just been testing a deployment using the latest version of the JBossWS code and the default request message generated by SoapUI is being rejected.

      If I send the following message: -
      (typ is defined on soapenv:Envelope)

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://www.jboss.org/support/phonebook/types">
      <soapenv:Body>
      <typ:lookup>
      <firstName>Darran</firstName>
      <surname>Lofthouse</surname>
      </typ:lookup>
      </soapenv:Body>
      </soapenv:Envelope>

      It is rejected with the following error: -

      <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
      <env:Header/>
      <env:Body>
      <env:Fault>
      <faultcode>env:Client</faultcode>
      <faultstring>org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: The prefix "typ" for element "typ:lookup" is not bound. @ unknown[1,13]</faultstring>
      </env:Fault>
      </env:Body>
      </env:Envelope>

      However if I modify the request message to : - (Moving the namespace from the Envelope element to the lookup element)

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Body>
      <typ:lookup xmlns:typ="http://www.jboss.org/support/phonebook/types">
      <firstName>Darran</firstName>
      <surname>Lofthouse</surname>
      </typ:lookup>
      </soapenv:Body>
      </soapenv:Envelope>

      The web service works as expected: -

      <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
      <env:Header/>
      <env:Body>
      <ns1:lookupResponse xmlns:ns1="http://www.jboss.org/support/phonebook/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <areaCode>01234</areaCode>
      <number>123456</number>
      </ns1:lookupResponse>
      </env:Body>
      </env:Envelope>

      Regards,
      Darran Lofthouse.

              rhn-support-hbraun Heiko Braun
              rhn-support-hbraun Heiko Braun
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: