SOAP access Ruby

Hey,
I am having trouble calling a web service with ruby.

factory =
SOAP::WSDLDriverFactory.new('https://api.affili.net/V2.0/Logon.svc?wsdl')

driver = factory.create_rpc_driver
parameters = {
                        'Username' => '',
                        'Password' => '',
                        'WebServiceType' => 'Product',
                        'DeveloperSettings' => {'SandboxPublisherID' =>
0},
                        'ApplicationSettings' => {'ApplicationID' => 0,
'DeveloperID' => '1000' }
                      }
driver_logon.Logon(parameters)

I get the following ERROR : Unknown xml indentifier xml:lang

What should I do? .. I am checking now the driver options.. maybe.

Thanks a lot :slight_smile:

···

-----------------------------------
The WSDL for the logon function

<xsd:complexType name="Logon">
     <xsd:sequence>
     <xsd:element minOccurs="0" name="Username" nillable="true"
type="xsd:string"/>
     <xsd:element minOccurs="0" name="Password" nillable="true"
type="xsd:string"/>
     <xsd:element name="WebServiceType" type="tns:WebServiceTypes"/>
     <xsd:element minOccurs="0" name="DeveloperSettings" nillable="true"
type="tns:TokenDeveloperDetails"/>
  <xsd:element minOccurs="0" name="ApplicationSettings" nillable="true"
type="tns:TokenApplicationDetails"/>
</xsd:sequence>
</xsd:complexType>
  <xsd:element name="Logon" nillable="true" type="tns:Logon"/>
--
Posted via http://www.ruby-forum.com/.

It was because I need it to force it to use the gem and not the ruby
api. at least this is what I think.

I have used this. Weird but it works.

require 'rubygems'
gem 'soap4r'
require 'soap/wsdlDriver'
require 'soap/header/simplehandler'

···

--
Posted via http://www.ruby-forum.com/.

This is correct.

···

On Aug 13, 2009, at 07:53, Gabriel Policiuc wrote:

It was because I need it to force it to use the gem and not the ruby
api. at least this is what I think.

I have used this. Weird but it works.

require 'rubygems'
gem 'soap4r'
require 'soap/wsdlDriver'
require 'soap/header/simplehandler'

FWIW I've had a lot of problems using soap4r.

You might have a look at TorqueBox if you continue to have problems
yourself. Its SOAP support seems pretty nifty:

···

On Thu, Aug 13, 2009 at 8:53 AM, Gabriel Policiuc <gavri_gp@yahoo.com>wrote:

It was because I need it to force it to use the gem and not the ruby
api. at least this is what I think.

I have used this. Weird but it works.

require 'rubygems'
gem 'soap4r'
require 'soap/wsdlDriver'
require 'soap/header/simplehandler'

--
Tony Arcieri
Medioh/Nagravision