From: Wayne Molina Date: 2009-10-12T23:56:49+09:00 Subject: soap4r header without a namespace Hello all. I'm trying to create a header using soap4r and the web service I'm calling requires a Username and Password to be sent as individual elements of the header. I've overridden SOAP::Header::SimpleHandler as follows: class CelltrustAuthHeader < SOAP::Header::SimpleHandler attr_accessor :username, :password def initialize(username, password) super(XSD::QName::EMPTY) @username, @password = username, password end def on_simple_outbound {"Username" => @username, "Password" => @password} end end However this is giving me an error when I call the web services method stating SOAP::Generator::FormatEncodeError: Element name not defined: #. If I pass in dummy values to the call to super, then it executes the request but the response gives me an error ("Security Violation" which means that it's not getting my username/password) since the request XML looks like this: myusername topsecret When the web service is expecting it to look like this: myusername topsecret I don't need or want the portion; how can I get rid of it? -- Posted via http://www.ruby-forum.com/.