Welcome Guest, Not a member yet? Register   Sign In
Nusoap and operation header
#1

[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.




Theme © iAndrew 2016 - Forum software by © MyBB