Interesting finding! What's funny is my
C# projects and assemblies are usually Camel cased with prefixes and
all that, with a few exceptions like some asp.net projects bearing the
domain name of the site. This is what lead me to this example! I just changed my C# service proxy assembly, updated my Silverlight project "et voilà"!!! Thanks for your help. :-) I have to say that keeping the Silverlight front-end in Ruby with Ruby web services leads to a nice consistent developer experience. If only I could get rid of the C# proxy ...! I know that you have said that the lack of attribute support is what would prevent that. Is there any option to "invent a syntax" that could be mapped to .Net attributes? Philippe John Lam (IRONRUBY) wrote: Yeah, but we're also going to have to think about some way to workaround this problem since we're going to run into cases out there with folks who have compiled assemblies that don't follow the .NET naming conventions (unbelievable but true! :))Thanks, -John-----Original Message----- From: [EMAIL PROTECTED] [mailto:ironruby-core- [EMAIL PROTECTED]] On Behalf Of Tomas Matousek Sent: Thursday, June 12, 2008 9:32 AM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Having difficulties using custom C# dlls with namespaces within IronRuby code The casing is not right. include mywebsvcproxyns is the same as include(mywebsvcproxyns()) I.e. mywebsvcproxyns is a method call. You need to start namespaces with a capital letter. BTW, that's also .NET naming convention. Tomas From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Philippe Monnet Sent: Thursday, June 12, 2008 5:37 AM To: IronRuby Subject: [Ironruby-core] Having difficulties using custom C# dlls with namespaces within IronRuby code Now that the Beta 2 of Silverlight provides support for WSI web services, I can now get an all-C# Silverlight app to call Rails (Action Web Service) web services. So I encapsulated my generated web service proxy in its own DLL so I can use it from Ruby, like so: ... require "System.ServiceModel" require "mywebsvcproxy" #my DLL ... include System::ServiceModel include mywebsvcproxyns ... svcproxy = mywebsvcproxyns::MyRoRServiceReference::MyRorWsPortClient.new() ... etc ... However I keep getting an error as soon as I hit the include for my assembly namespace. I have tried to simplify the issue by creating a very tiny assembly with a C# class with 2 properties and a constructor but I get the same issue. I even tried that from IR with the same results: - the require "mywebsvcproxy" returns true - if I evaluate mywebsvcproxyns I get undefined The DLL is in the same location as other .rb files in my Silverlight app directory. I have even tried to provide an absolute path in the require statement but that did not make any difference. After putting this email on hold for another check, I found out that as soon as I remove the namespace inside my custom assembly everything works like a charm. I ended up also removing all namespace references in the C# generated proxy and was able to get my IronRuby Silverlight app to successfully invoke my Rails web service. But coming back to the namespace issue, am I missing something basic in how I should be integrating with custom assemblies? Or is this a limitation for the time being? Philippe_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core |
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core