Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
require 'soap/header/simplehandler' class ClientAuthHeaderHandler < SOAP::Header::SimpleHandler SessionHeader = XSD::QName.new("rn:enterprise.soap.sforce.com", "SessionHeader") attr_accessor :sessionid def initialize super(SessionHeader) @sessionid = nil end def on_simple_outbound if @sessionid {"sessionId" => @sessionid} end end def on_simple_inbound(my_header, mustunderstand) @sessionid = my_header["sessionid"] end end
This paste will be private.
From the Design Piracy series on my blog: