Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
is it possible to change the wsa:To and wsa:From fields on the sync response to a request? If so, how is that done?
Posted

1 solution

Programatically, I can set the Via on the ClientRuntime inside the custom behavior. This allows the POST to differ from the actual endpoint address that gets set automatically due to my usage of WSHttpBinding.

C#
public void ApplyClientBehavior
    (ServiceEndpoint endpoint, ClientRuntime clientRuntime)
{
    CustomMessageInspector inspector = new CustomMessageInspector();
    clientRuntime.MessageInspectors.Add(inspector);
    clientRuntime.Via = new Uri("http://gatewayRouter/routingService");
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900