Created
August 20, 2008 17:03
-
-
Save briandoll/6402 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add unique header support to soap4r clients | |
# http://emphaticsolutions.com/index.php/2008/05/06/soap-headers-per-request-in-ruby/ | |
# | |
require 'soap/header/handlerset' | |
class SOAP::Header::HandlerSet | |
# resets the internal handler store to an empty representation | |
def reset | |
@store = XSD::NamedElements.new | |
end | |
# will ensure the only headers available in this object is the one you pass in | |
def set(header) | |
reset | |
add header | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment