Hi,
According to the WS-Adressing spec, MessageId and ReplyTo are optional
parameters.
This is supported in Axis by setting the parameter
'AddressingConstants.INCLUDE_OPTIONAL_HEADERS' to 'false' on the ServiceClient
options.
However, in the AddressingOutHandler, the code checks if the properties
'MessageId' and 'ReplyTo' are set on the messageContextOptions. If they are
set, they are added, disregarding the INCLUDE_OPTIONAL_HEADERS paramter.
However, ServiceClient ALWAYS seems to generate a message id and set it on the
Message Context. Therefore it is always added by the AddressingOutHandler.
I think this could possibly be fixed in 2 ways:
1. ServiceClient (or to be more specific, OperationClient) should not be
generating and setting MessageId.
2. If the INCLUDE_OPTIONAL_HEADERS parameter is false, these headers should NOT
be added, even if they are present on the messageContext.
If you indicate the correct desired behaviour, I could submit a patch to fix
this.
Regards,
Sharath