Ruby on Rails
Wednesday, October 22, 2014
Hi
-- I am developing code to send XML to a SOAP WebService.
There function at that end is call checkReceived(arg0,arg1,arg3).
as you can see it has 3 arguments.
Getting very confused on how to achieve this. Below is my code, and it does not work.
uri = URI.parse(HZ_RECORD_URL)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = false
operation = "checkReceived"
service = "http://schemas.xmlsoap.org/wsdl/"
data = {
:arg0 => content_xml_str,
:arg1 => business_type_str,
:arg2 => "1"
}
headers = {
'Content-Type' => 'application/x-www-form-urlencoded;charset=UTF-8',
'SOAPAction' => '"' + service + '#' + operation + '"',
}
response = http.request_post(uri.path, data, headers)
Can anyone help? Thanks in advance
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/22110172-90e6-418d-b335-bcd67691ae08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment