From: Mark Thomas Date: 2009-05-01T02:40:04+09:00 Subject: Re: SOAP how to make a request On Apr 30, 11:27 am, Mario Ruiz wrote: > Hi, I'm newbie sorry > I'm testing a web service, loginCustomer but I don't know why always > returns... failed to login user. This is my code: > > require "soap/wsdlDriver" > WSDL_URL = "http://myserver/WS/services/Access?wsdl" > service = SOAP::WSDLDriverFactory.new(WSDL_URL).create_rpc_driver > > service.generate_explicit_type = true > service.wiredump_dev = STDOUT if $DEBUG > > query=" > xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' > xmlns:ser='http://myserver.com/WS/services'> >     >     >       >           >             myUser >             myPwd >           >       >     > > " > result = service.loginCustomer(query) > > The xml is working on another client I'm using so this is not the > problem. > > Thanks in advance. :) This doesn't look right. Usually, you don't hand-code a string containing SOAP XML and call SOAP4R methods with it. The purpose of SOAP4R is to shield you from all that. It's hard to tell exactly without the WSDL, but my guess is that what you really want is something like result = service.loginCustomer('user','pass'). Have you tried generating a sample client? See http://markthomas.org/2007/09/12/getting-started-with-soap4r/ -- Mark.