# Problem passing parameters to webservice from rails

**URL:** <https://www.ruby-forum.com/t/problem-passing-parameters-to-webservice-from-rails/173771>\
**Category:** Rails\
**Created:** [August 14, 2009, 1:23pm UTC](https://www.ruby-forum.com/t/problem-passing-parameters-to-webservice-from-rails/173771 "2009-08-14T13:23:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpcolom](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rpcolom](https://www.ruby-forum.com/u/rpcolom)\
**Post date:** [August 14, 2009, 1:23pm UTC](https://www.ruby-forum.com/t/problem-passing-parameters-to-webservice-from-rails/173771/1 "2009-08-14T13:23:17Z")

</div>

Hello,

I’ve a problem passing parameters calling a webservice (made with PHP)  
from rails.

My application does many calls to webservices. They can be done with any  
programming languages (it maybe transparent) and also they can be SOAP  
or REST.

In this explain of my problem, I want to call a WS Funtion ‘Login’ in  
the WS at ‘http://url\_ws’ that has a parameter that its name is ‘user’  
and its value is ‘myuser1’.

When I made a call to SOAP WS from RAILS (gem SOAP4R), my application  
does :

```
  wsdl = 'http://url_ws?wsdl'
  driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
  xmlout = driver.login({:user => 'myuser1'}).Return

```

If the WSServer (http://url\_ws) is made in JAVA the parameters passing  
is ok.  
example in JAVA Server:  
funcion login(user)  
puts user # user=‘myuser1’  
end

But if the WSserver (http://url\_ws) is made in PHP the parameters  
passing is NOT OK. The value of the parameters in the WS is the name &  
value.  
example in PHP Server:  
funcion login($user)  
puts $user # $user=‘usermyuser1’  
end

Anybody know what is happend? Is a problem from RAILS or is a problem  
from PHP?  
Anybody has any solution?

Thanks.  
Rafa.

---

<div class="post-metadata">

**Author:** ![rpcolom](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rpcolom](https://www.ruby-forum.com/u/rpcolom)\
**Post date:** [August 15, 2009, 12:37pm UTC](https://www.ruby-forum.com/t/problem-passing-parameters-to-webservice-from-rails/173771/2 "2009-08-15T12:37:46Z")

</div>

On 14 Aug 2009, at 12:23, Rafa C. wrote:

> 

Well it’s (thankfully) a long time since i’ve used soap from rails  
but when we did I’m pretty sure that we didn’t used named arguments  
like that - we’d just do driver.login(‘myuser1’)

Fred
