<?php
require_once 'conf.php';

// STEP 0 : Get the values 
foreach ($_REQUEST as $var => $val) {
	$request[$var] = $val;
}

// STEP 1 : soap flow options
$options = array(
	'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,
	'cache_wsdl' => WSDL_CACHE_NONE,
	'soap_version' => SOAP_1_1,
	'encoding' => 'UTF-8'
);
// STEP 2 : Soap client initialization
$client = new SoapClient(WS_GATEWAY . 'locale?wsdl', $options);

// STEP 3 : Soap call on GET method of business-lines-v2 webservice
$result = $client->codes(array('parameters'=>array(
	'wsLogin'=> WS_LOGIN,
	'wsPassword'=> WS_PSW
)));

?>
<select onchange="get_business(this.value)" style="width:300px;" name="locale" id="locale">
	<option value="0">----- choisissez -----</option>
<?php 
foreach ($result->codesResult->locales->item as $locales) {
	echo '<option value="'.$locales->code.'">'.$locales->label.'</option>' . "\n";
}
?>
</select> 			