views:

24

answers:

1

I am currently working on a ROR project that needs to consume some SOAP based web services. What I know about consuming web services borders on the 'dangerous'. The example that the site provides is using asp with XMLHTTP to send what appears to be some XML wrapped in a SOAP envelope. Included in the XML is the authentication information as well. If I build the XML separately could I then use HTTParty to send it on and get back the response?

If HTTParty is not the answer then any alternative suggestions would be very useful.

I wanted to include the asp sample but the 'formatted' text stripped out everything within angled brackets. As an aside can somebody please tell me how to set up a code block as this should leave angled brackets alone. I tried pre code .... /code /pre with angled brackets round them but that still stripped out everything in angled brackets.

Thanks in advance for all help.

A: 

It's possible to use HTTParty or any other HTTP client, but I wouldn't recommend it. You'd have to manually construct and deconstruct SOAP envelopes and objects.

Instead, try the Savon library. Although fairly new, it seems to be the module of choice for SOAP, over the venerable soap4r.

Mark Thomas
Thanks I've been looking over Savon's documentation and it's 'brief'! I guess I'll just have to install it and try it out. Thanks for the direction anyway.
nexar