开发者

Mapping a WCF request message to the underlying operation

开发者 https://www.devze.com 2022-12-10 21:39 出处:网络
I need to know what operation is being invoked by examining a request Message object in an IDispatchMessageInspector.

I need to know what operation is being invoked by examining a request Message object in an IDispatchMessageInspector.

开发者_如何学JAVA

What is the best way to do this?


There's really no 100% sure way of doing this, because IDispatchMessageInspector.AfterReceiveRequest() runs before the dispatcher has matched the message to an actual operation on the service. That said, if you're using the default IDispatchOperationSelector, then it's possible to build a map that matches SOAP Action names with operation names during ApplyDispatchBehavior(). I have a blog post that talks a little bit about this here.

There's a bit of an example of how to build this map on some code here.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号