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

  • <tfoot id='51BqQ'></tfoot>

        <small id='51BqQ'></small><noframes id='51BqQ'>

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

        <legend id='51BqQ'><style id='51BqQ'><dir id='51BqQ'><q id='51BqQ'></q></dir></style></legend>

          <bdo id='51BqQ'></bdo><ul id='51BqQ'></ul>

      1. SOAP-ERROR:編碼:違反編碼規則?

        SOAP-ERROR: Encoding: Violation of encoding rules?(SOAP-ERROR:編碼:違反編碼規則?)

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

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

            <tfoot id='r6FeB'></tfoot>
                <tbody id='r6FeB'></tbody>
            • <i id='r6FeB'><tr id='r6FeB'><dt id='r6FeB'><q id='r6FeB'><span id='r6FeB'><b id='r6FeB'><form id='r6FeB'><ins id='r6FeB'></ins><ul id='r6FeB'></ul><sub id='r6FeB'></sub></form><legend id='r6FeB'></legend><bdo id='r6FeB'><pre id='r6FeB'><center id='r6FeB'></center></pre></bdo></b><th id='r6FeB'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='r6FeB'><tfoot id='r6FeB'></tfoot><dl id='r6FeB'><fieldset id='r6FeB'></fieldset></dl></div>
                <bdo id='r6FeB'></bdo><ul id='r6FeB'></ul>
                  本文介紹了SOAP-ERROR:編碼:違反編碼規則?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  伙計們,我被困住了,在過去的幾個小時里我的頭從桌子上摔下來.

                  Guys, I'm stuck, banging my head off the desk for the past few hours.

                  我正在嘗試使用一項服務,并且我調用了其他 8 個函數,它們本質上與這個函數幾乎相同,但是這個函數會導致SOAP-ERROR: Encoding: Violation of encoding rules"錯誤.

                  I am trying to consume a service, and I have 8 other functions that I call that are almost IDENTICAL in nature to this one, but this one, results in a 'SOAP-ERROR: Encoding: Violation of encoding rules' error.

                  這里是函數調用(為安全起見省略了 wsdl):

                  Heres the function call (wsdl omitted for security):

                      function CanLoadProduct($data){
                  
                      $client = new SoapClient('wsdl-url');
                  
                      $params = array('username'   => $this->username,
                                      'password'  => $this->password,
                                      'prod'      => $data['productid'],
                                      'mdn'       => $data['mdn']);
                  
                      try {
                          $reply = $client->__soapCall("CanLoadProduct", $params);
                      } catch (Exception $e) {
                          echo 'Error: ',  $e->getMessage(), "
                  ";
                          print_r($params);
                          die();
                      }
                  
                      if( $reply['result'] == 1 ){
                          return TRUE;        // 1 = true
                      } else {
                          return FALSE;
                      }
                  
                  }
                  

                  好的,這個函數,連接到一個webservice,需要的元素是:用戶名、密碼、prod、mdn,我將所有這 4 個作為 $params 數組的一部分提供.用戶名/通行證定義較早,并且工作正常,因為其他 8 個函數使用 Web 服務沒有任何問題.

                  Ok so this function, connects to a webservice, the required elements are: username, password, prod, mdn, all 4 of which I supply as part of the $params array. Username/Pass are defined earlier, and do work fine, as the other 8 functions consume the web service without any problems.

                  $data[] 數組(我傳遞給函數的)包含:$data['productid']$data['mdn']沒有使用其他任何東西.

                  The $data[] array (that I pass to the function), contains: $data['productid'] $data['mdn'] nothing else is used.

                  我得到了

                  SOAP-ERROR: Encoding: Violation of encoding rules
                  

                  出于某種無法解釋的原因,谷歌搜索這個錯誤讓我無處可去.還有人遇到這個嗎?運行 PHP 5.2.9-2.奇怪的是,這與這個 100% 有效的函數相同:

                  for some unexplained reason, and Googling this error gets me nowhere. Anyone else run into this? Running PHP 5.2.9-2. The strange thing is this is identical to this function which works 100%:

                      function GetPIN($productid){
                  
                      $client = new SoapClient('wsdl-url');
                  
                      $params = array('username'  => $this->username,
                                      'password'  => $this->password,
                                      'prod'      => $productid);
                  
                      try {
                          $reply = $client->__soapCall("GetPIN", $params);
                      } catch (Exception $e) {
                          echo 'Error: ',  $e->getMessage(), "
                  ";
                          die();
                      }
                          return $reply;
                  }
                  

                  這是 WSDL(應該先發布這個):

                  Here is the WSDL (should have posted this first):

                  <?xml version="1.0" encoding="ISO-8859-1"?>
                  <definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
                      xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
                      xmlns:tns="ready:test" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
                      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
                      xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="ready:test">
                  <types>
                  <xsd:schema targetNamespace="ready:test"
                  >
                   <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
                   <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
                  </xsd:schema>
                  </types>
                  <message name="CanLoadProductRequest">
                    <part name="username" type="xsd:string" />
                    <part name="password" type="xsd:string" />
                    <part name="prod" type="xsd:string" />    
                    <part name="mdn" type="xsd:string" />
                    <part name="esn" type="xsd:string" /></message>
                  <message name="CanLoadProductResponse">
                    <part name="result" type="xsd:int" /></message>
                  <portType name="CanLoadProductPortType">
                    <operation name="CanLoadProduct">
                      <input message="tns:CanLoadProductRequest"/>
                      <output message="tns:CanLoadProductResponse"/>
                    </operation>
                  </portType>
                  
                  <binding name="CanLoadProductBinding" type="tns:CanLoadProductPortType">
                    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
                    <operation name="CanLoadProduct">
                      <soap:operation soapAction="{url-removed}" style="rpc"/>
                      <input>
                          <soap:body use="encoded" namespace="" 
                             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                      </input>
                      <output>
                          <soap:body use="encoded" namespace="" 
                              encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                      </output>
                    </operation>
                  </binding>
                  <service name="CanLoadProduct">
                    <port name="CanLoadProductPort" binding="tns:CanLoadProductBinding">
                  
                      <soap:address location="{url-removed}"/>
                    </port>
                  </service>
                  </definitions>
                  

                  推薦答案

                  看起來您的某處類型不匹配,要么在組裝請求時(其中一個參數不是字符串類型),要么服務器返回其他內容而不是 int(違反 WSDL 響應定義,從而導致客戶端認為響應無效,因為它期望其他內容).

                  It looks like you have a type mismatch somewhere, either while assembling your request (one of the parameters is not of type string), or the server returns something other than an int (violating the WSDL response definition and thus causing the client to consider the response invalid, as it expects something else).

                  • 要測試第一種情況,請確保首先將所有參數轉換為字符串
                  • 要測試第二種情況,請創建您的 SoapClient,并將 trace 選項設置為 true,以便之后通過 $client->__getLastResponse() 從服務器獲得對實際 XML 答案的訪問(您也可以通過 __getLastRequest() 將其用于請求調試.
                  • To test the first case, ensure casting all parameters to string first
                  • To test the second case, create your SoapClient with the trace option set to true in order to gain access to the actual XML answer from the server via $client->__getLastResponse() afterwards (You can use this for request debugging also via __getLastRequest()).

                  一些額外的觀察/問題:

                  Some additional observations/questions:

                  • 根據已發布的 WSDL,CanLoadProductRequest"具有第五個參數esn",您不會在函數調用中提供該參數.
                  • 您使用 $client->__soapCall("CanLoadProduct", $params) 而不是 $client->CanLoadProduct($username, $password, etc.) 的任何原因?(第一個版本是一個較低級別的變體,旨在用于非 WSDL 場景.第二個版本可能會為您提供更詳細的錯誤/異常)
                  • 您能否通過其他方式測試對 CanLoadProductRequest 的 SOAP 調用?錯誤可能在服務器端,試圖返回不符合 WSDL 定義的結果類型.
                  • According to the posted WSDL, the 'CanLoadProductRequest' has a fifth param 'esn', which you do not supply in your function call.
                  • Any reason why you use $client->__soapCall("CanLoadProduct", $params) instead of $client->CanLoadProduct($username, $password, etc.)? (The first version is a lower level variation which is intended to be used for non_WSDL scenarios. The second version might give you a more detailed error/exception)
                  • Can you test the SOAP Call to CanLoadProductRequest by some other means? The error could be on the server side, trying to return a result type that does not fit the WSDL definition.

                  這篇關于SOAP-ERROR:編碼:違反編碼規則?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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)

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

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

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

                            主站蜘蛛池模板: 99re热精品视频 | 免费一区二区 | 亚洲精品一区中文字幕乱码 | 国产精品99久 | 欧美日韩视频在线 | 亚洲三区视频 | 国产一区二区麻豆 | 国产精品久久久久一区二区 | 亚洲一区二区久久 | 精品亚洲永久免费精品 | 韩国毛片一区二区三区 | 亚洲精品白浆高清久久久久久 | 伊人久久大香线 | 国产精品视频免费观看 | 久久久久国产精品人 | 中文字幕高清 | 一区2区| av中文字幕在线 | 久久国产高清视频 | 精品欧美二区 | 婷婷桃色网 | 日韩一区二区三区视频在线播放 | 国产精品久久久久久久久图文区 | 亚洲三区视频 | 九九九久久国产免费 | 日本精品一区二区三区在线观看 | 国产成人网 | 亚洲精品二三区 | 国产精品综合一区二区 | aaaa日韩 | 亚洲精品乱码 | 人妖一区 | 欧美日韩在线国产 | 国产精品一区二区三区在线 | a级片在线观看 | 97国产在线视频 | 九九热在线精品视频 | 国产精品美女久久久久久久久久久 | 玖玖视频 | 中文字幕 国产精品 | 中文字幕亚洲专区 |