Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Writing a Simple SOAP Client

Reply
Thread Tools

Writing a Simple SOAP Client

 
 
junk6@microserf.org.uk
Guest
Posts: n/a
 
      06-06-2006
Hi

I'm having problems finding a basic tutorial on writing a SOAP client
in Ruby (and getting what I have found to work). This isn't a Rails
thing, just a command-line client.

So far, I have:

require 'soap/wsdlDriver'
factory = SOAP::WSDLDriverFactory.new('http://my.domain.com/wsdl.wsdl')
soap = factory.create_driver
soapResponse = soap.getWidget(:widgetName => 'my-widget')

(where getWidget is a SOAP method which takes an argument called
widgetName which must be a string).

This seems to work fine until the last line, where I get told that
"TypeError: cannot convert Hash into String".

How do I call my getWidget method?

The getWidget method returns a stream of bytes (a byte[] in
JWS-speak)---how do I get at those bytes once the method has returned?

Thanks in advance

C

 
Reply With Quote
 
 
 
 
gregarican
Guest
Posts: n/a
 
      06-06-2006
Here's an URL that lists an example --->
http://searchwebservices.techtarget....180700,00.html.


Hope this helps!

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi
>
> I'm having problems finding a basic tutorial on writing a SOAP client
> in Ruby (and getting what I have found to work). This isn't a Rails
> thing, just a command-line client.
>
> So far, I have:
>
> require 'soap/wsdlDriver'
> factory = SOAP::WSDLDriverFactory.new('http://my.domain.com/wsdl.wsdl')
> soap = factory.create_driver
> soapResponse = soap.getWidget(:widgetName => 'my-widget')
>
> (where getWidget is a SOAP method which takes an argument called
> widgetName which must be a string).
>
> This seems to work fine until the last line, where I get told that
> "TypeError: cannot convert Hash into String".
>
> How do I call my getWidget method?
>
> The getWidget method returns a stream of bytes (a byte[] in
> JWS-speak)---how do I get at those bytes once the method has returned?
>
> Thanks in advance
>
> C


 
Reply With Quote
 
 
 
 
junk6@microserf.org.uk
Guest
Posts: n/a
 
      06-06-2006
> Here's an URL that lists an example --->
> http://searchwebservices.techtarget....180700,00.html.


Thanks, I found this via Google and the example didn't work for me.
However, I tried it on another computer and found it did work; the
difference seems to be the version of Ruby---on my original machine I
had 1.8.2 and the other machine is running 1.8.3.

Thanks anyway.

C

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with a simple SOAP WSDL client? petermichaux@gmail.com Ruby 6 11-04-2010 03:55 PM
SOAP Client -getting data from SOAP::Mapping::Object? Mason Brown Ruby 1 05-23-2007 03:24 AM
Writing python SOAP client Alvin A. Delagon Python 0 10-20-2005 03:27 AM
client-to-client communication via SOAP Bruce ASP .Net Web Services 3 03-28-2005 02:31 AM
SOAP Client creation in ASP.NET using MS SOAP Toolkit Sham Ramakrishnan ASP .Net 2 07-01-2003 11:29 AM



Advertisments