# Error in designing Ruby WebService Cleint

**URL:** <https://www.ruby-forum.com/t/error-in-designing-ruby-webservice-cleint/164754>\
**Category:** Ruby\
**Created:** [April 5, 2009, 10:36am UTC](https://www.ruby-forum.com/t/error-in-designing-ruby-webservice-cleint/164754 "2009-04-05T10:36:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhargavi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/cab0a1/32.png) [@bhargavi](https://www.ruby-forum.com/u/bhargavi)\
**Post date:** [April 5, 2009, 10:36am UTC](https://www.ruby-forum.com/t/error-in-designing-ruby-webservice-cleint/164754/1 "2009-04-05T10:36:45Z")

</div>

Hi,

I am relatively new ro ruby. I need to design a ruby client for a soap  
based web services. By using wsdl2ruby i could generate client  
containing 4 files  
(default.rb , defaultDriver.rb ,defaultMappingRegistry.rb,  
defaultClient.rb)  
So in my defaultClient.rb ,I got this auto generated method…

# SYNOPSIS

# GetRecommendations(parameters)

# 

# ARGS

# parameters GetRecommendations -

{[http://www.blog.org/TextBlogWSDL/](http://www.blog.org/TextBlogWSDL/)}GetRecommendations

# 

# RETURNS

# parameters GetRecommendationsResponse -

{[http://www.blog.org/TextBlogWSDL/](http://www.blog.org/TextBlogWSDL/)}GetRecommendationsResponse

# 

# RAISES

# parameters Fault - {[http://www.blog.org/TextBlogWSDL/](http://www.blog.org/TextBlogWSDL/)}fault

# 

## parameters = nil obj.getRecommendations(parameters)

In this, I have replaced those above two lines with this.  
GetRecommendations take String as an input and returns String as output

parameters = GetRecommendations.new([“Hello”])  
getRecommendationsResponse = obj.getRecommendations(parameters)

but I am getting error at this line,saying xml parser error…  
getRecommendationsResponse = obj.getRecommendations(parameters)

## error:

> ruby TextBlogWSDLClient.rb  
> C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/xsd/xmlparser/xmlparser.rb:31:in  
> `parse': syntax error (XMLParserError) from C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/xsd/xmlparser/xmlparser.rb:31:in `do\_parse’  
> from  
> C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/parser.rb:102:in  
> `parse' from C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/processor.rb:39:in `unmarshal’  
> from  
> C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:285:in  
> `unmarshal' from C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:184:in `route’  
> from  
> C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:143:in  
> `call' from C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/driver.rb:181:in `call’  
> from (eval):6:in `getRecommendations’  
> from TextBlogWSDLClient.rb:176  
> Exit code: 1

Can anyone please resolve this issue… its a bit urgent/

Thanks  
Bhargavi
