Hi there, 
        
The issue FACILITIES-ISSUE-110 was just created by Valeriu Caraulean (varely).
        
        Key: FACILITIES-ISSUE-110
        Summary: WCFIntegration facility should throw a better exception when 
cannot resolve a service from container.
        Type: Improvement
        Importance: Medium
        
        Description:
        When trying to connect to a service that has unresolved dependencies an 
EndpointNotFoundException is generated. By this exception is hard to say what 
the problem was.
Would it be possible to throw a more container-specific exception to make 
easier to detect this kind of problems?
The unit test to reproduce the problem:
                [Test]
                public void Should_throw_for_unresolved_service_dependency()
                {
                        var container = new WindsorContainer()
//                              
.Register(Component.For<IDependency>().ImplementedBy<Dependency>()) // 
Uncomment to make test to pass
                                .AddFacility<WcfFacility>()
                                .Register(Component
                                                .For<IMyService>()
                                                .ImplementedBy<MyService>()
                                                .ActAs(new 
DefaultServiceModel().AddEndpoints(
                                                        WcfEndpoint.BoundTo(new 
NetTcpBinding {PortSharingEnabled = true})
                                                                
.At("net.tcp://localhost/IMyService"))
                                                ))
                                ;
                        var myService = 
ChannelFactory<IMyService>.CreateChannel(new NetTcpBinding {PortSharingEnabled 
= true},
                                                                                
 new EndpointAddress("net.tcp://localhost/IMyService"));
                        myService.Operation();
                        container.Dispose();
                }
                public class MyService : IMyService
                {
                        public MyService(IDependency dependency) { }
                        public void Operation() { }
                }
                [ServiceContract]
                public interface IMyService
                {
                        [OperationContract] void Operation();
                }
                public interface IDependency { }
                public class Dependency : IDependency { }
        
For more, see 
http://support.castleproject.org/projects/FACILITIES/issues/view/FACILITIES-ISSUE-110
 
        
--
donjon
by Castle Stronghold
http://www.castle-donjon.com



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
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-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to