Forum: Ruby Question on soap

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8eb353c574def143fb3c2dc1c4e9bc5d?d=identicon&s=25 Mike Carr (mikec)
on 2006-01-20 00:53
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:

<code>

stub.add_method('login', 'user_name', 'password', 'version',
'application_name')

</code>

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
C4ec160c6223ee24609cbd07fd922be5?d=identicon&s=25 NAKAMURA, Hiroshi (Guest)
on 2006-02-06 01:51
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Mike Carr wrote:
> <code>
>
> stub.add_method('login', 'user_name', 'password', 'version',
> 'application_name')
>
> </code>
>
> 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-----
This topic is locked and can not be replied to.