Service Virtualization

Expand all | Collapse all

How to access soap headers from a soap response using scriptable data protocol?

  • 1.  How to access soap headers from a soap response using scriptable data protocol?

    Posted Feb 04, 2017 09:46 AM

    I am unable to access soap header data from soap response when recording using SDP.

     

    Neither Response or TransientResponse object has any method to access the headers.

     

    Anyway to access response header details?

     

    Regards

    Raj



  • 2.  Re: How to access soap headers from a soap response using scriptable data protocol?
    Best Answer

    Broadcom Employee
    Posted Feb 04, 2017 11:09 AM

    SOAP headers are simply optional elements in a SOAP envelope, using tags <env:Header>your header data</env:Header>. As such, they are specifically embedded within the message payload, so they are available like the rest of the message body and you don't need to do anything special in your scriptable DPH to access them.

     

    If you mean HTTP headers rather than SOAP headers, you want to create a parameterList from yourTransientResponse.getMetaData() to access them.