I want to customise the Action
and ReplyAction
properties of the OperationContractAttributes that I have on my data contract types in my WCF services.
I have some logic in an ESB that will read incoming messages and route them accordingly based on the SOAP action header so I need to explicitly state the values for these properties. But I don't even look at messages being returned, so it seems cleaner to have the same value for both properties.
I'd like to know if there is anything obviously wrong with setting these two properties to equal the same value for a specific operation? Why are the default values different to one another?
Thanks
Just to follow up on my own question in case it's helpful to others... I did proceed with using the same value for Action and ReplyAction.
Many SOAP implementations ignore the actions so it's less relevant, but WCF does use this value to route a message to the operation on a service. Setting both of the values to the same thing doesn't cause any issues because no system processes both the request and the response so there's nothing ambiguous about it.
I found that doing this made the WSDL generated simpler to understand, and there were half as many actions to document and route in our ESB.