I'm trying to use laravel-soap with waseel service and I got this error
SOAP-ERROR: Encoding: object has no 'CommonMessageHeader' property
Here is my Controller :
`<?php
namespace App\Http\Controllers;
use Artisaninweb\SoapWrapper\SoapWrapper;
use App\Soap\Request\submitSchema;
// use App\Soap\Response\submitSchemaResponse;
class SoapController
{
/**
@var SoapWrapper
*/
protected $soapWrapper;
/**
SoapController constructor.
@param SoapWrapper $soapWrapper
*/
public function __construct(SoapWrapper $soapWrapper)
{
$this->soapWrapper = $soapWrapper;
}
/**
Use the SoapWrapper
*/
public function show()
{
$this->soapWrapper->add('Currency', function ($service) {
$service
->wsdl('https://devzero.waseel.com/WaseelSwitch/Uhud/Service?wsdl')
->trace(true)
->classmap([
submitSchema::class,
// submitSchemaResponse::class,
]);
});
$response = $this->soapWrapper->call('Currency.submitSchema', [
new submitSchema('sah06', 'sult283', 'SAH')
]);
dd($response);
exit;
}
}`
And this is the submitSchema.php :
`<?php
namespace App\Soap\Request;
class submitSchema
{
protected $login;
protected $password;
protected $fullName;
public function __construct($login, $password, $fullName)
{
$this->login = $login;
$this->password = $password;
$this->fullName = $fullName;
}
public function getlogin()
{
return $this->login;
}
public function getpassword()
{
return $this->password;
}
public function getfullName()
{
return $this->fullName;
}
I'm trying to use laravel-soap with waseel service and I got this error
SOAP-ERROR: Encoding: object has no 'CommonMessageHeader' property
Here is my Controller : `<?php
namespace App\Http\Controllers;
use Artisaninweb\SoapWrapper\SoapWrapper; use App\Soap\Request\submitSchema; // use App\Soap\Response\submitSchemaResponse;
class SoapController { /**
@var SoapWrapper */ protected $soapWrapper;
/**
@param SoapWrapper $soapWrapper */ public function __construct(SoapWrapper $soapWrapper) { $this->soapWrapper = $soapWrapper; }
/**
Use the SoapWrapper */ public function show() { $this->soapWrapper->add('Currency', function ($service) { $service ->wsdl('https://devzero.waseel.com/WaseelSwitch/Uhud/Service?wsdl') ->trace(true) ->classmap([ submitSchema::class, // submitSchemaResponse::class, ]); });
$response = $this->soapWrapper->call('Currency.submitSchema', [ new submitSchema('sah06', 'sult283', 'SAH') ]);
dd($response); exit; } }`
And this is the submitSchema.php :
`<?php
namespace App\Soap\Request;
class submitSchema { protected $login; protected $password; protected $fullName;
public function __construct($login, $password, $fullName) { $this->login = $login; $this->password = $password; $this->fullName = $fullName; }
public function getlogin() { return $this->login; }
public function getpassword() { return $this->password; }
public function getfullName() { return $this->fullName; }
}`