Forum: Ruby SOAP Problem...

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.
4a7fbbca80dcec9edc46bf97b8a9d10f?d=identicon&s=25 Jeff LaMarche (Guest)
on 2006-03-21 23:38
(Received via mailing list)
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"
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
This topic is locked and can not be replied to.