Skip to content

Instantly share code, notes, and snippets.

@ellismarte

ellismarte/j.rb Secret

Last active June 4, 2016 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ellismarte/e222c75f141c81565c614de689058176 to your computer and use it in GitHub Desktop.
Save ellismarte/e222c75f141c81565c614de689058176 to your computer and use it in GitHub Desktop.
def call(credentials)
header_info = get_oauth_token(credentials)
soap_package = {
soap_header: {
"Authorization" => header_info[:token],
"timestamp" => header_info[:timestamp],
"signature" => header_info[:signature],
"SOAPAction" => "",
"content-type" => "application/xml"
},
message: {}
}
@client = Savon.client(wsdl: File.read('my.wsdl'),
endpoint: '',
namespaces: {"ns0" => "", "ns1" => "" },
convert_request_keys_to: :camelcase,
headers: { "Authorization" => header_info[:token],
"timestamp" => header_info[:timestamp],
"signature" => header_info[:signature],
"csn" => "0000000000",
"SOAPAction" => "",
"content-type" => "application/xml",
})
raw_response = @client.call(:match_account_contact, soap_package)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment