# A server and client application implementation using wsdl2ru

**URL:** <https://www.ruby-forum.com/t/a-server-and-client-application-implementation-using-wsdl2ru/143611>\
**Category:** Ruby\
**Created:** [July 21, 2008, 7:26am UTC](https://www.ruby-forum.com/t/a-server-and-client-application-implementation-using-wsdl2ru/143611 "2008-07-21T07:26:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmvipin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/c0e974/32.png) [@vmvipin](https://www.ruby-forum.com/u/vmvipin)\
**Post date:** [July 21, 2008, 7:26am UTC](https://www.ruby-forum.com/t/a-server-and-client-application-implementation-using-wsdl2ru/143611/1 "2008-07-21T07:26:40Z")

</div>

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 -  
[http://localhost:3000/test/wsdl/](http://localhost:3000/test/wsdl/)  
?  
(saw this post but not able to make it  
[SOAP::RPC::StandaloneServer and WSDLs - Ruby - Ruby-Forum](http://www.ruby-forum.com/topic/145717#704459))

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\>):  
/Library/Ruby/Gems/1.8/gems/httpclient-2.1.2/lib/httpclient.rb:  
2058:in `follow_redirect' /Library/Ruby/Gems/1.8/gems/httpclient-2.1.2/lib/httpclient.rb: 1890:in `get\_content’  
/Library/Ruby/Gems/1.8/gems/soap4r-1.5.8/lib/wsdl/xmlSchema/  
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 🙂

Vipin
