久久久久久久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>

                            主站蜘蛛池模板: 日韩国产高清在线观看 | 神马久久av | 久草在线在线精品观看 | 午夜影视在线观看 | 欧美成人一区二区 | 欧美日韩在线视频观看 | 欧美一级片黄色 | 精品伦精品一区二区三区视频 | 欧美黄页 | 一区二区精品在线 | 99视频免费在线 | 亚洲性人人天天夜夜摸 | 成人在线观看免费爱爱 | 欧美一区二区三区久久精品 | 久久久精品一区二区三区 | 亚洲欧洲成人在线 | 国产精品日韩欧美一区二区三区 | 国产一区2区 | 综合激情av | 黄色一级毛片 | 日韩欧美精品一区 | 久久精品小短片 | 日韩电影免费在线观看中文字幕 | 91国产在线视频在线 | 精品欧美一区二区精品久久 | 国产成人99久久亚洲综合精品 | 区一区二区三在线观看 | 日本不卡一区 | 欧美电影在线观看网站 | 久久成 | 天天看天天操 | 日韩成人在线视频 | 成人在线免费观看视频 | 欧美大片一区 | 国产99久久 | 国产午夜影院 | 国产一区二区在线91 | 欧美影院久久 | 天天干天天操天天看 | 精品久久影院 | 黄色片网站在线观看 |