1

I am working with a complicated SOAP service and I was wondering if there is a ruby tool that allows you to generate proxy classes with all the methods pre-generated.

NetBeans does a pretty good job of providing intellisence for classes and I'd love to work with SOAP from Ruby like I used to work with SOAP from Java/C#

4
  • I found this: github.com/mumboe/soap4r and there seems to have a wsdl2ruby.rb Commented Feb 3, 2012 at 1:45
  • make that an answer and accept it. as far as i know, soap4r is the only tool to generate static code from a wsdl. Commented Feb 3, 2012 at 17:26
  • I can't make something my own answer :) Maybe you can cut and paste and I will accept that as the answer. Commented Feb 3, 2012 at 21:50
  • It's totally ok to answer your own question :) meta.stackexchange.com/questions/16930/… Commented Feb 5, 2012 at 15:02

2 Answers 2

1

No but give Savonrb a shot. http://www.savonrb.com.

Sign up to request clarification or add additional context in comments.

Comments

0

Soap4r looks like the only code that will autogenerate proxy classes.

Handsoap will generate stubs for your services but doesn't appear to generate proxy classes.

Savon, as far as I know, requires you to hand code everything. I hope they one day add a stub generator.

Soap4r usage to make proxy classes and service

console> gem install soap4r console> wsdl2ruby.rb --wsdl yourWsdlFileOrAddress.wsdl --type client 

Dot notation

If you don't want static classes (e.g. not using autocomplete or IDE error checking), but want to access your hashes using dot notation, you can use one of the methods presented in this question:

hash['key'] to hash.key in Ruby

This enables you to access a hash similarly to an object.

a = myHash[:someField] # the standard way a = myHash.someField # with hash to hash key function 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.