From: "NAKAMURA, Hiroshi" Date: 2004-05-08T22:28:32+09:00 Subject: New RAA SOAP interface sample client (was Re: RAA plan) Hi, NAKAMURA, Hiroshi wrote: > Within this week, you can retrieve and update RAA information via SOAP > interface. In fact, it already exists. If a person is familiar to WSDL > format, you can use RAA SOAP interface now. See WSDL at > http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.3/ for detail. > If not familiar, wait a sample client that I'll post in a few days... Here is a sample client. Each sample should work on ruby/CVS HEAD, ruby/1.8.1 and ruby/1.6.8 + soap4r/1.5.2. Of course it should run with soap4r/CVS. % ruby -rpp -rsoap/wsdlDriver -e ' raa = SOAP::WSDLDriverFactory.new( "http://www.ruby-lang.org/xmlns/soap/interface/RAA/0.0.4/" ).create_driver pp raa.gem("soap4r") ' You'll see the RAA information of "soap4r" project. This sample calls only one method 'raa.gem("projectname")'. Interface is defined in WSDL and you can see sample which calls all methods at http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/lib/soap4r/sample/wsdl/raa2.4/wsdlDriver.rb?rev=1.2 You can update RAA information with following code (excerpted from above sample code). name = 'sampleproject' pass = 'sampleproject' gem = raa.gem(name) # retrieve current information gem.project.version.succ! # modify it gem.updated = Time.now raa.update(name, pass, gem) # update By the way, above samples uses WSDL directly, so the client fetches WSDL each time. It's simple as a sample but could be a waste of time. With a script wsdl2ruby.rb which is included in soap4r/1.5.2 or soap4r/CVS, you can pregenerate skeleton driver script to avoid fetching WSDL each time. (i.e. ruby/CVS HEAD and ruby/1.8.1 do not include the script wsdl2ruby.rb). Here is a sample which uses wsdl2ruby.rb at http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/lib/soap4r/sample/soap/raa2.4/sample.rb?rev=1.1 Pregenerated skeleton driver files are at http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/lib/soap4r/sample/soap/raa2.4/ Regards, // NaHi