# Question on soap

**URL:** <https://www.ruby-forum.com/t/question-on-soap/52896>\
**Category:** Ruby\
**Created:** [January 20, 2006, 12:53am UTC](https://www.ruby-forum.com/t/question-on-soap/52896 "2006-01-20T00:53:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [January 20, 2006, 12:53am UTC](https://www.ruby-forum.com/t/question-on-soap/52896/1 "2006-01-20T00:53:44Z")

</div>

Hi,

I’m using SOAP::RPC::Driver in order to write a soap client.

They webservice method that I’m using has a complex type as an input  
parameter.

When I invoke the webservice method (a login method) I get an error  
returned from the webservice saying that I have an invalid uid/pwd  
(which I know is not true).

I cannot find any information that says there is a different way of  
specifying complex types so I’ve just added the method like:

`
stub.add_method(‘login’, ‘user_name’, ‘password’, ‘version’,
‘application_name’)
`

Note the “user\_name”, “password” and “version” parameter are part of the  
complex type “user\_auth” whereas “application\_name” is a simple type.

I’ve tested this web method seperately using altova which works just  
fine and using SOAP::RPC::Driver on webservices with simple type input  
parameters also works as expected.

Any help appreciated …

Cheers,  
MikeC

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [February 6, 2006, 1:51am UTC](https://www.ruby-forum.com/t/question-on-soap/52896/2 "2006-02-06T01:51:13Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi,

Mike Carr wrote:

> `
> stub.add_method(‘login’, ‘user_name’, ‘password’, ‘version’,
> ‘application_name’)
> `
> 
> Note the “user\_name”, “password” and “version” parameter are part of the  
> complex type “user\_auth” whereas “application\_name” is a simple type.

Can I see the WSDL of the service, or a sample SOAP request which should  
be sent?

The following client may work though.

stub.add\_method(‘login’, ‘user\_auth’, ‘application\_name’)  
stub.login(  
:user\_auth =\> {:user\_name =\> ‘username’, :password =\> ‘pwd’},  
:application\_name =\> ‘appname’  
)

Regards,  
// NaHi  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.1 (Cygwin)

iD8DBQFD5pzuf6b33ts2dPkRAjdSAKCNDmXKVYtcfcRVntBTihkk7+Db7QCgiRnz  
4fB2N3kgCNePoJMAqcYqOl0=  
=7y8J  
-----END PGP SIGNATURE-----
