Different results between wsdl2ruby and wsdlDriver

Sorry for barging in like this, but I've spent a few days looking for this 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 pretty 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 working.

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 arguments.

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 when I try and give it a search string, it craps out on me, with an error that the datatype is wrong.

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

"<?xml version=\“1.0\” encoding=\“utf-8\” ?>\n<env:Envelope xmlns:xsd=\“http://www.w3.org/2001/XMLSchema”\n xmlns:env=\“http://schemas.xmlsoap.org/soap/envelope/”\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance&quot;>\n <env:Body>\n <n1:server_List xmlns:n1=\“urn:ActivationServer\”\n env:encodingStyle=\“http://schemas.xmlsoap.org/soap/encoding/&quot;>\n <credentials xmlns:n2=\“http://types.api.nable.com”\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 /usr/local/lib/ruby/1.8/xsd/datatypes.rb:1014 - invalid value for Integer: "defiant"
Exception `XSD::ValueSpaceError' at /usr/local/lib/ruby/1.8/xsd/datatypes.rb:1016 - {http://www.w3.org/2001/XMLSchema}int: cannot accept 'defiant'.
/usr/local/lib/ruby/1.8/xsd/datatypes.rb:1016:in `screen_data_str': {http://www.w3.org/2001/XMLSchema}int: cannot accept 'defiant'. (XSD::ValueSpaceError)

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

     [ XSD::QName.new("urn:ActivationServer", "server_List"),
       "",
       "server_List",
       [ ["in", "credentials", ["T_Credentials", "http://types.api.nable.com", "T_Credentials"]],
         ["in", "customerID", ["::SOAP::SOAPInt"]],
         ["retval", "Server_ListReturn", ["T_Server[]", "http://types.api.nable.com", "T_Server"]] ],
       { :request_style => :rpc, :request_use => :encoded,
         :response_style => :rpc, :response_use => :encoded }
     ],
     [ XSD::QName.new("urn:ActivationServer", "server_List"),
       "",
       "server_List",
       [ ["in", "credentials", ["T_Credentials", "http://types.api.nable.com", "T_Credentials"]],
         ["in", "searchCriteria", ["::SOAP::SOAPString"]],
         ["retval", "Server_ListReturn", ["T_Server[]", "http://types.api.nable.com", "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.

···

--
--------------------------------------------------------------------------
Matt Rose mattrose@folkwolf.net Visit my blog! http://folkwolf.net
He's a globe-trotting hunchbacked paranormal investigator haunted by
memories of 'Nam. She's a bloodthirsty insomniac fairy princess from a
different time and place. They fight crime!

Hi,

Sorry for late reply.

Matt Rose wrote:

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
arguments.

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.

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?

Regards,
// NaHi