Does anyone know how to use Net:HTTP make soap request?

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

As long as the soap request has the right headers, it should be fine
with
simple request with text. But i’d recommend using savon, I’ve used it
before.

On Thu, Oct 23, 2014 at 10:46 AM, Fanglu J. [email protected]