python-zeep
python-zeep copied to clipboard
WSA plugin: allow custom prefix for MessageID.
Fix #975
Description
When using the WSA plugin, the header's field MessageID
is created as follows:
<MessageID>urn:uuid:cb4dd644-d178-433d-9ec5-799e13407867</MessageID>
Some endpoints require the urn:
prefix to be absent:
<MessageID>uuid:cb4dd644-d178-433d-9ec5-799e13407867</MessageID>
This PR allows you to specify the prefix you want with the WSA plugin. For instance, this fixes the author's problem in issue #975:
client = Client(
'http://examples.python-zeep.org/basic.wsdl',
plugins=[WsAddressingPlugin(message_id_prefix="uuid:")])