pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <legend id='ohlQg'><style id='ohlQg'><dir id='ohlQg'><q id='ohlQg'></q></dir></style></legend>
    1. <tfoot id='ohlQg'></tfoot>

    2. <small id='ohlQg'></small><noframes id='ohlQg'>

      <i id='ohlQg'><tr id='ohlQg'><dt id='ohlQg'><q id='ohlQg'><span id='ohlQg'><b id='ohlQg'><form id='ohlQg'><ins id='ohlQg'></ins><ul id='ohlQg'></ul><sub id='ohlQg'></sub></form><legend id='ohlQg'></legend><bdo id='ohlQg'><pre id='ohlQg'><center id='ohlQg'></center></pre></bdo></b><th id='ohlQg'></th></span></q></dt></tr></i><div class="yiy8c84" id='ohlQg'><tfoot id='ohlQg'></tfoot><dl id='ohlQg'><fieldset id='ohlQg'></fieldset></dl></div>

          <bdo id='ohlQg'></bdo><ul id='ohlQg'></ul>

        如何在php中使用soap類(舉例)?

        How to use soap class in php (with example)?(如何在php中使用soap類(舉例)?)
        <legend id='uo3rD'><style id='uo3rD'><dir id='uo3rD'><q id='uo3rD'></q></dir></style></legend>

          <bdo id='uo3rD'></bdo><ul id='uo3rD'></ul>

            <tbody id='uo3rD'></tbody>

              • <i id='uo3rD'><tr id='uo3rD'><dt id='uo3rD'><q id='uo3rD'><span id='uo3rD'><b id='uo3rD'><form id='uo3rD'><ins id='uo3rD'></ins><ul id='uo3rD'></ul><sub id='uo3rD'></sub></form><legend id='uo3rD'></legend><bdo id='uo3rD'><pre id='uo3rD'><center id='uo3rD'></center></pre></bdo></b><th id='uo3rD'></th></span></q></dt></tr></i><div class="8g4asqe" id='uo3rD'><tfoot id='uo3rD'></tfoot><dl id='uo3rD'><fieldset id='uo3rD'></fieldset></dl></div>
              • <tfoot id='uo3rD'></tfoot>

                  <small id='uo3rD'></small><noframes id='uo3rD'>

                  本文介紹了如何在php中使用soap類(舉例)?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我想通過這個(weather)示例了解 SOAP 的基本用法.處理這些數據的價值如何?

                  I would like to learn the basic usage of SOAP through this (weather) example. How is it worthy to process this data?

                  請求:

                  POST /globalweather.asmx HTTP/1.1
                  Host: www.webservicex.net
                  Content-Type: application/soap+xml; charset=utf-8
                  Content-Length: length
                  
                  <?xml version="1.0" encoding="utf-8"?>
                  <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
                    <soap12:Body>
                      <GetWeather xmlns="http://www.webserviceX.NET">
                        <CityName>string</CityName>
                        <CountryName>string</CountryName>
                      </GetWeather>
                    </soap12:Body>
                  </soap12:Envelope>
                  HTTP/1.1 200 OK
                  Content-Type: application/soap+xml; charset=utf-8
                  Content-Length: length
                  

                  回復:

                  <?xml version="1.0" encoding="utf-8"?>
                  <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
                    <soap12:Body>
                      <GetWeatherResponse xmlns="http://www.webserviceX.NET">
                        <GetWeatherResult>string</GetWeatherResult>
                      </GetWeatherResponse>
                    </soap12:Body>
                  </soap12:Envelope>
                  

                  推薦答案

                  最簡單的方法是:

                  $requestParams = array(
                      'CityName' => 'Berlin',
                      'CountryName' => 'Germany'
                  );
                  
                  $client = new SoapClient('http://www.webservicex.net/globalweather.asmx?WSDL');
                  $response = $client->GetWeather($requestParams);
                  
                  print_r($response);
                  

                  會輸出

                  stdClass Object
                  (
                      [GetWeatherResult] => <?xml version="1.0" encoding="utf-16"?>
                  <CurrentWeather>
                    <Location>Berlin-Tegel, Germany (EDDT) 52-34N 013-19E 37M</Location>
                    <Time>Jan 26, 2012 - 07:50 AM EST / 2012.01.26 1250 UTC</Time>
                    <Wind> from the SE (130 degrees) at 14 MPH (12 KT):0</Wind>
                    <Visibility> greater than 7 mile(s):0</Visibility>
                    <SkyConditions> mostly clear</SkyConditions>
                    <Temperature> 33 F (1 C)</Temperature>
                    <Wind>Windchill: 23 F (-5 C):1</Wind>
                    <DewPoint> 21 F (-6 C)</DewPoint>
                    <RelativeHumidity> 59%</RelativeHumidity>
                    <Pressure> 30.27 in. Hg (1025 hPa)</Pressure>
                    <Status>Success</Status>
                  </CurrentWeather>
                  )
                  

                  其余的可以用 SimpleXML 或類似的東西解析.

                  The rest can then be parsed with SimpleXML or something similar.

                  請注意,響應類型特定于此 Web 服務.有更好的 Web 服務,它們不只是返回一個 xml 字符串,而是在 WSDL 中提供響應結構.

                  Note, that the kind of response is specific to this web service. There are better web services out there, which do not simply return an xml string, but rather provide the response structure within the WSDL.

                  編輯更結構化"網絡服務的一個例子可能是同一站點上的 GeoIP 查找:

                  EDIT An example for a "more structured" webservice could be the GeoIP lookup on the same site:

                  $client = new SoapClient('http://www.webservicex.net/geoipservice.asmx?WSDL');
                  $result = $client->GetGeoIP(array('IPAddress' => '8.8.8.8'));
                  
                  print_r($result);
                  

                  這給你:

                  stdClass Object
                  (
                      [GetGeoIPResult] => stdClass Object
                          (
                              [ReturnCode] => 1
                              [IP] => 8.8.8.8
                              [ReturnCodeDetails] => Success
                              [CountryName] => United States
                              [CountryCode] => USA
                          )
                  
                  )
                  

                  現在您可以簡單地通過調用來訪問這些值

                  Now you can simply access the values by invoking

                  $country = $result->GetGeoIPResult->CountryName;
                  

                  這篇關于如何在php中使用soap類(舉例)?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  enable SOAP on PHP(在 PHP 上啟用 SOAP)
                  Get received XML from PHP SOAP Server(從 PHP SOAP 服務器獲取接收到的 XML)
                  not a valid AllXsd value(不是有效的 AllXsd 值)
                  PHP SoapClient: SoapFault exception Could not connect to host(PHP SoapClient:SoapFault 異常無法連接到主機)
                  Implementation of P_SHA1 algorithm in PHP(PHP中P_SHA1算法的實現)
                  Sending a byte array from PHP to WCF(將字節數組從 PHP 發送到 WCF)
                    <i id='kIQqf'><tr id='kIQqf'><dt id='kIQqf'><q id='kIQqf'><span id='kIQqf'><b id='kIQqf'><form id='kIQqf'><ins id='kIQqf'></ins><ul id='kIQqf'></ul><sub id='kIQqf'></sub></form><legend id='kIQqf'></legend><bdo id='kIQqf'><pre id='kIQqf'><center id='kIQqf'></center></pre></bdo></b><th id='kIQqf'></th></span></q></dt></tr></i><div class="8suwk68" id='kIQqf'><tfoot id='kIQqf'></tfoot><dl id='kIQqf'><fieldset id='kIQqf'></fieldset></dl></div>
                    • <legend id='kIQqf'><style id='kIQqf'><dir id='kIQqf'><q id='kIQqf'></q></dir></style></legend>

                      <small id='kIQqf'></small><noframes id='kIQqf'>

                        • <bdo id='kIQqf'></bdo><ul id='kIQqf'></ul>

                          1. <tfoot id='kIQqf'></tfoot>

                              <tbody id='kIQqf'></tbody>
                            主站蜘蛛池模板: 电池挤压试验机-自行车喷淋-车辆碾压试验装置-深圳德迈盛测控设备有限公司 | 东亚液氮罐-液氮生物容器-乐山市东亚机电工贸有限公司 | 铝合金风口-玻璃钢轴流风机-玻璃钢屋顶风机-德州东润空调设备有限公司 | 接地电阻测试仪[厂家直销]_电缆故障测试仪[精准定位]_耐压测试仪-武汉南电至诚电力设备 | 保定市泰宏机械制造厂-河北铸件厂-铸造厂-铸件加工-河北大件加工 | 小型单室真空包装机,食品单室真空包装机-百科 | 香港新时代国际美容美发化妆美甲培训学校-26年培训经验,值得信赖! | 期货软件-专业期货分析软件下载-云智赢| 成都离婚律师|成都结婚律师|成都离婚财产分割律师|成都律师-成都离婚律师网 | 光泽度计_测量显微镜_苏州压力仪_苏州扭力板手维修-苏州日升精密仪器有限公司 | 江苏南京多语种翻译-专业翻译公司报价-正规商务翻译机构-南京华彦翻译服务有限公司 | 水冷式工业冷水机组_风冷式工业冷水机_水冷螺杆冷冻机组-深圳市普威机械设备有限公司 | 骁龙云呼电销防封号系统-axb电销平台-外呼稳定『免费试用』 | 电气控制系统集成商-PLC控制柜变频控制柜-非标自动化定制-电气控制柜成套-NIDEC CT变频器-威肯自动化控制 | 废旧物资回收公司_广州废旧设备回收_报废设备物资回收-益美工厂设备回收公司 | 钢骨架轻型板_膨石轻型板_钢骨架轻型板价格_恒道新材料 | 便民信息网_家电维修,家电清洗,开锁换锁,本地家政公司 | 滚筒烘干机_转筒烘干机_滚筒干燥机_转筒干燥机_回转烘干机_回转干燥机-设备生产厂家 | 东莞工厂厂房装修_无尘车间施工_钢结构工程安装-广东集景建筑装饰设计工程有限公司 | 流水线电子称-钰恒-上下限报警电子秤-上海宿衡实业有限公司 | 金刚网,金刚网窗纱,不锈钢网,金刚网厂家- 河北萨邦丝网制品有限公司 | 泰来华顿液氮罐,美国MVE液氮罐,自增压液氮罐,定制液氮生物容器,进口杜瓦瓶-上海京灿精密机械有限公司 | 森旺-A级防火板_石英纤维板_不燃抗菌板装饰板_医疗板 | 广东健伦体育发展有限公司-体育工程配套及销售运动器材的体育用品服务商 | 超声波破碎仪-均质乳化机(供应杭州,上海,北京,广州,深圳,成都等地)-上海沪析实业有限公司 | 深圳市超时尚职业培训学校,培训:月嫂,育婴,养老,家政;化妆,美容,美发,美甲. | 集菌仪厂家_全封闭_封闭式_智能智能集菌仪厂家-上海郓曹 | 成都珞石机械 - 模温机、油温机、油加热器生产厂家 | 光栅尺厂家_数显表维修-苏州泽升精密机械 | 扬子叉车厂家_升降平台_电动搬运车|堆高车-扬子仓储叉车官网 | 春腾云财 - 为企业提供专业财税咨询、代理记账服务 | 苏州教学设备-化工教学设备-环境工程教学模型|同科教仪 | 北京征地律师,征地拆迁律师,专业拆迁律师,北京拆迁律师,征地纠纷律师,征地诉讼律师,征地拆迁补偿,拆迁律师 - 北京凯诺律师事务所 | 磷酸肌酸二钠盐,肌酐磷酰氯-沾化欣瑞康生物科技 | 3dmax渲染-效果图渲染-影视动画渲染-北京快渲科技有限公司 | 双相钢_双相不锈钢_双相钢圆钢棒_双相不锈钢报价「海新双相钢」 双能x射线骨密度检测仪_dxa骨密度仪_双能x线骨密度仪_品牌厂家【品源医疗】 | 合肥钣金加工-安徽激光切割加工-机箱机柜加工厂家-合肥通快 | 行业分析:提及郑州火车站附近真有 特殊按摩 ?2025实地踩坑指南 新手如何避坑不踩雷 | 英国雷迪地下管线探测仪-雷迪RD8100管线仪-多功能数字听漏仪-北京迪瑞进创科技有限公司 | 飞扬动力官网-广告公司管理软件,广告公司管理系统,喷绘写真条幅制作管理软件,广告公司ERP系统 | 下水道疏通_管道疏通_马桶疏通_附近疏通电话- 立刻通 |