Ruby and SOAP RevisitedAn alternative method for using ZXTM's Control api with Ruby is to use the soap4r SOAP implementation. I have found this to be quite useful when writing scripts for testing recently. Soap4r can be found at, Note: At the time of writing the use of soap4r depends on the 'httpclient' Ruby library, formerly known as 'http-access2'. The first thing you have to do is obtain the published specification for ZXTM's API. You can download this from the product's admin interface, Diagnose > Technical Support, clicking "Control API WSDL Files". Extract this zip file to get the WSDL files we are looking for. Soap4r comes with a tool 'wsdl2ruby.rb' which will take our WSDL files and produce Ruby files which we can import into our scripts. The documentation for this tool is very good but the invocation you will use will look something like this,
You will receive the following files,
Once this is done you can include these in the programs or scripts you write. The important difference here, from our previous Ruby example, is that we no longer have to define every function that we intend to use and the arguments it expects. Doing this for any non-trivial script is onerous, so Zeus suggest using soap4r. Here is the analogous listing enabled virtual servers example using soap4r,
I hope this helps all you Ruby folks, it certainly helped me. Comments:This public messageboard is not a forum for technical support. To report technical support problems, please contact our dedicated Support team using the instructions at the bottom of this page.
Comment from:
Jonathan Lambert [Visitor]
· http://www.workhabit.com/
Um, thanks. You couldn't have been more helpful.
|
Recently...
Other Resources
|





