Quantcast
Channel: Topliners : All Content - All Communities
Viewing all articles
Browse latest Browse all 3420

Rails 4: SOAP API - Security on Call

$
0
0

Hello,

 

I am using Ruby/Rails4.  I am stuck on authentication to the soap API using the savon gem (v2).  Here is what the code looks like:

 

@wsdl="https://secure.p03.eloqua.com/API/1.2/Service.svc?wsdl"

@basic_auth=["Company\\User","Password"]

@headers={"Authorization" => "Basic"}

client = Savon.client do |globals|

   globals.wsdl @wsdl

   globals.basic_auth @basic_auth

   globals.headers @headers

end

 

@test = client.call(:query,message:{eloquaType:{ID:0,Name:"Contact",Type:"Base"},searchQuery:"C_EmailAddress='user@domain.com'",pageNumber:1,pageSize:1})

 

The initialization works on setting up client... however, when I run client.call (with any operation), I get the following error:

 

(a:InvalidSecurity) An error occurred when verifying security for the message.

 

Any ideas?


Viewing all articles
Browse latest Browse all 3420

Trending Articles