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 Jiang <[email protected]>
wrote:

> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/22110172-90e6-418d-b335-bcd67691ae08%40googlegroups.com
> <https://groups.google.com/d/msgid/rubyonrails-talk/22110172-90e6-418d-b335-bcd67691ae08%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAFKVRj_2Cy%2BQ84gTkpFaibV9wDCXbBRQs7m4hZZC%3DdnTKDnRUw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to