Putting data at soap header

Hello everybody, I need help! :frowning:

I need to communicate through webservice, but I need put an information in the soap header before invoking the method.

I´m using this way:

soap = SOAP::WSDLDriverFactory.new(“http://ti-007.tron.local/CondominioWeb/CondominioWebServico.svc?wsdl”).create_rpc_driver

data_inicial = Date.new(2011, 05, 07)

data_final = Date.new(2011, 05, 07)

unidade_central_id = 5

unidade_id = 2505

@relatorio_id = soap.EmitaBoletos(data_inicial, data_final, unidade_central_id, unidade_id)

The idCliente = ‘XXXXXX’ must be included in the soap header

Anybody can help me? Thanks a lot!

Hi,

Have a look here - How can I populate header values in SOAP document? - Ruby - Ruby-Forum

You need to create your own Header handler and inject the data through that.

Cheers Simon