CodeIgniter Forums
Nusoap and operation header - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Nusoap and operation header (/showthread.php?tid=29957)



Nusoap and operation header - El Forum - 04-27-2010

[eluser]Unknown[/eluser]
I'm having a problem with nusoap library. This is one of the operation in the wsdl:

Code:
<wsdl:operation name="consultarUbicaciones">
    <soap:operation soapAction="" style="document" />
    <wsdl:input name="consultarUbicaciones">
        <soap:header message="ns1:consultarUbicaciones" part="usuario" use="literal"></soap:header>
        <soap:header message="ns1:consultarUbicaciones" part="proveedor" use="literal"></soap:header>
        <soap:header message="ns1:consultarUbicaciones" part="password" use="literal"></soap:header>
        <soap:body parts="parameters" use="literal" />
    </wsdl:input>
    <wsdl:output name="consultarUbicacionesResponse">
        <soap:body use="literal" />
    </wsdl:output>
</wsdl:operation>


This is one of the operations in the wsdl, and required send usuario, proveedor and password, but are not part of the params of the function. I tried different ways but without success.

Code:
&lt;?php

    require_once('lib/nusoap.php');

    $ws = new soapclient('http://url.com?wsdl',true);

    $header = array(
        'usuario' => 'zzzz',
        'proveedor' => 'zzzz',
        'password' => 'zzzz'
    );

    $ret = $ws->call('consultarUbicaciones',array(),'','',$header);

?&gt;

Anyone can help me and say what I'm doing wrong?

Seba.