Sorry I wasn't more specific: i did try with no luck.
First I get an error from the facility about proxy targets, that I fixed
doing this after registration of the service:
var model =
container.Kernel.GetHandler(typeof(TComponent)).ComponentModel;
var proxyOptions =
Castle.MicroKernel.Proxy.ProxyOptionsUtil.ObtainProxyOptions(model, true);
proxyOptions.OmitTarget = true;
(Note: i'm trying again now and it seems that the "OmitTarge = true" is no
longer neccesary, this was probably fixed between v3.0 and v3.1).
But, anyway, I hit a wall after that, getting this error when I'm trying to
run the host (accesing the .svc):
[ArgumentException: ServiceHost only supports class service types.]
System.ServiceModel.Description.ServiceDescription.GetService(Type
serviceType) +12904571
System.ServiceModel.ServiceHost.CreateDescription(IDictionary`2&
implementedContracts) +58
System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection
baseAddresses) +146
System.ServiceModel.ServiceHost.InitializeDescription(Type serviceType,
UriSchemeKeyedCollection baseAddresses) +46
System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[]
baseAddresses) +146
Castle.Facilities.WcfIntegration.DefaultServiceHostBuilder.CreateServiceHost(ComponentModel
model, Uri[] baseAddresses) +39
That's why I was curious if somebod else got this working...
El domingo, 9 de diciembre de 2012 11:01:00 UTC-3, Craig Neuwirt escribió:
> I can't remember either. You could always give it a try and see if it
> works.
>
> Sent from my iPhone
>
> On Dec 8, 2012, at 7:26 AM, Nicolás Sabena <[email protected] <javascript:>>
> wrote:
>
> I'm sorry to revive such an old post, but the posibilities mentioned here
> about providing an "implementation" of services based only on interceptors
> sound great.
>
> Did you ever make this work? Was it included in the Wcf Facility?
>
>
>
> El jueves, 4 de febrero de 2010 12:50:02 UTC-3, fredlegrain escribió:
>
>> I'd like to customize WCF Integration Facility to make capable of
>> exposing a service host based on a provided ServiceContract interface
>> and handling calls through a provided interceptor.
>>
>> Let's say I have a ServiceContract interface :
>>
>> [ServiceContract]
>> public interface IHelloService {
>> [OperationContract]
>> string SayHello(string message);
>> }
>>
>> Let's says I don't have (and don't want to have) any implementation of
>> IHelloService.
>> But I have an interceptor (let's call it HelloServiceInterceptor)
>> which knows how to answer the service calls.
>>
>> I'd like to have my init code look like this :
>>
>> container.Register(Component
>> .For(typeof(IHelloService))
>> .Interceptors(typeof(HelloServiceInterceptor)).First
>> .ActAs(new DefaultServiceModel()
>> .AddEndpoints(WcfEndpoint
>> .BoundTo(new BasicHttpBinding())
>> .At("http://localhost:6080/HelloService/")
>> )
>> )
>> );
>>
>> Do you expect that be feasible?
>> How can I customize Windsor and/or WCF Integration Facility to achieve
>> that?
>> Maybe a custom ServiceModel would allow me to do the job?
>>
>> Cheers,
>> Frédéric
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/castle-project-users/-/UqdP8C0YJAoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.