views:

592

answers:

1

i have a rails app must consume wcf services provided by asp.net, are there any ruby clients for wcf?

+3  A: 

Are you in control of the web service? Can you change the web.config a bit? (You indicate Asp.Net so I guess that means the WCF Service is hosted in IIS.)

A WCF service can be exposed as a regular old web-service. It's one of the promises of WCF: the same service can be exposed via many bindings with nothing but a configuration change.

<endpoint address="" binding="basicHttpBinding" contract="IServiceContract">

Then you can call it from Ruby like so:

require 'soap/wsdlDriver'   
soap = SOAP::WSDLDriverFactory.new("http://host/SomeService.svc?wsdl").create_rpc_driver
soap.ServiceMethod(:param1=> Value, :param2 => AnotherValue)
brendanjerwin
thanks brendanjerwin. but i cannot control the wfc services :(
What bindings are in use?
brendanjerwin
BasicHttpBinding
Well, then it should work. I don't think there is any WCF-ness to be dealt with... Try my ruby sample. If you are still having problems then it's probably just an issue with the way you are calling the method.
brendanjerwin