Skip to content

Instantly share code, notes, and snippets.

@zyrup
Last active November 17, 2020 19:27
Show Gist options
  • Save zyrup/3f2b6fd7c78992d62a71ba49d1409bfd to your computer and use it in GitHub Desktop.
Save zyrup/3f2b6fd7c78992d62a71ba49d1409bfd to your computer and use it in GitHub Desktop.
SOAP php wsdl eurotax/Autovista version 2.1.0
<?php
$web_service_url = 'http://webservices.eurotaxglass.com/wsdl/identification-v2.wsdl';
$header_part = '
<ETGHeader>
<VersionRequest>2.1.0</VersionRequest>
<Originator>
<Signature>SIGNATURE</Signature>
<LoginData>
<Name>USERNAME</Name>
<Password>PASSWORD</Password>
</LoginData>
</Originator>
<Request></Request>
</ETGHeader>
';
$soap_var_header = new SoapVar( $header_part, XSD_ANYXML, null, null, null );
$header = new SOAPHeader($web_service_url, 'ETGHeader', $soap_var_header);
$client = new SoapClient($web_service_url, array('trace' => 1));
$client->__setSoapHeaders($header);
$body_part = array(
'Settings' => array(
'ISOcountryCode' => 'CH',
'ISOlanguageCode' => 'DE',
'ISOcurrencyCode' => 'CHF',
),
'VehicleList' => array(
'Vehicle' => array(
'VehicleType' => array(
'VehicleTypeCode' => 10 // 20 60
),
'Make' => array(
'MakeCode' => '',
),
'Model' => array(
'ModelCode' => '',
)
)
)
);
try {
$response = $client->GetListVehicleType($body_part);
print_r($response);
} catch (Exception $e) {
print_r($e);
}
echo "REQUEST:\n" . $client->__getLastRequest() . "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment