<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-jp">
<title>SOAP Test client</title>
</head>
<body>
<?php
if(($_POST['AreaCode'] != "") && ($_POST['LineCode'] != "") && ($_POST['StationCode'] != "")){
    
use_soap_error_handler(FALSE);
    
$client = new SoapClient("http://www.denno.net/SFCardFan/sfcardfandb.wsdl");
    try {
        
$result $client->getStationName($_POST['AreaCode'],$_POST['LineCode'],$_POST['StationCode']);
        
printf("地域コード : %d <br>"$result["AreaCode"]);
        
printf("路線コード : %d <br>"$result["LineCode"]);
        
printf("駅順コード : %d <br>"$result["StationCode"]);
        
printf("会社名 : %s <br>"mb_convert_encoding($result["CompanyName"], "EUC-JP""UTF-8"));
        
printf("路線名 : %s <br>"mb_convert_encoding($result["LineName"], "EUC-JP""UTF-8"));
        
printf("駅名 : %s <br>"mb_convert_encoding($result["StationName"], "EUC-JP""UTF-8"));
        
printf("備考 : %s <br>"mb_convert_encoding($result["Note"], "EUC-JP""UTF-8"));
    } catch (
SoapFault $fault) {
        
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faulstring})");
    }
}
?>
<form method="POST" action="soapclient.php">
<div>地域コード(10進数) : <input type="text" maxlength="3" name="AreaCode"></div>
<div>線区コード(10進数) : <input type="text" maxlength="3" name="LineCode"></div>
<div>駅順コード(10進数) : <input type="text" maxlength="3" name="StationCode"></div>
<input type="submit" value="送信">
<input type="reset" value="取消">
</form>
</body>
</html>