Got into this issue for the second time :(
It's covered now by a integration test, so, I'm backed now.

Also, I created a issue/improvement for it in Donjon -
FACILITIES-ISSUE-110<http://support.castleproject.org/projects/FACILITIES/issues/view/FACILITIES-ISSUE-110>
 .

On Tue, Oct 28, 2008 at 10:31 PM, Valeriu Caraulean <[EMAIL PROTECTED]>wrote:

> Hi,
> Just got into this issue. Services & endpoints registration didn't say
> anything, but when trying to connect with a client channel, it
> says EndpointNotFoundException. Spent enough time to find what caused that.
> It was an unresolved service dependency.
>
> Can anybody say, it's by design? I think the facility (or infrastructure)
> should throw when trying to build a service without all dependencies
> resolved, like it's done when resolving other components -
> "HandlerException. Can't create component... is waiting for the following 
> dependencies...".
>
> I'm going over source code, but don't have a fix yet. Only a test case to
> show this issue (sorry for not doing a full patch):
>
> [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 { }
>
> thanks...
>

--~--~---------~--~----~------------~-------~--~----~
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