SOAP Headers Problem

49 views
Skip to first unread message

msdu...@gmail.com

unread,
Jan 22, 2014, 1:44:25 PM1/22/14
to sav...@googlegroups.com
Hi there!

I'm trying to convert a PHP script which communicates with SOAP to Ruby code.

Well here is the part that I'm stucked with:

..
$header = new SoapHeader($ns, 'KPSUserInfo', $kps['auth']);
$client->__setSoapHeaders($header);
...

* "$kps['auth']" returns both username and password.

As you can see SoapHeader takes 3 arguments here. But the documentation of Savon uses only 2 arguments.

How can I convert this to Ruby code with Savon? I tried this:

client = Savon.client(
                    wsdl: someURL,
                    soap_version: 2,
                    soap_header: { "KPSUserInfo" => "kps['auth']" }
                    )

But as you can see, there is no equivalent of "$ns" here.

Thanks in advance.
Reply all
Reply to author
Forward
0 new messages