# \[OT\]Re: How to call WebService writed by java?

**URL:** <https://rubytalk.org/t/ot-re-how-to-call-webservice-writed-by-java/39618>\
**Category:** ruby-talk\
**Created:** [2 August 2007 17:18 UTC](https://rubytalk.org/t/ot-re-how-to-call-webservice-writed-by-java/39618 "2007-08-02T17:18:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Riddle](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Allen\_Riddle](https://rubytalk.org/u/Allen_Riddle)\
**Post date:** [2 August 2007 17:18 UTC](https://rubytalk.org/t/ot-re-how-to-call-webservice-writed-by-java/39618/1 "2007-08-02T17:18:58Z")

</div>

You can use the Ruby standard SOAP library. To send up the user, you may  
be able to get away with sending using hash notation. Hope this  
helps/works!

require 'soap/wsdlDriver'

factory = SOAP::WSDLDriverFactory.new("[http://pathToYourWsdl?wsdl&quot;\](http://pathToYourWsdl?wsdl&quot;%5C))  
soap = factory.create\_rpc\_driver  
soap.yourWebServiceMethod ( :username =\> 'user', :password =\> 'password'  
)

> **···**
>
> -----Original Message-----  
> From: John Joyce [mailto:dangerwillrobinsondanger@gmail.com]  
> Sent: Thursday, August 02, 2007 11:58 AM  
> To: ruby-talk ML  
> Subject: [OT]Re: How to call WebService writed by java?
> 
> On Aug 2, 2007, at 9:34 AM, Tim Pease wrote:
> 
> > On 8/2/07, venture Lee \<liwenqiu@gmail.com\> wrote:
> > 
> > > i public a webservice, it implement by java and xfire, method  
> > > parameter is a  
> > > complex type, example:  
> > > public class User() {  
> > > &nbsp;&nbsp;&nbsp;&nbsp;private String username;  
> > > &nbsp;&nbsp;&nbsp;&nbsp;private String password;  
> > > &nbsp;&nbsp;&nbsp;&nbsp;//...geter and seter  
> > > }  
> > > webservice method define : boolean login(User user);  
> > > How to call it by ruby, thanks
> > 
> > [ruby webservice - Google Search](http://www.google.com/search?q=ruby%20webservice)
> > 
> > TwP
> 
> No Reply is far better than RTFM.
