11 Replies Latest reply: Jan 22, 2014 3:03 PM by WP v.2 RSS

    Error parsing envelope: Header child element must be namespace qualified

    WP v.2

      Hey all,

       

      I'm creating a BPEL process that invokes a web service. The web service has an authenticate method that returns a session ID that I attempt to invoke. However, the process fails when trying to parse the response when invoking that operation. I checked the server logs and it's reporting the following: javax.xml.soap.SOAPException: Error parsing envelope: most likely due to an invalid SOAP message.: Header child element 'ID' must be namespace qualified!


      So I invoked the authenticate operation using SOAP UI, since it doesn't parse the response but merely displays it, and here's what was returned (slightly modified):


      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

         <soapenv:Header>

            <ID>xxx</ID>

         </soapenv:Header>

         <soapenv:Body>

            <ns1:SessionID xmlns:ns1="http://some-namespace">

               <ns1:ID>xxx</ns1:ID>

            </ns1:SessionID>

         </soapenv:Body>

      </soapenv:Envelope>


      Indeed the ID tag in the header doesn't have a namespace prefix. Looking at the SOAP 1.1 spec it says,A header entry is identified by its fully qualified element name, which consists of the namespace URI and the local name. All immediate child elements of the SOAP Header element MUST be namespace-qualified.”

       

      I was told that the code for the web service is frozen and cannot be changed. Are there any ways around this problem? Is it possible for the BPEL process to not parse the SOAP header?

       

      Thanks,

      Bill