phpチュートリアル SOAP WSDLの簡単なアプリケーション例
<?php $ws = "http://www.bkjia.com/sd/2001/TemperatureService.wsdl"; $zipcode = "23590"; $client = new SoapClient($ws,array('trace' => 1)); $temperature = $client->getTemp($zipcode); echo htmlspecialchars($client->__getLastRequest()); ?>
soapから送信されたデータを取得する
<?php $ws = "http://www.bkjia.com/sd/2001/TemperatureService.wsdl"; $zipcode = "12312"; $client = new SoapClient($ws,array('trace' => 1)); $temperature = $client->getTemp($zipcode); echo htmlspecialchars($client->__getLastResponse()); ?>
wdslアプリケーション
<?php $ws = "http://www.bkjia.com/sd/2001/TemperatureService.wsdl"; $client = new SoapClient($ws); var_dump($client->__getFunctions()); ?>