Topic
  • 3 replies
  • Latest Post - ‏2013-06-28T15:08:38Z by swlinn
Selvraj
Selvraj
5 Posts

Pinned topic Saving SOAP HEADER in context

‏2013-06-27T18:32:56Z |
Please help .
Can anyone help me how  to save the SOAP HEADER in the Request in context variable and again add in SOAP body  which is coming as Response

 

 

Thank you
  • ShyamSiddoji
    ShyamSiddoji
    13 Posts

    Re: Saving SOAP HEADER in context

    ‏2013-06-27T23:35:38Z  

    Hi Selvraj,

    you have to do X-path  and select the node for what exactly you wanna cache in context variable

    for Request XSLT:-

    <dp:set-variable name="'var://context/store/SOAPHeader'" value="X-path2Node"/>

    In Response XSLT:-

    <xsl:value-of select="dp:variable('var://context/store/SOAPHeader')"/>

     

    Thanks,

    SS

  • Selvraj
    Selvraj
    5 Posts

    Re: Saving SOAP HEADER in context

    ‏2013-06-28T13:52:22Z  

    Hi Selvraj,

    you have to do X-path  and select the node for what exactly you wanna cache in context variable

    for Request XSLT:-

    <dp:set-variable name="'var://context/store/SOAPHeader'" value="X-path2Node"/>

    In Response XSLT:-

    <xsl:value-of select="dp:variable('var://context/store/SOAPHeader')"/>

     

    Thanks,

    SS

    Hi Shyam

    Thanks for for replay.

    Another thing i wanted to that i have 14 elements inside the header .so by giving the Xpath will it save the entire header tree structure ? if not then do i need to give the Xpath of individual element inside the header?.

    Please clarify

    Thanks in advance

    Selvraj

     

  • swlinn
    swlinn
    1348 Posts

    Re: Saving SOAP HEADER in context

    ‏2013-06-28T15:08:38Z  
    • Selvraj
    • ‏2013-06-28T13:52:22Z

    Hi Shyam

    Thanks for for replay.

    Another thing i wanted to that i have 14 elements inside the header .so by giving the Xpath will it save the entire header tree structure ? if not then do i need to give the Xpath of individual element inside the header?.

    Please clarify

    Thanks in advance

    Selvraj

     

    So to be specific, assuming your xsl:stylesheet has the xmlns:soap defined

    <dp:set-variable name="'var://context/yourcontextname/SOAPHeader'" value="/soap:Envelope/soap:Header"/>

    This will place the header element and all of its children into the context variable that you can use at other times in the processing when perhaps the INPUT message is not available.

    Regards,

    Steve