Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Request Soap, parameters lost
  • Hi.
    Probleme is that parameters has not sent and some ar lost.
    How i do it:
    <?php
    $soap = \Request::forge('http://localhost/WebService.asmx?wsdl', 'soap');

    $soap->set_options(array(
    "trace"      => 1, 
    "exceptions" => 0,  
    "cache_wsdl" => 0
    )); 
    $soap->set_function('UserLogin');
    $soap->add_param(array(
    'sUserName' => 'user', 
    'sPassword' => 'password',
    'sServerName' => 'localhost',
    'iServerPort' => '4674'
    ));

    $r = $soap->execute();
    print_r($r);
    ?>
    So, how my probleme looks:
    In $soap object in connection->__last_request looks like: (<ns1:userlogin><param1>password</param1><param2>localhost</param2><param3>4674</param3></ns1:userlogin>) sUserName is lost. If i add some random parameter before sUserName then,  connection->__last_request looks like: (<ns1:userlogin><param1>username</param1><param2>password</param2><param3>localhost</param3><param4>4674</param4></ns1:userlogin>) so - somehow the first paramater always is lost. And param names not set, like i defined them.
    What am i doing wrong? Maybe better is to use SoapClient directly, not thru fuelPHP, because directly all works fine.
    Thanks!
  • Depending on the implementation you need to pass the params as an array,

    $soap->add_param(array(array(

    ...


    perhaps that is the case here too?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion