Channel and Pipeline ordering in WSE

I’ve spent few days trying to figure out why when I change the WS-Addressing information of an outgoing SOAP message from an output WSE filter, the changes are not picked up by the underlying SOAP transport used. Well, after lots of experimentation and an IM discussion with John Bristowe who gave me some good pointers (thanks John), I’ve figured out that WSE does something strange in the way it creates a channel for the outgoing messages.

In WSE, one can send a message using instances of the SoapSender class. The constructor of the class requires endpoint information. This endpoint information is used to create a channel over which the outgoing SoapEnvelope will be created. After the channel is created, the pipeline of custom filters is processed. Even if a filter changes the addressing information in the SoapEnvelope, those changes are not reflected at the already created channel.

A solution is to do the following in your custom filter…


SoapOutputChannel
channel = SoapContext.Current.Channel asSoapOutputChannel;

channel.RemoteEndpoint.Address = epr.Address;

I would have expected the processing of the filter pipeline to be done before the channel and any other transport specific objects were created. I am sure there was a good reason it was done this way.

I am going to talk about the piece of infrastructure I am working on at the moment when I finish the implementation (it still doesn’t work). Hopefully very soon.

Recent Posts

Digital Twin (my playground)

I am embarking on a side project that involves memory and multimodal understanding for an…

9 months ago

“This is exactly what LLMs are made for”

I was in Toronto, Canada. I'm on the flight back home now. The trip was…

1 year ago

AI is enhancing me

AI as an enhancer of human abilities.

1 year ago

“How we fell out of love with voice assistants”

The BBC article "How we fell out of love with voice assistants" by Katherine Latham…

2 years ago

Ontology-based reasoning with ChatGPT’s help

Like so many others out there, I played a bit with ChatGPT. I noticed examples…

2 years ago

Break from work

Hi all… It’s been a while since I posted on this blog. It’s been an…

2 years ago