# SOAP Problem

**URL:** <https://www.ruby-forum.com/t/soap-problem/84961>\
**Category:** Ruby\
**Created:** [March 21, 2006, 11:38pm UTC](https://www.ruby-forum.com/t/soap-problem/84961 "2006-03-21T23:38:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_LaMarche](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c5a1d2/32.png) [@Jeff\_LaMarche](https://www.ruby-forum.com/u/Jeff_LaMarche)\
**Post date:** [March 21, 2006, 11:38pm UTC](https://www.ruby-forum.com/t/soap-problem/84961/1 "2006-03-21T23:38:47Z")

</div>

I’m using the SOAP::RPC::Driver to access a web service for which I  
don’t have a WSDL (actually, there is one, but it’s not well formed  
and it the WSDLDriverFactory chokes on it).

So, I create the driver:

QUERY\_URL = “[http://209.27.15.27/services/Query](http://209.27.15.27/services/Query)”  
stub = SOAP::RPC::Driver.new(QUERY\_URL)

Now I add a method. This method takes three parameters: a string, a  
long, and a long

stub.add\_method(‘getModuleList’, ‘securityToken’, ‘userId’, ‘companyId’)

Then I call the method. The problem is, the XML that’s getting  
created is specifying int instead of long for the second and third  
parameter:

queryRet = stub.getModuleList(security\_token, user\_id.to\_i,  
company\_id.to\_i)

which results in:

#SOAP::Mapping::Object:0x104d7cc: org.xml.sax.SAXException: Bad  
types (int → long) (SOAP::FaultError)

Is there any way to “force” it to specify that these parameters are  
long? It seems to only work correctly if user\_id and company\_id are  
big enough to force it to go to a Bignum. Any help would be greatly  
appreciated!

Thanks,  
Jeff
