I implemented IDispatchMessageInspector
and in method AfterReceiveRequest
I can receive name of method (action) that calling from client like this request.Headers.Action
. Can I found name of service that where this method was implemented? For example I have service Test
and two methods Start
and Stop
and request.Headers.Action for this method like this request.Headers.Action "http://bla.my.com/Start
" and "http://bla.my.com/Start
" How Can I found name Test
and possible this or impossible?
views:
148answers:
2
A:
I found suggestion: instanceContext.GetServiceInstance()
returns name of service where implemented invoked method.
jitm
2010-03-22 15:39:38
A:
The correct answer is request.Headers.To
, because we received message from client TO web service and if we parse property TO we are going to know name of service. And instanceContext.GetServiceInstance()
is created new instance of service and this incorrect behavior for return name of service.
jitm
2010-03-24 09:22:43