Ruby soap4r header problem

  • Thread starter Gabriel Policiuc
  • Start date
G

Gabriel Policiuc

Hi,

I am trying to build a header using soap4r that is supposed to look like
this

<SOAP-ENV:Header>
<ns1:UserAuthentication
SOAP-ENV:mustUnderstand="1"
SOAP-ENV:actor="http://..api.address.com">
<ns1:iId>*****</ns1:iId>
<ns1:sPassword>*****</ns1:sPassword>
<ns1:sType>affiliate</ ns1:sType>
</ns1:UserAuthentication>

<ns1:getQuota SOAP-ENV:mustUnderstand="1" SOAP-
ENV:actor="http://api.affiliatewindow.com">true</ns1:getQuota>
</SOAP-ENV:Header>

What I have done is created a header derv. class

AffHeader < SOAP::Header::SimpleHandler

Created a UserAuthentification element.

def initialize
@element = XSD::QName.new(nil, "UserAuthentification")
super(@element)
end

And return a hash

def on_simple_outbound
self.mustunderstand = 1
{ "iId" => ID, "sPassword" => PASSWORD, "sType" => "affiliate" }
end

How can I make my header look like I want further. How do I add the
actor for example.

I am going to keep searching on this, any Help is very appreciated.

Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top