Hello,

I've a strange problem.
I've a WCF service serving IMailService contract and using the Wcf
integration, which works fine.

But the IMailService interface is not only used for wcf, but also internally:

I've a workflow using an ExternalDataExchange to communicate with the
outside world. When I instantiate the MailDataExchangeService, I give the
container so that it can use it to create an IMailService.
This is the CTor:
   public MailDataExchangeService(IServiceProvider serviceProvider) {...}

I use a IServiceProvider to make the component more generic and so I don't
make an strong link to windsor. But at runtime, I give a WindsorContainer
to this CTor.

When the workflow use it, this line is executed:
   IMailService mailService =
this.ServiceProvider.GetService(typeof(IMailService)) as IMailService;

And oops:

System.ArgumentException: "endpointName cannot be nul or empty"
at
Castle.Facilities.WcfIntegration.ContractEndpointModel.FromConfiguration(String
endpointName) dans
c:\\TeamCity\\buildAgent\\work\\5392892d1deb4cf1\\src\\Castle.Facilities.WcfIntegration\\WcfEndpoint.cs:ligne
197"

Well .. I don't understand why it's the WcfIntegration that handle this
instantiation ? Is it because it automatically handle all component with
the ServiceContract attribute ?
Do you have any idea on how to avoid this ?
I still have the possibility to duplicate the IMailService interface, one
with the ServiceContract attributes (used in wcf), and another one that's
just internally used. But it's ugly :)

Tx for any help!
Fabrice

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

Reply via email to