Had time to get back to the WCF stuff: Here''s the latest class MyService include IWcfContract def ping(x) x end end uri = Uri.new "http://localhost:8700/MyService" binding = WSHttpBinding.new host = ServiceHost.new MyService host.add_service_endpoint(IWcfContract.to_clr_type, binding, uri); => Now raises the following error (new and different from last time, exciting!): *The contract name ''IWcfContract'' could not be found in the list of contracts implemented by the service ''IronRuby.Builtins.RubyClass''.* * * I also tried creating an abstract C# class as follows: public abstract class WcfContractClass : IWcfContract { public abstract string Ping(string input); } and then having the ruby class do this: class MyService < WcfContractClass however the same error occurs. Still running the dlr nightly v12211 build... Any ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090312/86701314/attachment.html>
Let me know if you''''re still having problems on saturday...because WCF cannot be _that_ hard Alternatively contact me off list.. to do some remote "pair" programming... this email address is my gtalk account or ask Hayley she''s got my contact details as does almost anybody else that is involved in the NZ .NET user groups. For everybody else on the list.. I respond best to IM or twitter (casualjim) ;) On Thu, Mar 12, 2009 at 12:43 AM, Orion Edwards <orion.edwards at gmail.com>wrote:> Had time to get back to the WCF stuff: Here''s the latest > class MyService > include IWcfContract > > def ping(x) > x > end > end > > uri = Uri.new "http://localhost:8700/MyService" > binding = WSHttpBinding.new > host = ServiceHost.new MyService > host.add_service_endpoint(IWcfContract.to_clr_type, binding, uri); > > > => Now raises the following error (new and different from last time, > exciting!): > > *The contract name ''IWcfContract'' could not be found in the list of > contracts implemented by the service ''IronRuby.Builtins.RubyClass''.* > * > * > I also tried creating an abstract C# class as follows: > > public abstract class WcfContractClass : IWcfContract > { > public abstract string Ping(string input); > } > > and then having the ruby class do this: > > class MyService < WcfContractClass > > however the same error occurs. Still running the dlr nightly v12211 > build... > > Any ideas? > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090312/87108673/attachment.html>
> Let me know if you''''re still having problems on saturday...because WCF > cannot be _that_ hardWCF isn''t hard... in C#. Thus far IronRuby''s lack of support for attributes seems to be killing it though.> Alternatively contact me off list.. to do some remote "pair" > programming... > this email address is my gtalk account or ask Hayley she''s got my contact > details as does almost anybody else that is involved in the NZ .NET user > groups. >I''ll have a go in the weekend if I get time and let you know. Cheers. For everybody else on the list.. I respond best to IM or twitter> (casualjim) ;) >Consider yourself followed! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090312/8faf7a00/attachment.html>
There''s no CLR Type object that can fully represent your Ruby class, so you can''t meaningfully pass the type to any API that wants to be able to create an object from it. This is still an area of active investigation and thought for us. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Wednesday, March 11, 2009 4:44 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] More WCF fail Had time to get back to the WCF stuff: Here''s the latest class MyService include IWcfContract def ping(x) x end end uri = Uri.new "http://localhost:8700/MyService" binding = WSHttpBinding.new host = ServiceHost.new MyService host.add_service_endpoint(IWcfContract.to_clr_type, binding, uri); => Now raises the following error (new and different from last time, exciting!): The contract name ''IWcfContract'' could not be found in the list of contracts implemented by the service ''IronRuby.Builtins.RubyClass''. I also tried creating an abstract C# class as follows: public abstract class WcfContractClass : IWcfContract { public abstract string Ping(string input); } and then having the ruby class do this: class MyService < WcfContractClass however the same error occurs. Still running the dlr nightly v12211 build... Any ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090312/5761c17d/attachment-0001.html>
But in the case of WCF this doesn''t have to be the case right? You can create a different behavior where you tell WCF how to create instances and you can create a service host that also knows how to handle dynamic objects. After all if you can get an IoC container to provide the instances, surely you can hook IronRuby in there too. Wouldn''t creating a servicehostfactory, servicehost and behavior solve the problem? I wasn''t expecting to use the plain vanilla WCF stuff but rather with a slightly customized infrastructure. On Thu, Mar 12, 2009 at 6:15 PM, Curt Hagenlocher <curth at microsoft.com>wrote:> There?s no CLR Type object that can fully represent your Ruby class, so > you can?t meaningfully pass the type to any API that wants to be able to > create an object from it. This is still an area of active investigation and > thought for us. > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > *Sent:* Wednesday, March 11, 2009 4:44 PM > *To:* ironruby-core at rubyforge.org > *Subject:* [Ironruby-core] More WCF fail > > > > Had time to get back to the WCF stuff: Here''s the latest > > > > class MyService > > include IWcfContract > > > > def ping(x) > > x > > end > > end > > > > uri = Uri.new "http://localhost:8700/MyService" > > binding = WSHttpBinding.new > > host = ServiceHost.new MyService > > host.add_service_endpoint(IWcfContract.to_clr_type, binding, uri); > > > > > > => Now raises the following error (new and different from last time, > exciting!): > > > > *The contract name ''IWcfContract'' could not be found in the list of > contracts implemented by the service ''IronRuby.Builtins.RubyClass''.* > > > > I also tried creating an abstract C# class as follows: > > > > public abstract class WcfContractClass : IWcfContract > > { > > public abstract string Ping(string input); > > } > > > > and then having the ruby class do this: > > > > class MyService < WcfContractClass > > > > however the same error occurs. Still running the dlr nightly v12211 > build... > > > > Any ideas? > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090312/43851e27/attachment.html>
> > Wouldn''t creating a servicehostfactory, servicehost and behavior solve the > problem? > I wasn''t expecting to use the plain vanilla WCF stuff but rather with a > slightly customized infrastructure. >I don''t have a particularly deep knowledge of WCF... I had been trying to search for how to do it with a non-standard servicehost, but hadn''t found anything amongst all the mess of people asking simple questions :-( Will try look for WCF -> IOC container related stuff and see if that helps -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090313/5ceeb3d7/attachment.html>
You are correct. There?s no general problem with WCF; it?s just this particular API that Orion is using that?s problematic. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Thursday, March 12, 2009 11:54 AM To: ironruby-core Subject: Re: [Ironruby-core] More WCF fail But in the case of WCF this doesn''t have to be the case right? You can create a different behavior where you tell WCF how to create instances and you can create a service host that also knows how to handle dynamic objects. After all if you can get an IoC container to provide the instances, surely you can hook IronRuby in there too. Wouldn''t creating a servicehostfactory, servicehost and behavior solve the problem? I wasn''t expecting to use the plain vanilla WCF stuff but rather with a slightly customized infrastructure. On Thu, Mar 12, 2009 at 6:15 PM, Curt Hagenlocher <curth at microsoft.com<mailto:curth at microsoft.com>> wrote: There?s no CLR Type object that can fully represent your Ruby class, so you can?t meaningfully pass the type to any API that wants to be able to create an object from it. This is still an area of active investigation and thought for us. From: ironruby-core-bounces at rubyforge.org<mailto:ironruby-core-bounces at rubyforge.org> [mailto:ironruby-core-bounces at rubyforge.org<mailto:ironruby-core-bounces at rubyforge.org>] On Behalf Of Orion Edwards Sent: Wednesday, March 11, 2009 4:44 PM To: ironruby-core at rubyforge.org<mailto:ironruby-core at rubyforge.org> Subject: [Ironruby-core] More WCF fail Had time to get back to the WCF stuff: Here''s the latest class MyService include IWcfContract def ping(x) x end end uri = Uri.new "http://localhost:8700/MyService" binding = WSHttpBinding.new host = ServiceHost.new MyService host.add_service_endpoint(IWcfContract.to_clr_type, binding, uri); => Now raises the following error (new and different from last time, exciting!): The contract name ''IWcfContract'' could not be found in the list of contracts implemented by the service ''IronRuby.Builtins.RubyClass''. I also tried creating an abstract C# class as follows: public abstract class WcfContractClass : IWcfContract { public abstract string Ping(string input); } and then having the ruby class do this: class MyService < WcfContractClass however the same error occurs. Still running the dlr nightly v12211 build... Any ideas? _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org> http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090312/92cdd46e/attachment-0001.html>
Look at how they do it in Autofac and Ninject that code is easier to follow than the code from the castle project 2009/3/12 Orion Edwards <orion.edwards at gmail.com>> Wouldn''t creating a servicehostfactory, servicehost and behavior solve the >> problem? >> I wasn''t expecting to use the plain vanilla WCF stuff but rather with a >> slightly customized infrastructure. >> > > I don''t have a particularly deep knowledge of WCF... I had been trying to > search for how to do it with a non-standard servicehost, but hadn''t found > anything amongst all the mess of people asking simple questions :-( > > Will try look for WCF -> IOC container related stuff and see if that helps > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090312/5f7261f4/attachment.html>
Hi Orion, http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/07/29/integrating-structuremap-with-wcf.aspx http://code.google.com/p/autofac/source/browse/trunk/src/Source/Autofac.Integration.Wcf/AutofacDependencyInjectionServiceBehavior.cs cheers Ivan 2009/3/12 Curt Hagenlocher <curth at microsoft.com>> You are correct. There?s no general problem with WCF; it?s just this > particular API that Orion is using that?s problematic. > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Thursday, March 12, 2009 11:54 AM > *To:* ironruby-core > *Subject:* Re: [Ironruby-core] More WCF fail > > > > But in the case of WCF this doesn''t have to be the case right? > You can create a different behavior where you tell WCF how to create > instances and you can create a service host that also knows how to handle > dynamic objects. After all if you can get an IoC container to provide the > instances, surely you can hook IronRuby in there too. > > Wouldn''t creating a servicehostfactory, servicehost and behavior solve the > problem? > I wasn''t expecting to use the plain vanilla WCF stuff but rather with a > slightly customized infrastructure. > > On Thu, Mar 12, 2009 at 6:15 PM, Curt Hagenlocher <curth at microsoft.com> > wrote: > > There?s no CLR Type object that can fully represent your Ruby class, so you > can?t meaningfully pass the type to any API that wants to be able to create > an object from it. This is still an area of active investigation and > thought for us. > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > *Sent:* Wednesday, March 11, 2009 4:44 PM > *To:* ironruby-core at rubyforge.org > *Subject:* [Ironruby-core] More WCF fail > > > > Had time to get back to the WCF stuff: Here''s the latest > > > > class MyService > > include IWcfContract > > > > def ping(x) > > x > > end > > end > > > > uri = Uri.new "http://localhost:8700/MyService" > > binding = WSHttpBinding.new > > host = ServiceHost.new MyService > > host.add_service_endpoint(IWcfContract.to_clr_type, binding, uri); > > > > > > => Now raises the following error (new and different from last time, > exciting!): > > > > *The contract name ''IWcfContract'' could not be found in the list of > contracts implemented by the service ''IronRuby.Builtins.RubyClass''.* > > > > I also tried creating an abstract C# class as follows: > > > > public abstract class WcfContractClass : IWcfContract > > { > > public abstract string Ping(string input); > > } > > > > and then having the ruby class do this: > > > > class MyService < WcfContractClass > > > > however the same error occurs. Still running the dlr nightly v12211 > build... > > > > Any ideas? > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090312/b2f0fead/attachment.html>