"Pablo Cibraro" wrote:
> Hi William,
>
> I forgot to mention a workaround to do something like that.
>
> You can develop a base class for your services, and set the policy in the
> constructor of that class.
>
> public class MyWebServiceBase : WebService
> {
> public MyWebServiceBase()
> {
> //Look for the right policy name in the configuration.
>
> this.SetPolicy(policy);
> }
> }
>
> public class MyWebService1 : MyWebServiceBase
> {
> public void HelloWorld(string hello)
> {
> }
> }
>
> Still, you need to modify the web services to use a different base class.
>
> Regards,
> Pablo.
>
>
> "William" <william@nospam.nospam> wrote in message
> news:OOGDt9IZGHA.4916@TK2MSFTNGP04.phx.gbl...
> > Thanks Pablo. Darn. I was afraid of that. I'm rather unimpressed with the
> > way this was implemented. We are putting together a custom in-house
> > solution that uses custom SOAP headers to implement web services
> > management. (We can track flow of calls between services, track response
> > times, keep message history for troubleshooting, etc) The desire is to
> > keep the solution transparent to the web services themselves. This was
> > possible with WSE 2, but now it's not possible with 3. We'd like to use 3,
> > particularly for the speed enhancement and wire compatibility with WCF,
> > but now we have to have this code referring to the mgmt functionality in
> > each service, at the individual class level.
> >
> > Very unelegant. I cannot understand why they could not have implemented
> > something like so:
> >
> > <applyPolicy>
> > <service name="foo.asmx" policy="myPolicy" />
> > </applyPolicy>
> >
> > I must be missing something here. Is there any functional reason for
> > specifying policy at the class attribute level? Seems utterly ridiculous
> > to not have this configurable.
> >
> > "Pablo Cibraro" <pcibraro@hotmail.com> wrote in message
> > news:%23POzxqIZGHA.2136@TK2MSFTNGP05.phx.gbl...
> >> Hi William,
> >>
> >> Unfortunately, it is not possible to specify a policy for a service by
> >> means of a configuration setting.
> >> If you do not want to modify the code for your web services, a security
> >> router solution may solve your problem.
> >>
> >> The WSE quickstart contains some samples about service routing,
> >> C:\Program Files\Microsoft WSE\v3.0\Samples\CS\QuickStart\Routing
> >> You can also check the Perimeter Service Router pattern,
> >>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/WSS_Ch6_PerimServRout.asp
> >>
> >> Regards,
> >> Pablo Cibraro
> >>
http://weblogs.asp.net/cibrax > >>
> >>
> >
> >
>
>