I'm using the stock WCF MessageRouter example to route messages between a Silverlight client and any number of back end web services. This is working well.
Now I need to solve the problem that some of my web services require SAML federation and use the WsFederationHttpBinding.
Assuming I can solve the problem of obtaining the SAML token for the user correctly I would like to be able to take the message coming into the router over the BasicHttpBinding and somehow insert that, along with the SAML token into the outgoing WsFederationHttpBinding in order to route the message to its final destination.
I'm assuming that the serialized object in the body is the same in both cases (I know it is encrypted in the WsFed case but I'm hoping the clear text of that encrypted body is the same).
What I would like is a way to create a client to the WsFederationHttpBinding endpoint and somehow hand it a reader to the existing message body from the BasicHttpBinding message rather than having to start with an object. Remember I'm in a router with no knowledge of the destination service other than its http address.
Does anyone know what if any extension point in WCF I can take advantage of to achieve this?
Just to recap I have a SOAP 1.1 message coming in and I want to take the SOAPAction, XML Message Body (serialized form of the input object) and SAML token, and hopefully convince WCF to munge those inputs into an appropriate WsFederationBinding compatible message for the destination service with the minimum of message manipulation/inspection at the router.