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

BrainExpanded – The Timeline

See "BrainExpanded - Introduction" for context on this post. Notes and links Over the years,…

4 days ago

BrainExpanded – Introduction

This is the first post, in what I think is going to be a series,…

4 days ago

Digital twin follow up

Back in February, I shared the results of some initial experimentation with a digital twin.…

2 weeks ago

Digital Twin (my playground)

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

10 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