Forum: Ruby soap4r and WSDL

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.
Bde8d8f24c1ca83f452b5a9d03d5ead6?d=identicon&s=25 Wouter de Bie (xinit)
on 2009-05-14 21:18
Attachment: Payment.wsdl (40 KB)
Hi all!

I'm trying to use a web service of my payment provider by making SOAP
calls to their server. I'm using the WSDL that is attached to this post
(couldn't add urls though ruby-forum.com)

For some reason I can't seem to call the provided services. I always get
the error "nil not allowed: currency" when trying to call a method that
doesn't even has currency (or Amount) as a parameter. Maybe I'm doing
something very wrong here, but I can't seem to figure out how to get
this thing working.

The latest thing I came up with was:

        wsdl = SOAP::WSDLDriverFactory.new(WSDL)
        soap = @wsdl.create_rpc_driver
        soap.options["protocol.http.basic_auth"] << [WSDL, USER_ID,
PASSWORD]

        result = soap.cancel(:cancel => {
                                    :modificationRequest => {
                                        :merchantAccount => 'myAccount',
                                        :originalReference =>
'8343424242056'
                                    }
                                })

Anyone got an idea?

Thanks!

Wouter
Bde8d8f24c1ca83f452b5a9d03d5ead6?d=identicon&s=25 Wouter de Bie (xinit)
on 2009-05-15 13:12
Ah, got it.. After require 'soap4r' it works!
This topic is locked and can not be replied to.