Configuration tips

Messages can be prepared at any point before the outbound TPS exits. You can use any available tool in the engine. For example, translate, UPOC, and so on.

Clients have no control over private SOAP headers that are not publicly defined, even when a public SOAP extension is configured in the GUI. For a configured public extension, any conflicts with a SOAP header that is written by a user overrides user inputs. In this scenario, it is better to display the SOAP extension on the GUI.

For example:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
        <Action xmlns="http://www.w3.org/2005/08/addressing">urn:ihe:iti:2007:RegistryStoredQueryResponse</Action>
        <MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:f198b7ab-ab39-41bd-91f3-d170ba38c1e7</MessageID>
        <To xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To>
        <RelatesTo xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d5d34070-5d55-40f9-9763-1cb2a67fbd40</RelatesTo>
    </soap:Header>
    <soap:Body>
        <query:AdhocQueryRequest/>
    </soap:Body>
</soap:Envelope>

This sample Tcl code piece can be used in TPS to manage SOAP headers:

set data [msgget $mh]
#using tdom to manipulate SOAP headers
package require tdom
set soapenvNs http://www.w3.org/2003/05/soap-envelope
set wsaNs http://www.w3.org/2005/08/addressing
set doc [dom parse $data]
set header [$doc getElementsByTagNameNS $soapenvNs Header]
set messageid [$doc createElementNS $wsaNs MessageID]
$messageid appendChild [$doc createTextNode "this is test message id"]
$messageid setAttributeNS $soapenvNs soapenv:mustUnderstand true
$header appendChild $messageid
msgset $mh [$doc asXML]
$doc delete