WS-Addressing
wsa:Action, wsa:MessageID and the other addressing headers - added to requests and read from responses.
WS-Addressing defines SOAP header elements that identify the operation, the message, the destination and the reply endpoint of an exchange. IHE document-exchange profiles and many government endpoints require these headers on every request.
WS-Addressing is enabled with the WS-Addressing checkbox on the SOAP tab of an outgoing connection.
Request headers
With the checkbox on, every request includes:
wsa:Action- the connection's SOAP actionwsa:MessageID- a fresh unique identifier per requestwsa:To- the connection's addresswsa:ReplyTo- the anonymous reply endpoint, meaning replies come back on the same HTTP response
Your service does not build any of these - it assigns business fields to a SOAPMessage and the headers are added when invoke runs.
Response headers
The reply's addressing headers are parsed off the response and exposed as the reserved addressing attribute - a service can inspect them when it needs them and ignore them otherwise:
response = self.soap['Document Registry'].invoke('DocumentQuery', request)
addressing = response.addressing
self.logger.info('Reply action: %s', addressing.action)
self.logger.info('Reply message id: %s', addressing.message_id)
self.logger.info('In reply to: %s', addressing.relates_to)
relates_to echoes the wsa:MessageID of the request that the reply answers, and correlation-aware endpoints use it to match each reply to its request.