Forum: Ruby different results between wsdl2ruby and wsdlDriver

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
44d5033f854ba9246875c840f88ef0d3?d=identicon&s=25 Matt Rose (Guest)
on 2006-01-30 19:50
(Received via mailing list)
Sorry for barging in like this, but I've spent a few days looking for
info somewhere online, and I've just gone through the mailing list
archive, and I can't find anything anywhere.  I'm trying to talk to an
apache AXIS server, and I managed to send and receive responses to and
from this server using the stub files generated by wsdl2ruby.  I'm
much at the beginner level on every programming language except for bash
programming.  I really like ruby, and I'm confused why this isn't

I think the problem comes down to a SOAP method that can have two
different types of calls.

there's one call: server_List, that can take two different types of

1. credentials, customerID (which is numeric)
2. credentials, searchCriteria (which is a string)

When I use the stub files generated by wsdl2ruby, it somehow chooses the
2nd method for this server_List, and I get the result I want.

when I use the wsdlDriver code, it somehow uses the first method, and
I try and give it a search string, it craps out on me, with an error
the datatype is wrong.

This is a wiredump of the server_List call that uses the wsdl2ruby
stubs.  this call doesn't error out.

"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<env:Envelope
xmlns:xsi=\"\">\n  <env:Body>\n
<n1:server_List xmlns:n1=\"urn:ActivationServer\"\n
<credentials xmlns:n2=\"\"\n
xsi:type=\"n2:T_Credentials\">\n        <password
xsi:type=\"xsd:string\">******</password>\n      <userName
xsi:type=\"xsd:string\">******</userName>\n      </credentials>\n
<searchCriteria xsi:type=\"xsd:int\">defiant</searchCriteria>\n
</n1:server_List>\n  </env:Body>\n</env:Envelope>"

This is the error I get when I make the same call using the wsdlDriver.

Exception `ArgumentError' at
- invalid value for Integer: "defiant"
Exception `XSD::ValueSpaceError' at
/usr/local/lib/ruby/1.8/xsd/datatypes.rb:1016 -
{}int: cannot accept 'defiant'.
/usr/local/lib/ruby/1.8/xsd/datatypes.rb:1016:in `screen_data_str':
{}int: cannot accept 'defiant'.

This is the segment of driver code that is generated by wsdl2ruby

     ["urn:ActivationServer", "server_List"),
       [ ["in", "credentials", ["T_Credentials",
"", "T_Credentials"]],
         ["in", "customerID", ["::SOAP::SOAPInt"]],
         ["retval", "Server_ListReturn", ["T_Server[]",
"", "T_Server"]] ],
       { :request_style =>  :rpc, :request_use =>  :encoded,
         :response_style => :rpc, :response_use => :encoded }
     ["urn:ActivationServer", "server_List"),
       [ ["in", "credentials", ["T_Credentials",
"", "T_Credentials"]],
         ["in", "searchCriteria", ["::SOAP::SOAPString"]],
         ["retval", "Server_ListReturn", ["T_Server[]",
"", "T_Server"]] ],
       { :request_style =>  :rpc, :request_use =>  :encoded,
         :response_style => :rpc, :response_use => :encoded }

Thanks for any help any of you can give me.  If you need more info, I'm
still subscribed to the list.
C4ec160c6223ee24609cbd07fd922be5?d=identicon&s=25 NAKAMURA, Hiroshi (Guest)
on 2006-03-05 14:30
(Received via mailing list)
Hash: SHA1


Sorry for late reply.

Matt Rose wrote:
> 2nd method for this server_List, and I get the result I want.
Unfortunately soap4r cannot handle method overload.  Latter method
definition overwrites the former definition.

Stub files generated by wsdl2ruby and wsdlDriver should work as same I
think.  I must be slipping over something.  Can you show me the WSDL?

// NaHi
Version: GnuPG v1.4.2.1 (Cygwin)

This topic is locked and can not be replied to.