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

The boat is in the water: Spring Voyage is open source

Today I'm pushing Spring Voyage out of the harbor. You can track its journey on…

5 days ago

My Coding Agent Needed Its Own GitHub Identity

In my last post, I wrote that "the typing of code was parallelized and delegated.…

1 month ago

Rebuilding My AI Team in Twelve Days — And Why

In February, I wrote about the small team I'd stood up instead of hiring humans:…

2 months ago

How I Built My Own Team of AI Developers

Assembling a dream team without a single hire I've been making great progress on CVOYA's…

3 months ago

Reflecting on 2025: Building CVOYA’s Future with AI Coding Agents

As 2025 is now behind us, I wanted to share a few reflections from my…

5 months ago

DIY smart home accessory – It all started with a question to ChatGPT

Few months ago, we bought a sculpture from a local art fair for our Palm…

6 months ago