laravel-soap icon indicating copy to clipboard operation
laravel-soap copied to clipboard

error ARERR [149] A user name must be supplied in the control record

Open afieyudha opened this issue 5 years ago • 2 comments

i have issue when use header with auth and get this messages ARERR [149] A user name must be supplied in the control record

this is my code

` $namespace = 'http://remedy-sit.telkomsigma.co.id/arsys/WSDL/public/10.210.30.74/HPD_IncidentInterface_WS?WSDL'; $name = 'AuthenticationInfo'; $data = array('userName' => 'xxx', 'password' => 'xxx', 'authentication'=>'', 'locale'=>'', 'timeZone'=>'');

    $this->soapWrapper->add('CreateSession', function ($service) use ($namespace,$name,$data){
    $service
        ->wsdl('http://remedy-sit.telkomsigma.co.id/arsys/WSDL/public/10.210.30.74/HPD_IncidentInterface_WS?WSDL')
        ->trace(true)
        ->header($namespace,$name,$data)
        ->options([
            'user_agent' => 'PHPSoapClient',      // Add this as options
            'userName' => 'xxx',
            'password' => 'xxx'
        ]);
    });
    
    $response = $this->soapWrapper->call('CreateSession.HelpDesk_Query_Service', [
    'Incident_Number' => 'INC000000012600',
    ]);

    var_dump($response);

    exit;`

afieyudha avatar Sep 28 '20 09:09 afieyudha

Your options are wrong, remove them and it should work. see https://www.php.net/manual/en/soapclient.soapclient.php

pythondev1 avatar Oct 29 '20 03:10 pythondev1

@afieyudha did you solve this problem ? facing it now.

mosharaf13 avatar May 30 '21 10:05 mosharaf13