下面是一些例子源代碼如何使用此Web服務:
< ? PHP中
require_once ' nusoap.php ' ) ;
元soapclient = soapclient ' http://live.capescience.com/ccx/globalweather.wsdl ' ) ;
元params = 陣列 '典' = > '膜層' ) ;
元中RET = $ soapclient -> " ,請致電(
' getweatherreport ' 為params
' capeconnect : globalweather : globalweather '
' capeconnect : globalweather : globalweather # getweatherreport ' ) ;
如果 計數美元 退休 > 1
美元相對濕度 = $中RET [ '溫度' ] [ ' relative_humidity ' ] ;
元time_measured = substr$理情 [ '戳' ] 11 5 ) ;
元公關 = "在"元time_measured "濕度: " $銠 "的環境溫度是: " 為理情 [ '溫度' ] [ '環境' ] ;
打印元公關 ;
否則
打印 " ,目前無法" ;

? >
globalweather Web服務
該網頁,以供此Web服務,是在這裡
Web服務在行動
目前無法使用