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

    <bdo id='6x8pB'></bdo><ul id='6x8pB'></ul>
<legend id='6x8pB'><style id='6x8pB'><dir id='6x8pB'><q id='6x8pB'></q></dir></style></legend>
  • <small id='6x8pB'></small><noframes id='6x8pB'>

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

  • <tfoot id='6x8pB'></tfoot>

        PHP &amp;XML - 如何從此 XML 在 PHP 中生成soap請(qǐng)求

        PHP amp; XML - How to generate a soap request in PHP from this XML?(PHP amp;XML - 如何從此 XML 在 PHP 中生成soap請(qǐng)求?)
          • <bdo id='VpZi6'></bdo><ul id='VpZi6'></ul>

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

                  <legend id='VpZi6'><style id='VpZi6'><dir id='VpZi6'><q id='VpZi6'></q></dir></style></legend>

                    <tbody id='VpZi6'></tbody>
                  <i id='VpZi6'><tr id='VpZi6'><dt id='VpZi6'><q id='VpZi6'><span id='VpZi6'><b id='VpZi6'><form id='VpZi6'><ins id='VpZi6'></ins><ul id='VpZi6'></ul><sub id='VpZi6'></sub></form><legend id='VpZi6'></legend><bdo id='VpZi6'><pre id='VpZi6'><center id='VpZi6'></center></pre></bdo></b><th id='VpZi6'></th></span></q></dt></tr></i><div class="ws3hgb3" id='VpZi6'><tfoot id='VpZi6'></tfoot><dl id='VpZi6'><fieldset id='VpZi6'></fieldset></dl></div>
                1. <tfoot id='VpZi6'></tfoot>

                  本文介紹了PHP &amp;XML - 如何從此 XML 在 PHP 中生成soap請(qǐng)求?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我對(duì) SOAP 操作完全陌生.

                  I am completly new to SOAP operations.

                  我收到了一個(gè) XML 文檔 (SOAP),以獲取一些運(yùn)輸方式的收集點(diǎn).

                  I have been provided with an XML document (SOAP) to get some collection points for a shipping method.

                  來自此處的手冊(cè):

                  http://privpakservices.schenker.nu/package/package_1.3/packageservices.asmx?op=SearchCollectionPoint

                  我可以看到我需要使用以下 SOAP 請(qǐng)求:

                  I can see that I need to use the following SOAP request:

                  POST /package/package_1.3/packageservices.asmx HTTP/1.1
                  Host: privpakservices.schenker.nu
                  Content-Type: text/xml; charset=utf-8
                  Content-Length: length
                  SOAPAction: "http://privpakservices.schenker.nu/SearchCollectionPoint"
                  
                  <?xml version="1.0" encoding="utf-8"?>
                  <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
                    <soap:Body>
                      <SearchCollectionPoint xmlns="http://privpakservices.schenker.nu/">
                        <customerID>long</customerID>
                        <key>string</key>
                        <serviceID>string</serviceID>
                        <paramID>int</paramID>
                        <address>string</address>
                        <postcode>string</postcode>
                        <city>string</city>
                        <maxhits>int</maxhits>
                      </SearchCollectionPoint>
                    </soap:Body>
                  </soap:Envelope>
                  

                  問題是我不知道如何使用 PHP 將其作為請(qǐng)求發(fā)送,以及如何獲得響應(yīng).

                  The thing is that i don't know how to send this as a request using PHP, and how to get the response.

                  任何幫助我確定正確方向的幫助,非常感謝.

                  Any help to pinpoint me in the right direction, is much appreciated.

                  更新

                  我可以用 var_dump 讀取響應(yīng)數(shù)據(jù).但是,我無法讀取單個(gè)元素?cái)?shù)據(jù).

                  I can read the response data with var_dump. However, I am not able to read individual element data.

                  我需要讀取如下數(shù)據(jù)

                  foreach($parser as $row) {
                    echo $row->customerID;
                    echo $row->key;
                    echo $row->serviceID;  
                  }
                  

                  推薦答案

                  如果有人感興趣,我已經(jīng)提供了正確答案:

                  If anyone should be interested, i have provided the correct answer:

                  $soapUrl = "http://privpakservices.schenker.nu/package/package_1.3/packageservices.asmx?op=SearchCollectionPoint";
                  
                  $xml_post_string = '<?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><SearchCollectionPoint xmlns="http://privpakservices.schenker.nu/"><customerID>XXX</customerID><key>XXXXXX-XXXXXX</key><serviceID></serviceID><paramID>0</paramID><address>Riksv?gen 5</address><postcode>59018</postcode><city>Mantorp</city><maxhits>10</maxhits></SearchCollectionPoint></soap12:Body></soap12:Envelope>';
                  
                  $headers = array(
                  "POST /package/package_1.3/packageservices.asmx HTTP/1.1",
                  "Host: privpakservices.schenker.nu",
                  "Content-Type: application/soap+xml; charset=utf-8",
                  "Content-Length: ".strlen($xml_post_string)
                  ); 
                  
                  $url = $soapUrl;
                  
                  $ch = curl_init();
                  curl_setopt($ch, CURLOPT_URL, $url);
                  curl_setopt($ch, CURLOPT_POST, true);
                  curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_post_string);
                  curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
                  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                  
                  $response = curl_exec($ch); 
                  curl_close($ch);
                  
                  $response1 = str_replace("<soap:Body>","",$response);
                  $response2 = str_replace("</soap:Body>","",$response1);
                  
                  $parser = simplexml_load_string($response2);
                  

                  這篇關(guān)于PHP &amp;XML - 如何從此 XML 在 PHP 中生成soap請(qǐng)求?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  enable SOAP on PHP(在 PHP 上啟用 SOAP)
                  Get received XML from PHP SOAP Server(從 PHP SOAP 服務(wù)器獲取接收到的 XML)
                  not a valid AllXsd value(不是有效的 AllXsd 值)
                  PHP SoapClient: SoapFault exception Could not connect to host(PHP SoapClient:SoapFault 異常無法連接到主機(jī))
                  Implementation of P_SHA1 algorithm in PHP(PHP中P_SHA1算法的實(shí)現(xiàn))
                  Sending a byte array from PHP to WCF(將字節(jié)數(shù)組從 PHP 發(fā)送到 WCF)

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

                      <legend id='hYST4'><style id='hYST4'><dir id='hYST4'><q id='hYST4'></q></dir></style></legend>

                            <tbody id='hYST4'></tbody>
                        1. <tfoot id='hYST4'></tfoot>

                          1. <small id='hYST4'></small><noframes id='hYST4'>

                            主站蜘蛛池模板: 伸缩器_伸缩接头_传力接头-巩义市润达管道设备制造有限公司 | 车件|铜件|车削件|车床加工|五金冲压件-PIN针,精密车件定制专业厂商【东莞品晔】 | 土壤有机碳消解器-石油|表层油类分析采水器-青岛溯源环保设备有限公司 | 郑州外墙清洗_郑州玻璃幕墙清洗_郑州开荒保洁-河南三恒清洗服务有限公司 | 宜兴紫砂壶知识分享 - 宜兴壶人 医用空气消毒机-医用管路消毒机-工作服消毒柜-成都三康王 | 玻璃钢型材-玻璃钢风管-玻璃钢管道,生产厂家-[江苏欧升玻璃钢制造有限公司] | 东莞猎头公司_深圳猎头公司_广州猎头公司-广东万诚猎头提供企业中高端人才招聘服务 | 旗杆生产厂家_不锈钢锥形旗杆价格_铝合金电动旗杆-上海锥升金属科技有限公司 | 布袋除尘器|除尘器设备|除尘布袋|除尘设备_诺和环保设备 | 紧急泄压人孔_防爆阻火器_阻火呼吸阀[河北宏泽石化] | 合肥废气治理设备_安徽除尘设备_工业废气处理设备厂家-盈凯环保 合肥防火门窗/隔断_合肥防火卷帘门厂家_安徽耐火窗_良万消防设备有限公司 | 千淘酒店差旅平台-中国第一家针对TMC行业的酒店资源供应平台 | 冲锋衣滑雪服厂家-冲锋衣定制工厂-滑雪服加工厂-广东睿牛户外(S-GERT) | 北京发电车出租-发电机租赁公司-柴油发电机厂家 - 北京明旺盛安机电设备有限公司 | 高压油管,液压接头,液压附件-烟台市正诚液压附件 | 老房子翻新装修,旧房墙面翻新,房屋防水补漏,厨房卫生间改造,室内装潢装修公司 - 一修房屋快修官网 | 北京三友信电子科技有限公司-ETC高速自动栏杆机|ETC机柜|激光车辆轮廓测量仪|嵌入式车道控制器 | 首页|光催化反应器_平行反应仪_光化学反应仪-北京普林塞斯科技有限公司 | 语料库-提供经典范文,文案句子,常用文书,您的写作得力助手 | 环讯传媒,永康网络公司,永康网站建设,永康小程序开发制作,永康网站制作,武义网页设计,金华地区网站SEO优化推广 - 永康市环讯电子商务有限公司 | 天津热油泵_管道泵_天津高温热油泵-天津市金丰泰机械泵业有限公司【官方网站】 | 气体热式流量计-定量控制流量计(空气流量计厂家)-湖北南控仪表科技有限公司 | 带锯机|木工带锯机圆木推台锯|跑车带锯机|河北茂业机械制造有限公司| | 不锈钢丸厂家,铝丸,铸钢丸-淄博智源铸造材料有限公司 | 海日牌清洗剂-打造带电清洗剂、工业清洗剂等清洗剂国内一线品牌 海外整合营销-独立站营销-社交媒体运营_广州甲壳虫跨境网络服务 | 一体化污水处理设备,一体化污水设备厂家-宜兴市福源水处理设备有限公司 | 电磁铁_推拉电磁铁_机械手电磁吸盘电磁铁厂家-广州思德隆电子公司 | AGV叉车|无人叉车|AGV智能叉车|AGV搬运车-江西丹巴赫机器人股份有限公司 | 飞歌臭氧发生器厂家_水处理臭氧发生器_十大臭氧消毒机品牌 | 交通信号灯生产厂家_红绿灯厂家_电子警察监控杆_标志杆厂家-沃霖电子科技 | 沙盘模型公司_沙盘模型制作公司_建筑模型公司_工业机械模型制作厂家 | 土壤肥料养分速测仪_测土配方施肥仪_土壤养分检测仪-杭州鸣辉科技有限公司 | MOOG伺服阀维修,ATOS比例流量阀维修,伺服阀维修-上海纽顿液压设备有限公司 | 卡诺亚轻高定官网_卧室系统_整家定制_定制家居_高端定制_全屋定制加盟_定制家具加盟_定制衣柜加盟 | 施工电梯_齿条货梯_烟囱电梯_物料提升机-河南大诚机械制造有限公司 | 鲸鱼视觉 -数字展厅多媒体互动展示制作公司 | 蓄电池回收,ups电池后备电源回收,铅酸蓄电池回收,机房电源回收-广州益夫铅酸电池回收公司 | 集装袋吨袋生产厂家-噸袋廠傢-塑料编织袋-纸塑复合袋-二手吨袋-太空袋-曹县建烨包装 | 飞飞影视_热门电影在线观看_影视大全 | 动物麻醉机-数显脑立体定位仪-北京易则佳科技有限公司 | 外贮压-柜式-悬挂式-七氟丙烷-灭火器-灭火系统-药剂-价格-厂家-IG541-混合气体-贮压-非贮压-超细干粉-自动-灭火装置-气体灭火设备-探火管灭火厂家-东莞汇建消防科技有限公司 |