久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <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="qwawimqqmiuu" 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請求

        PHP amp; XML - How to generate a soap request in PHP from this XML?(PHP amp;XML - 如何從此 XML 在 PHP 中生成soap請求?)
          • <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="qwawimqqmiuu" 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請求?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我對 SOAP 操作完全陌生.

                  I am completly new to SOAP operations.

                  我收到了一個 XML 文檔 (SOAP),以獲取一些運輸方式的收集點.

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

                  來自此處的手冊:

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

                  我可以看到我需要使用以下 SOAP 請求:

                  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 將其作為請求發(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ù).但是,我無法讀取單個元素數(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請求?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(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算法的實現(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="qwawimqqmiuu" 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'>

                            主站蜘蛛池模板: 成人av大全 | 午夜影视 | 一区二区三区亚洲精品国 | 精品视频在线一区 | 天天插天天操 | 欧美日韩在线免费 | 精品久久久久久亚洲综合网站 | 亚洲综合精品 | 亚洲精彩免费视频 | 亚洲一区电影 | xxx国产精品视频 | 欧美精品一二三区 | 免费观看毛片 | 成人精品国产免费网站 | 欧美中文字幕一区二区 | 亚洲高清电影 | 国产精品a级| 中文字幕不卡视频在线观看 | 中文字幕一区二区三区在线观看 | 欧美xxxx色视频在线观看免费 | 亚洲天堂网站 | 九九亚洲 | 国产我和子的乱视频网站 | 久久精品成人一区 | 亚洲成av人片在线观看 | 欧美性成人 | 午夜激情视频 | 欧美精品久久久久 | 老头搡老女人毛片视频在线看 | 欧美三级成人理伦 | 欧美在线观看免费观看视频 | 午夜天堂精品久久久久 | 91看片网 | 亚洲三区在线播放 | 中文字幕视频一区二区 | 91国内精精品久久久久久婷婷 | 伦理一区二区 | 久国产视频 | 天堂素人约啪 | 欧洲av在线 | 一级片免费在线观看 |