문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top