2

So I'm writing a Ruby client for a SOAP web service, and I've figured out how to call a simple method:

# WebServiceClient.rb
require 'soap/wsdlDriver'

wsdl_url  = 'http://urlmadness?wsdl'
service = SOAP::WSDLDriverFactory.new(wsdl_url).create_rpc_driver
result = service.simpleMethod(:sayHello => 'Hello')

p result.return

Now I need to write something that will call a web method that is expecting an attached file as a SOAP MIME Attachment (SwA). I've looked into Ruby's SOAP::Attachment class but I can't seem to figure out how to use it, and I can't find any examples anywhere.

Does anybody know how to use it to add a MIME attachment to a method call?

Thanks,
Alex

Alex Moore
  • 3,415
  • 1
  • 23
  • 39

1 Answers1

2

found two discussions in the soap4r google group:

"How to add attachment to doc/lit soap request?"
http://groups.google.com/group/soap4r/browse_frm/thread/1cfc1f87c5cbdda7/a8f58915d4a2de87?lnk=gst&q=attachment#a8f58915d4a2de87

ps. second link added as a comment.
i'm not allowed to post more than one link in an answer due to spam protection

rubiii
  • 6,903
  • 2
  • 38
  • 51
  • "SOAP4r & Attachment" http://groups.google.com/group/soap4r/browse_frm/thread/7be0736c0f56fed1/226c37e9926daefd?lnk=gst&q=attachment#226c37e9926daefd – rubiii Feb 28 '10 at 10:47
  • Thanks, this was more information than I could find on the subject. I should turn in my google/bing license. :) – Alex Moore Mar 06 '10 at 01:25