SOAP access Ruby

G

Gabriel Policiuc

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 :)

-----------------------------------
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"/>
 
G

Gabriel Policiuc

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'
 
E

Eric Hodel

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'

This is correct.
 
T

Tony Arcieri

[Note: parts of this message were removed to make it a legal post.]

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:

http://torquebox.org/documentation/browse/LATEST/soap-endpoints.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,930
Messages
2,570,072
Members
46,521
Latest member
JamieCooch

Latest Threads

Top