SOAP Handlers in v7.1.2 - Read Headers and propogate back the same in the response?

Hi,

Can any one tried to read the SOAP header information in the request handler and send the same information back to the consumer using the response handler in webMethods version 7.1.2.

Any idea what the best practice is?

I have tried the following but unseccessful.

  1. Read the SOAP header QName trackingHeader as in the following xml,

<t:trackingHeader xmlns:date="http://exslt.org/dates-and-times" xmlns:t="http://www.company.com/ios/v1">
<t:requestId>72ca0830-d66f-4552-8576-ae273c221460</t:requestId>
<t:timestamp>2009-12-09T08:49:00Z</t:timestamp>
</t:trackingHeader>

I am able to read the soapHeaders using the handlerequest handler. have populated the trackingHeader document.
2. After the service successful execution, the handle response header is invoked, where the trackingHeader document is mapped to the headerdocument required by addHeaderElement service.

I have tested with savepipelinetofile in the response handler service, but stored nothing from the pipeline. However, client is able to receive the response without header.

Appreciate your suggestions on the above issue…

Regards
KN

You do not have a handle of the Headers in the response Header Handler.
There are multiple ways in which you can acheive the same.

  1. In the target flow Service have an additional element called temp_header and then populate the values in that and the same cane be read in the response Header handler, then you can construct the actual header and send the response back.

  2. when you receive the request, persist the Header in a DB, then on your way back retreive the same and then insert it in the response and send it back to the client.

athrsx,

How did you pass the temp header into the handler? The handler only has access to messageContext and the pipeline is cleared by the time the response handler is executed.

Regards,
Hara

This issue was resolved. We did the following:

  1. Applied the latest core fix (we are on IS 7.1.2)
  2. Used the service pub.soap.handler:getProperty with the key “servicePipeline”

2 above makes the pipeline available, which we used to set the dynamically generated header in the response.

  • Hara