Error in designing Ruby WebService Cleint

B

Bhargavi Vel

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: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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top