# Different results between wsdl2ruby and wsdlDriver

**URL:** <https://www.ruby-forum.com/t/different-results-between-wsdl2ruby-and-wsdldriver/98962>\
**Category:** Ruby\
**Created:** [January 30, 2006, 7:50pm UTC](https://www.ruby-forum.com/t/different-results-between-wsdl2ruby-and-wsdldriver/98962 "2006-01-30T19:50:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hazmatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b2d939/32.png) [@hazmatt](https://www.ruby-forum.com/u/hazmatt)\
**Post date:** [January 30, 2006, 7:50pm UTC](https://www.ruby-forum.com/t/different-results-between-wsdl2ruby-and-wsdldriver/98962/1 "2006-01-30T19:50:58Z")

</div>

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\](http://www.w3.org/2001/XMLSchema%5C)”\n  
xmlns:env="[http://schemas.xmlsoap.org/soap/envelope/\](http://schemas.xmlsoap.org/soap/envelope/%5C)“\n  
xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance\](http://www.w3.org/2001/XMLSchema-instance%5C)”\>\n env:Body\n  
\<n1:server\_List xmlns:n1="urn:ActivationServer"\n  
env:encodingStyle="[http://schemas.xmlsoap.org/soap/encoding/\](http://schemas.xmlsoap.org/soap/encoding/%5C)“\>\n  
\<credentials xmlns:n2="[http://types.api.nable.com](http://types.api.nable.com)"\n  
xsi:type="n2:T\_Credentials"\>\n \<password  
xsi:type="xsd:string"\>**\n \<userName  
xsi:type="xsd:string"\>**\n \n  
\<searchCriteria xsi:type="xsd:int"\>defiant\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](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](http://types.api.nable.com)”, “T\_Credentials”]],  
[“in”, “customerID”, [“:🧼:SOAPInt”]],  
[“retval”, “Server\_ListReturn”, [“T\_Server[]”,  
“[http://types.api.nable.com](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](http://types.api.nable.com)”, “T\_Credentials”]],  
[“in”, “searchCriteria”, [“:🧼:SOAPString”]],  
[“retval”, “Server\_ListReturn”, [“T\_Server[]”,  
“[http://types.api.nable.com](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.

---

<div class="post-metadata">

**Author:** ![hazmatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b2d939/32.png) [@hazmatt](https://www.ruby-forum.com/u/hazmatt)\
**Post date:** [March 5, 2006, 2:30pm UTC](https://www.ruby-forum.com/t/different-results-between-wsdl2ruby-and-wsdldriver/98962/2 "2006-03-05T14:30:56Z")

</div>

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

Hi,

Sorry for late reply.

Matt R. 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?

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

iD8DBQFECueaf6b33ts2dPkRAvUWAKCvya1oGuietr1khfdreFQYN5FrFgCfRiBz  
xU905442hNd27atBuUJ4lic=  
=T00+  
-----END PGP SIGNATURE-----
