Paul -
I don't happen to know of an OO way, but you can definitely get at the
webmethod that was called via the context as it is in the soap body.
If you don't know how to work with xmldocs (I have certainly never mastered
that chore..), you can get at it from the context object...
context.envelope.body
you can see it in innerxml and outerxml, but you still have to do some work.
I'd be VERY curious to see if there is something in the namespace to get at
this becuase today I also had to extract a webmethod from one webservice and
create a separate web service for a different policy.
Hope this helps. I don't know if this will get you that info 100% of the
time though but it's worth digging into.
julie lerman
> I have implemented a UsernameTokenManager so that a user may attach an
> account name and hashed password to his Soap requests.
[quoted text clipped - 28 lines]
> thanks in advance,
> Paul Linhardt
> I have implemented a UsernameTokenManager so that a user may attach an
> account name and hashed password to his Soap requests.
[quoted text clipped - 28 lines]
> thanks in advance,
> Paul Linhardt
(1) RequestSoapContext.Current.Addressing.To has the name of the target
service (i.e. it's URI), RequestSoapContext.Current.Addressing.Action
has the action (equivalent to method) that the message is destined for.
(2) You can apply policies at the global level (default policy), per
service and per action (effectively the method level). Using the action
level should allow you to define a policy for a specific action such
that it doesn't require signatures, tokens, etc. Check the documentation
for more details.

Signature
This posting is provided "AS IS", with no warranties, and confers no rights.
Paul Linhardt - 30 Sep 2004 02:31 GMT
Hervey (& Julie),
Thanks for pointing me in the right direction and saving me a lot of
time.
Since using Policies seemed like the more general solution, I
implemented that and it solved my problem. I did have a little
difficulty finding a straight-forward explanation of policies until I
found this article:
Web Services Enhancements 2.0 Support for WS-Policy
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wse2
wspolicy.asp
I didn't bother trying to use
RequestSoapContext.Current.Addressing.Action to access the the method
name as I originally planned since the other solution was more
general, but it's good to know for future reference.
thanks,
-Paul
> > I have implemented a UsernameTokenManager so that a user may attach an
> > account name and hashed password to his Soap requests.
[quoted text clipped - 38 lines]
> that it doesn't require signatures, tokens, etc. Check the documentation
> for more details.