A server and client application implementation using wsdl2ru

Hi All,

One of our client had created a WSDL in ASP and sent it over asking us
to implement the same structure in ruby. I created server and client
files (4 files each) using these commands

wsdl2ruby.rb –wsdl /home/Test.wsdl –type server –force
wsdl2ruby.rb –wsdl /home/Test.wsdl –type client –force

My questions are :-

  1. how can i create WSDLs automatically like in AWS -
    (saw this post but not able to make it
    SOAP::RPC::StandaloneServer and WSDLs - Ruby - Ruby-Forum)

  2. Am able to run the server app. But when am sending the request from
    client its shows error like
    " ERROR – Test: GET request not allowed " (am getting this same error
    when i try http://localhost:3000test/wsdl/)

  3. Am calling my client like this
    driver = SOAP::WSDLDriverFactory.new(url).create_rpc_driver
    result = driver.method(arg)

but am getting an error like this :-
RuntimeError (Unexpected response: #<HTTP::Message::Headers:0x23d2f28
@request_via_proxy=nil, @is_request=false, @response_status_code=405,
@body_charset=nil, @request_query=nil, @request_method=nil,
@header_item=[[“Connection”, “close”], [“Date”, “Sat, 19 Jul 2008
09:26:32 GMT”], [“Content-Type”, “text/html”], [“Server”, “WEBrick/
1.3.1 (Ruby/1.8.6/2008-03-03)”], [“Content-Length”, “297”], [“Allow”,
“POST”]], @body_type=nil, @request_uri=nil, @body_date=nil,
@http_version=“1.1”, @reason_phrase="Method Not Allowed ",
@chunked=false, @body_size=0>):
2058:in follow_redirect' /Library/Ruby/Gems/1.8/gems/httpclient-2.1.2/lib/httpclient.rb: 1890:in get_content’
importer.rb:73:in fetch' /Library/Ruby/Gems/1.8/gems/soap4r-1.5.8/lib/wsdl/xmlSchema/ importer.rb:36:in import’

i have already added these lines in my env.rb

require ‘rubygems’
gem ‘soap4r’

then what could be wrong?

am using
ruby - 1.8.6
soap4r - 1.5.8
mac-os leopard

Thanks in advance :slight_smile: