Topic
  • 2 replies
  • Latest Post - ‏2016-12-06T14:29:24Z by SupriyoDebnath
PiperPivo92
PiperPivo92
1 Post

Pinned topic How can I access to SOAP Header with ESQL?

‏2016-11-09T08:44:38Z | esql iib soap soapheader

Hi all,

I need to access the information conteined in the soap header message.

In particular the message is structured like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.example.org/ACRO0/SERVICEID/">
   <soapenv:Header>
      <ser:testObject>
        ...
      </ser:testObject>
   </soapenv:Header>
   <soapenv:Body>
        ...
   </soapenv:Body>
</soapenv:Envelope>

and i need to access the element <ser:testObject> for propagate the content to the OutputRoot in a ESQL Compute node.

I've tryed to use this code:

DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE ser NAMESPACE 'http://www.example.org/ACRO0/SERVICEID/';

InputRoot.XMLNSC.soapenv:Envelope.soap:Header.ser:ISPWebservicesHeader

but i just got an empty element.

Can anyone help me please?

 

Thank for your help and your patience.

PiperPivo92

  • martin_b
    martin_b
    67 Posts

    Re: How can I access to SOAP Header with ESQL?

    ‏2016-11-10T10:01:41Z  

    Hi,

    The obvious response is the ESQL path and the example XML you show don't match

          <ser:testObject>  != ser:ISPWebservicesHeader

    However that could just be you misquoted something.

    So the approach to take to diagnose this is

    • Add a Trace node to your flow to display the contents of the message tree arriving at the ESQL compute node
    • Enable user trace and review the collected trace - it will identify which part of your ESQL path did not match the actual data in the message tree

    Hope this helps sort it.

    See you also raised this on MQSeries.net

    Updated on 2016-11-10T12:07:12Z at 2016-11-10T12:07:12Z by martin_b
  • SupriyoDebnath
    SupriyoDebnath
    27 Posts

    Re: How can I access to SOAP Header with ESQL?

    ‏2016-12-06T14:29:24Z  

    Hi PiperPivo92

        With reference to the XML you pasted

    InputRoot.XMLNSC.soapenv:Envelope.soap:Header.ser:ISPWebservicesHeader is a wrong one.

    InputRoot.XMLNSC.soapenv:Envelope.soapenv:Header.ser:testObject or InputRoot.SOAP.Envelope.Header.ser:testObject is the correct one.