0

I am creating a proxy for a soap web service at runtime using soap4r.

proxy = SOAP::WSDLDriverFactory.new("http://www.example.com/endpoint?wsdl").create_rpc_driver

How do I execute a rpc with a object parameter?

diedthreetimes
  • 4,086
  • 26
  • 38
Lee
  • 9,432
  • 3
  • 30
  • 34

1 Answers1

0

I found the answer to my question. Let's say I have an RPC style web service with the following signature:

result SaveProduct(Product product)

I can execute that with soap4r:

proxy = SOAP::WSDLDriverFactory.new("http://www.example.com/endpoint?wsdl").create_rpc_driver
proxy.SaveProduct(:Product => {:name => 'product one', :cost => '12.50'})

Having spent some time with soap4r, I would recommend using wsdl2ruby.rb to generate the proxy objects if possible.

Lee
  • 9,432
  • 3
  • 30
  • 34