Hi Paul,
You can specify the method name in the protection element. For example,
<policy ....> <!-- This can be any kind of policy, username, X509, etc -->
<clientToken>
</clientToken>
<serviceToken>
</serviceToken>
<protection>
<request signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="true" />
<response signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="false" />
<fault signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="false" />
</protection>
<protection requestAction="shipmentNotice">
<request signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="true" />
<response signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="false" />
<fault signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="false" />
</protection>
<protection requestAction="submitPOFault">
<request signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="false" />
<response signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="false" />
<fault signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="false" />
</protection>
</policy>
In this example, I defined a policy for a web service with 2 or more web
methods. ("shipmentNotice", "submitPOFault" and default)
The protection element without requestAction attribute is the default
protection.
Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
> Hi all,
> I've been finding examples on the web about using a "mappings"
[quoted text clipped - 12 lines]
>
> Paul
paul.evans.groups@googlemail.com - 03 Nov 2005 16:16 GMT
ah wow, this is great. But I think I asked the wrong question.
My problem is that I want to have some methods requiring a
UsernameToken and some being allowed to just use be anonymous.
Is it possible to have both usernameForCertificateSecurity and
anonymousForCertificateSecurity in the same policy file, so some
require authorisation and some don't?
Pablo Cibraro - 04 Nov 2005 14:36 GMT
Unfortunately, that is not possible.
A policy applies at class level (it applies to all web methods defined in
the same web service).
If you want to use different policies, you will have to separate the
webmethods in different web services.
Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
> ah wow, this is great. But I think I asked the wrong question.
>
[quoted text clipped - 4 lines]
> anonymousForCertificateSecurity in the same policy file, so some
> require authorisation and some don't?
Bob - 20 Jan 2006 18:57 GMT
I had a similar question. We want apply WS-ReliableMessaging to some, but not
all of our messages. Do we have to split our messages between multiple
SoapServices, with and without the reliable messaging PolicyAttribute applied?

Signature
Dr. R.A. Knutson
Magenic Technologies
> Unfortunately, that is not possible.
> A policy applies at class level (it applies to all web methods defined in
[quoted text clipped - 14 lines]
> > anonymousForCertificateSecurity in the same policy file, so some
> > require authorisation and some don't?