I've figured it out with some help from John Bristowe (thanks John).
So, it seems that the WS-Addressing headers in a SOAP Envelope are not the
ones used by the SoapSender to create a channel. Also, it seems that the
channel is created before the pipeline of the filters is processed. So, even
if you change the envelope, the initial endpoint used to create the
SoapSender is the one used for the channel.
So, if you want to change the addressing-specific information of the
transport from within a custom filter, you could try the following...
SoapOutputChannel channel = SoapContext.Current.Channel as
SoapOutputChannel;
channel.RemoteEndpoint.Address = epr.Address;
Once you are there, you can change all aspects of the addressing headers,
even change their namespace :-) but as John pointed out to me, you'll have
to do something at the other side too.
Regards,
.savas.
The first one changes the SoapContext addressing information
> Hey all,
>
[quoted text clipped - 13 lines]
> Regards,
> .savas.