views:

237

answers:

0

I have runtime provided WCF serrvice inteface :

    [ServiceContract]
    public interface IHelloService {
        [OperationContract]
        string SayHello(string message);
    }

What I'd like to do with my Windsor container (once for each provided service interface) :

container.Register(Component
    .For(typeof(IHelloService))
    .Interceptors(typeof(HelloServiceInterceptor)).First
    .ActAs(new DefaultServiceModel()
        .AddEndpoints(WcfEndpoint
            .BoundTo(new BasicHttpBinding())
            .At("http://localhost:6080/HelloService/")
        )
    )
);

As you see, no implementation would be provided.

And the interceptor :

    class HelloServiceInterceptor: Castle.Core.Interceptor.IInterceptor {
        public void Intercept(Castle.Core.Interceptor.IInvocation invocation)
        {
            // Do what I must to answer the call
        }
    }

Is that possible with Windsor WCF Facility "as is"?
Is there some way to achieve this with Windsor WCF Facility "as is"?
Maybe I could provide a dummy implementation of the provided service interface, how would you do it?

Please, don't ask why ;)

If I get an answer elsewhere, I'll let you know.