Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Soap4R - Question
Ball Balla
1/19/2009 11:05:00 PM
I am trying to add a custom header to my outgoing SOAP4R messages.
I figured out how to add a header by doing the following.
class ClientAuthHeaderHandler < SOAP::Header::Handler
NAMESPACE = XSD::QName.new("somenamespace", "test")
def initialize
super(NAMESPACE)
end
def on_simple_outbound
{ "MY_KEY" => 'somevalue' }
end
end
driver = SOAP::WSDLDriverFactory.new('somewsdl').create_rpc_driver
driver.headerhandler << ClientAuthHeaderHandler.new
Which will produce the following output for the header
<env:Header>
<n1:test xmlns:n1="somenamespace" env:mustUnderstand="0">
<n1:MY_KEY>somevalue</n1:MY_KEY>
</n1:test>
</env:Header>
But I do not want the n1:test namespace. IE all I want is
<env:Header>
<n1:MY_KEY>somevalue</n1:MY_KEY>
</env:Header>
How can I accomplish this?
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Soap4R - Question
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password