From: "Dan Webb [dbw]" Date: 2009-02-10T18:34:58+09:00 Subject: Re: SOAP WSDLDriverFactory header params Hi Steven, Best thing to start off is get the newest version of SOAP4R from gem. I've used the WSDL2Ruby tool. The instructions for use are up at: http://dev.ctor.org/soap4r/wiki/Wsdl2Ruby I'm not sure how you produce the exact header information you want but this should help you. Instead of 3 this code will produce something along the lines of; 3 soapAuthentication.rb require 'soap/header/simplehandler' class SoapAuthHeader < SOAP::Header::SimpleHandler NAMESPACE = 'http://questionmark.com/QMWISE/' DIGEST = ENCODING = SIGNATURE = def initialize() super(XSD::QName.new(NAMESPACE, 'Trust')) end def on_simple_outbound { "Encoding" => ENCODING, "Digest" => DIGEST, "Signature" => SIGNATURE } end end main.rb require 'defaultDriver.rb' require 'soapAuthentication.rb' ## Create QMWise SOAP Driver wsdl = "http://?wsdl" user = "" pass = "" obj = defaultSOAP.new() obj.wiredump_dev = STDERR if $DEBUG trust = SoapAuthHeader.new obj.headerhandler << trust hope this helps a little. There's very little documentation when it comes to SOAP4R, so if you find out how to change the "n1" tag to "ticket" can you let me know ;) Cheers, Dan -----Original Message----- From: steven shingler [mailto:shingler@gmail.com] Sent: 09 February 2009 17:33 To: ruby-talk ML Subject: SOAP WSDLDriverFactory header params Hi all, I have a little bit of code which uses the WSDLDriverFactory library: class Swrapper def initialize(wsdl) wsdl = SOAP::WSDLDriverFactory.new(wsdl) @soap = wsdl.create_rpc_driver end def send_soap(method, params) @soap.send("#{method}", params) end end But, I can't figure out how to add stuff into the header of the soap message - like this: 3 test password 1 If anyone's used this library and knows, please shout! :) Thanks all Steven