Wednesday, 11 September 2013

WCF Router raising Exception over WS-RM packets

WCF Router raising Exception over WS-RM packets

I have a WCF Router setup where the client communicates to the target
service with WS Http bindings using reliable messaging (RMP.) When the
connection between client service to router is WS HTTP and router to
target service is WS HTTP, all works as expected. I log the SOAP packets
as they hit the router and they look like:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:r="http://docs.oasis-open.org/ws-rx/wsrm/200702"
xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<r:Sequence s:mustUnderstand="1">
<r:Identifier>urn:uuid:76bac170-ace3-4a9b-8a5f-eba263cbdf57</r:Identifier>
<r:MessageNumber>1</r:MessageNumber>
</r:Sequence>
<a:Action s:mustUnderstand="1">http://tempuri.org/Foo/Connect</a:Action>
<a:MessageID>urn:uuid:d76b500f-f59e-41a1-9831-cb33e2f9eb3c</a:MessageID>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">http://foobox:62435/RouterService.svc</a:To>
</s:Header>
<s:Body>
<Connect xmlns="http://tempuri.org/">
<!-- Request body removed -->
</Connect>
</s:Body>
</s:Envelope>
This returns a valid response.
The problem is when I switch to a WS HTTPS connection between the client
service and the router and keep the WS HTTP connection between the router
and the target service, it's logging the WS-RM messages:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action
s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</a:Action>
<a:MessageID>urn:uuid:96d7c674-471e-4c9d-8ba5-7a1c8ed3275b</a:MessageID>
<a:To s:mustUnderstand="1">https://foobox:44300/RouterService.svc</a:To>
</s:Header>
<s:Body>
<CreateSequence xmlns="http://schemas.xmlsoap.org/ws/2005/02/rm">
<AcksTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</AcksTo>
<Offer>
<Identifier>urn:uuid:de2129d5-58f2-4672-915f-eb3196d51bff</Identifier>
</Offer>
</CreateSequence>
</s:Body>
</s:Envelope>
And this is generating the following ActionNotSupported exception in the
client service:
The message with Action
'http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence' cannot be
processed at the receiver, due to a ContractFilter mismatch at the
EndpointDispatcher. This may be because of either a contract mismatch
(mismatched Actions between sender and receiver) or a binding/security
mismatch between the sender and the receiver. Check that sender and
receiver have the same contract and the same binding (including security
requirements, e.g. Message, Transport, None).
This error makes sense considering that the service interface doesn't
handle CreateSequence messages but I'm not sure why switching to SSL
causes these to be explicitly sent to the target service.
What can I do to get the router to properly pass/handle the WS-RM packets?

No comments:

Post a Comment