I am trying to do the following SOAP call:
<soapenv:Envelope xmlns:xsi="http://ift.tt/ra1lAU" xmlns:xsd="http://ift.tt/tphNwY" xmlns:soapenv="http://ift.tt/sVJIaE" xmlns:set="http://ift.tt/2xMFNnV">
<soapenv:Header/>
<soapenv:Body>
<set:SetFile soapenv:encodingStyle="http://ift.tt/wEYywg">
<Filedata xsi:type="test:Filedata" xmlns:test="XXXXXXXXXXXXX.com">
</Filedata>
<Vehicle xsi:type="test:Vehicle" xmlns:test="XXXXXXXXXXXXXXXXXXX.com">
<Type xsi:type="test:VehicleType">Car</Type>
<Make xsi:type="test:Make">Tesla</Make>
<Model xsi:type="test:Model">Model S</Model>
<!--Optional:-->
<Licenseplate xsi:type="xsd:normalizedString">1-AAA-111</Licenseplate>
</Vehicle>
</set:SetFile>
</soapenv:Body>
</soapenv:Envelope>
When I do this in SOAPUI everything works great.
So in my Laravel project I am using a SoapWrapper and trying to do this same call from my application.
But I get the following error:
SoapFault
MySqli Error: Column 'type_id' cannot be null
So this is what I do in my SoapController:
public function show()
{
$this->soapWrapper->add('Name', function ($service) {
$service
->wsdl('XXXXX.php?wsdl')
->trace(true)
->options([
'login' => 'login',
'password' => 'passsword'
]);
});
// Without classmap
$response = $this->soapWrapper->call('Albatros.SetFile', [
'Type' => 'Car',
'Make' => 'Teska',
'Model' => 'Model S',
'Licenseplate' => '1-AAA-111',
]);
var_dump($response);
exit;
}
In my routes for testing I have
Route::get('testsoapcalls', 'SoapController@show');
So when I surf to /testsoapcalls I get the error, unfortunately
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire