Error in designing Ruby WebService Cleint


#1

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/}GetRecommendations

RETURNS

parameters GetRecommendationsResponse -

{http://www.blog.org/TextBlogWSDL/}GetRecommendationsResponse

RAISES

parameters Fault - {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:indo_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:inunmarshal’
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:inroute’
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:incall’
from (eval):6:in `getRecommendations’
from TextBlogWSDLClient.rb:176
Exit code: 1

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

Thanks
Bhargavi