What's the best way to use SOAP with Ruby?

后端 未结 10 1520
别那么骄傲
别那么骄傲 2020-11-27 10:15

A client of mine has asked me to integrate a 3rd party API into their Rails app. The only problem is that the API uses SOAP. Ruby has basically dropped SOAP in favor of RE

10条回答
  •  眼角桃花
    2020-11-27 10:52

    We used the built in soap/wsdlDriver class, which is actually SOAP4R. It's dog slow, but really simple. The SOAP4R that you get from gems/etc is just an updated version of the same thing.

    Example code:

    require 'soap/wsdlDriver'
    
    client = SOAP::WSDLDriverFactory.new( 'http://example.com/service.wsdl' ).create_rpc_driver
    result = client.doStuff();
    

    That's about it

提交回复
热议问题