日本黄色一级经典视频|伊人久久精品视频|亚洲黄色色周成人视频九九九|av免费网址黄色小短片|黄色Av无码亚洲成年人|亚洲1区2区3区无码|真人黄片免费观看|无码一级小说欧美日免费三级|日韩中文字幕91在线看|精品久久久无码中文字幕边打电话

當(dāng)前位置:首頁 > > 充電吧
[導(dǎo)讀]?? PHPERPHP技術(shù)交流 網(wǎng)絡(luò)應(yīng)用開發(fā)首頁博客留言個人中心登錄注冊關(guān)于 PHP的SOAP工具包--nusoap管理員2011-04-28 16:037460 0條

?? PHPERPHP技術(shù)交流 網(wǎng)絡(luò)應(yīng)用開發(fā)首頁博客留言個人中心登錄注冊關(guān)于 PHP的SOAP工具包--nusoap

什么是SOAP

SOAP:簡單對象訪問協(xié)議,簡單對象訪問協(xié)議(SOAP)是一種輕量的、簡單的、基于 XML 的協(xié)議,它被設(shè)計成在 WEB 上交換結(jié)構(gòu)化的和固化的信息。

NuSOAP 是一組功能強(qiáng)大的PHP類,使得使用和創(chuàng)建SOAP消息變得相當(dāng)簡單。NuSOAP由Dirtrich Ayala編寫,可以無縫地與很多最流行的SOAP服務(wù)實現(xiàn)交互,它遵循LGPL發(fā)布。NuSOAP提供了很多令人印象深刻的特性,包括:
●簡單 :NuSOAP的面向?qū)ο蠓椒[藏了SOAP消息組裝、解析、提交和接收的有關(guān)細(xì)節(jié),使用戶集中于應(yīng)用程序本身。
●WSDL生成和導(dǎo)入 :NuSOAP可以生成一個對應(yīng)于所發(fā)布Web服務(wù)的WSDL文檔,并且能導(dǎo)入一個WSDL引用在NuSOAP客戶端使用。
●代理類 :NuSOAP可以生成的一個代理類,允許調(diào)用遠(yuǎn)程方法,如同調(diào)用本地方法一樣。
●HTTP代理 :出于多種原因(安全性和審計是其中兩個原因),有些客戶端被強(qiáng)制將請求委托給HTTP代理,由代理代表客戶端執(zhí)行請求。也就是說,需要所有SOAP請求都傳遞給此代理,而不是直接查詢服務(wù)器。NuSOAP為指定代理服務(wù)器提供了基本支持。
●SSL :如果可以通過PHP使用CURL擴(kuò)展,NuSOAP還支持通過SSL的安全通信。

SOAP對PHP的版本要求

?soap要求PHP5.0以上版本,且php默認(rèn)是不加載soap模塊的。解決方法是在php.ini中的Dynamic Extensions里添加:extension=php_soap.dll,如果原來有這一條,只是被注釋掉了,那么只要把前邊的分號去掉就可以了。

注:nusoap可以兼容PHP4和PHP5。

SOAP相關(guān)基礎(chǔ)知識?

1.wsdl(web服務(wù)標(biāo)記語言)
WSDL(網(wǎng)絡(luò)服務(wù)描述語言,Web Services Description Language)是一門基于 XML 的語言,用于描述 Web Services 以及如何對它們進(jìn)行訪問。
具體參考請訪問下面網(wǎng)址 http://www.w3school.com.cn/wsdl/index.asp

2.soap
SOAP 是一種簡單的基于 XML 的協(xié)議,它使應(yīng)用程序通過 HTTP 來交換信息。
具體參考請訪問下面網(wǎng)址 http://www.w3school.com.cn/soap/index.asp

3.php擴(kuò)展
具體參考請訪問下面網(wǎng)址 http://php.net/manual/en/book.soap.php

NuSOAP的應(yīng)用舉例

天氣預(yù)報接口調(diào)用:

$client?=?new?nusoap_client('http://www.webxml.com.cn/WebServices/WeatherWS.asmx?wsdl',?'wsdl');
$client->soap_defencoding?=?'utf-8';
$client->decode_utf8?=?false;
$client->xml_encoding?=?'utf-8';
$param?=?array('theUserID'=>'',?'theCityCode'=>$city);
$result?=?$client->call('getWeather',?$param);
if(!$client->fault?AND?!$client->getError())
{
	print_r($result);
}
常用WEB SERVICE

天氣預(yù)報Web Service ,數(shù)據(jù)來源于中國氣象局
Endpoint : http://www.webxml.com.cn/WebServices/WeatherWebService.asmx
Disco : http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?disco
WSDL : http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl

IP地址來源搜索Web Service (是目前最完整的IP地址數(shù)據(jù))
Endpoint : http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx
Disco : http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx?disco
WSDL : http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx?wsdl

隨機(jī)英文、數(shù)字和中文簡體字Web Service
Endpoint : http://www.webxml.com.cn/WebServices/RandomFontsWebService.asmx
Disco : http://www.webxml.com.cn/WebServices/RandomFontsWebService.asmx?disco
WSDL : http://www.webxml.com.cn/WebServices/RandomFontsWebService.asmx?wsdl

中國郵政編碼

驗證碼圖片Web Service 支持中文、字母、數(shù)字 圖像和多媒體
Endpoint : http://www.webxml.com.cn/WebServices/ValidateCodeWebService.asmx
Disco : http://www.webxml.com.cn/WebServices/ValidateCodeWebService.asmx?disco
WSDL : http://www.webxml.com.cn/WebServices/ValidateCodeWebService.asmx?wsdl

Email 電子郵件地址驗證Web Service
Endpoint : http://www.webxml.com.cn/WebServices/ValidateEmailWebService.asmx
Disco : http://www.webxml.com.cn/WebServices/ValidateEmailWebService.asmx?disco
WSDL : http://www.webxml.com.cn/WebServices/ValidateEmailWebService.asmx?wsdl

中文簡體字

中文

火車時刻表Web Service (第六次提速最新列車時刻表)
Endpoint : http://www.webxml.com.cn/WebServices/TrainTimeWebService.asmx
Disco : http://www.webxml.com.cn/WebServices/TrainTimeWebService.asmx?disco
WSDL : http://www.webxml.com.cn/WebServices/TrainTimeWebService.asmx?wsdl

中國股票行情數(shù)據(jù)Web Service (支持深圳和上海股市的基金、債券和股票)
Endpoint : http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx
Disco : http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx?disco
WSDL : http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx?wsdl

即時外匯匯率數(shù)據(jù)Web Service
Endpoint : http://www.webxml.com.cn/WebServices/ExchangeRateWebService.asmx
Disco : http://www.webxml.com.cn/WebServices/ExchangeRateWebService.asmx?disco
WSDL : http://www.webxml.com.cn/WebServices/ExchangeRateWebService.asmx?wsdl

騰訊QQ在線狀態(tài)Web Service
Endpoint : http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx
Disco : http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx?disco
WSDL : http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx?wsdl

中國電視節(jié)目預(yù)告 (電視節(jié)目表)Web Service
Endpoint : http://www.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx
Disco : http://www.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx?disco
WSDL : http://www.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx?wsdl

外匯-人民幣即時報價Web Service
Endpoint : http://www.webxml.com.cn/WebServices/ForexRmbRateWebService.asmx
Disco : http://www.webxml.com.cn/WebServices/ForexRmbRateWebService.asmx?disco
WSDL : http://www.webxml.com.cn/WebServices/ForexRmbRateWebService.asmx?wsdl

中國股票行情分時走勢預(yù)覽縮略圖Web Service
Endpoint : http://www.webxml.com.cn/webservices/ChinaStockSmallImageWS.asmx
Disco : http://www.webxml.com.cn/webservices/ChinaStockSmallImageWS.asmx?disco
WSDL : http://www.webxml.com.cn/webservices/ChinaStockSmallImageWS.asmx?wsdl

國內(nèi)飛機(jī)航班時刻表 Web Service
Endpoint : http://www.webxml.com.cn/webservices/DomesticAirline.asmx
Disco : http://www.webxml.com.cn/webservices/DomesticAirline.asmx?disco
WSDL : http://www.webxml.com.cn/webservices/DomesticAirline.asmx?wsdl

中國開放式基金數(shù)據(jù)Web Service
Endpoint : http://www.webxml.com.cn/WebServices/ChinaOpenFundWS.asmx
Disco : http://www.webxml.com.cn/WebServices/ChinaOpenFundWS.asmx?disco
WSDL : http://www.webxml.com.cn/WebServices/ChinaOpenFundWS.asmx?wsdl

股票行情數(shù)據(jù) Web Service (支持香港、深圳、上?;?、債券和股票;支持多股票同時查詢)
Endpoint : http://www.webxml.com.cn/WebServices/StockInfoWS.asmx
Disco : http://www.webxml.com.cn/WebServices/StockInfoWS.asmx?disco
WSDL : http://www.webxml.com.cn/WebServices/StockInfoWS.asmx?wsdl
?

附件下載 nusoap-0.9.5.zip ?(177.77 KB) 共0條評論 ? 發(fā)表評論發(fā)表評論 ? 查看評論存檔 2014年01月 (2)2013年11月 (1)2013年08月 (1)2013年07月 (1)2013年05月 (1)2013年02月 (5)2012年10月 (1)2012年08月 (1)2012年07月 (2)2012年06月 (1)2012年05月 (1)2012年03月 (1)2012年02月 (1)2011年11月 (1)2011年09月 (1)2011年07月 (1)2011年06月 (3)2011年05月 (1)2011年04月 (2)2011年03月 (3)2010年12月 (6)2010年11月 (9)2010年10月 (10)2010年09月 (24)2010年08月 (24)2010年07月 (25)2008年12月 (1) 分類 PHP基礎(chǔ)編程技術(shù)數(shù)據(jù)庫CSS/JS服務(wù)器 推薦閱讀 PHP數(shù)據(jù)過濾JS獲取下一節(jié)點的函數(shù)PHP+MYSQL實現(xiàn)全文檢索JS身份證號碼有效性驗證PHP分頁顯示類JS函數(shù)的參數(shù)(arguments)的使用PHP接收郵件類(receivemail.class.php)下載PHP中文分詞的實現(xiàn)

www.phper.org.cn ?2014 ? 贛ICP備09008620號

聲明留言關(guān)于
本站聲明: 本文章由作者或相關(guān)機(jī)構(gòu)授權(quán)發(fā)布,目的在于傳遞更多信息,并不代表本站贊同其觀點,本站亦不保證或承諾內(nèi)容真實性等。需要轉(zhuǎn)載請聯(lián)系該專欄作者,如若文章內(nèi)容侵犯您的權(quán)益,請及時聯(lián)系本站刪除。
換一批
延伸閱讀

摘 要:“Apache+php+ MySQL”組成了一套完整的開發(fā)B/S架構(gòu)的網(wǎng)絡(luò)信息系統(tǒng)的工具。文中以該套工具開發(fā)產(chǎn)品售后服務(wù)管理系統(tǒng)為例,介紹了開發(fā)過程中的技術(shù)難點及解決方法。

關(guān)鍵字: Apache php MySQL 產(chǎn)品售后服務(wù)管理系統(tǒng)

PHP 7.4.9 版本現(xiàn)已發(fā)布,具體更新內(nèi)容如下:Apache:修復(fù)了錯誤#79030(升級 apache2handler 的 php_apache_sapi_get_request_time 以返

關(guān)鍵字: php

如果使用美國服務(wù)器創(chuàng)建網(wǎng)站,則必須在美國服務(wù)器系統(tǒng)上創(chuàng)建環(huán)境。 今天,我將介紹美國服務(wù)器Linux系統(tǒng)的工作方式。

關(guān)鍵字: apache Linux php

近日消息,PHP 8.0將于11月發(fā)布,但當(dāng)這個重要的新版本出現(xiàn)時,它遇到了很大的挫折,Windows將不支持它,原因未知。

關(guān)鍵字: php Windows 微軟

2020 年 6 月 8 日,PHP 迎來了自己的 25 周歲生日。JetBrains 在博客中梳理了該語言自 1995 年誕生以來的種種歷程,這種語言最初是用 C 語言編寫的一組通用網(wǎng)關(guān)接口(C

關(guān)鍵字: php

function logging() { var x = new XMLHttpRequest(); x.onre

關(guān)鍵字: php

C++需要實現(xiàn)PHP端的:bin2Hex函數(shù),PHP通過這種類型的字符串調(diào)用:pack轉(zhuǎn)換成PHP能識別的2進(jìn)制數(shù)據(jù)。 C++需要做的是實現(xiàn)一個bin2hex,其實只是把c++讀取的2進(jìn)制數(shù)據(jù)當(dāng)成b

關(guān)鍵字: C語言 php

方法一: 在 php 端 header('HTTP/1.1 204 No Content '); 利用http的原理進(jìn)行 方法二:利用src圖片加載的特性完成請求 寫一個函數(shù),函數(shù)體內(nèi) var i

關(guān)鍵字: php

php與nginx整合 PHP-FPM也是一個第三方的FastCGI進(jìn)程管理器,它是作為PHP的一個補(bǔ)丁來開發(fā)的,在安裝的時候也需要和PHP源碼一起編譯,也就是說PHP-FPM被編譯到PHP內(nèi)核中,因

關(guān)鍵字: nginx php

生成excel 當(dāng)然使用的是 phpExcel這個類庫了,可是它太麻煩了,對于只要簡單生成來說有點不值得 什么叫簡單,把數(shù)據(jù)庫的數(shù)據(jù)導(dǎo)入到excel就行了, 這個就是簡單了 下面看一段代碼(代碼來自網(wǎng)

關(guān)鍵字: excel php
關(guān)閉