From: "Hartin, Brian" Date: 2006-10-27T04:52:54+09:00 Subject: How can I populate header values in SOAP document? Hi all, Got a question about the Ruby SOAP library. I've generated a proxy using the SOAP::WSDLDriverFactory as follows: ws = SOAP::WSDLDriverFactory.new('http://foo.com/foo.wsdl').create_rpc_driver I can see that this generates methods for each defined operation, and I use them thusly: ws.WSGetResults(:maxRecords => 1, ...) The method and parameters are translated to the appropriate XML in the SOAP message body. However, some operations require a 'User' and 'Password' to be in the message _header_. I've looked through the documentation and mailing lists with no luck. How can one achieve this? My code is listed below. Thanks! Brian Hartin ---- soaptest.rb ---- require 'soap/wsdlDriver' require 'date' ws = SOAP::WSDLDriverFactory.new('http://foo.com/foo.wsdl').create_rpc_driver ws.generate_explicit_type = true r = ws.WSHeartbeat({}) # Works because it doesn't require authentication r = g.WSGetXmlResults(:recordId => 123, :recordLimit => 200) # Doesn't work ---- Example SOAP request, according to vendor ---- string string int int **************************************************************************** This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. ****************************************************************************