[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
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-....