Ruby en Rails 2007.

Posted by Bart ten Brinke Sun, 20 May 2007 13:42:27 GMT

We've been placed on the speaker list for Ruby en Rails 2007! See: http://2007.rubyenrails.nl/sprekers

There are only a few tickets left, so be sure to register quickly!

Update: 2007-06-02

You can now download a small and short teaser of whats to come :)

Download the Moves Teaser (Requires Quicktime with H.264)

Posted in ,  | no comments

Ruby + SOAP + Multiple servers

Posted by Andre Foeken Tue, 08 May 2007 13:02:26 GMT

The tutorials make it sound so easy. Plug and play even. Unfortunately reality (as always) bites hard.

SOAP integration is a piece of cake if you have one server and no authentication, but when you do the trouble starts. Although the problem is easy to solve once you know how, the lack of documentation on the subject is annoying.

Ruby's current SOAP implementation supports basic http authorisation during communication, however it does not support getting the WSDL file trough the same authorisation... (Argh! 1 ) So you have to pre-fetch the WSDL file and store it as a file, since Ruby does not support reading the WSDL file from a string (Argh! 2).

Since we have multiple servers running the same application on different ports the cached WSDL file is never correct...(Argh! 3) We solve this by overriding the WSDL's proxy setting.

The final code is short but it took me a while to find all this stuff out so I thought i'd post it here:


require 'soap/wsdlDriver'

# Connection settings
url   = "http://testingserver:3000/webservice"
usr  = "***"
pw  = "***"

wsdl_file = "wsdl/cached_file.wsdl"

factory = SOAP::WSDLDriverFactory.new(wsdl_file).create_rpc_driver
factory.options["protocol.http.basic_auth"] << [ url, usr, pw ]
factory.options["protocol.http.ssl_config.verify_mode"] = nil
factory.proxy.endpoint_url = url

Posted in , ,  | Tags  | no comments

Older posts: 1 2 3