久久久久久久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:編碼:違反編碼規(guī)則?

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

        <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:編碼:違反編碼規(guī)則?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

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

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

                  我正在嘗試使用一項服務,并且我調(diào)用了其他 8 個函數(shù),它們本質(zhì)上與這個函數(shù)幾乎相同,但是這個函數(shù)會導致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.

                  這里是函數(shù)調(diào)用(為安全起見省略了 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;
                      }
                  
                  }
                  

                  好的,這個函數(shù),連接到一個webservice,需要的元素是:用戶名、密碼、prod、mdn,我將所有這 4 個作為 $params 數(shù)組的一部分提供.用戶名/通行證定義較早,并且工作正常,因為其他 8 個函數(shù)使用 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[] 數(shù)組(我傳遞給函數(shù)的)包含:$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% 有效的函數(shù)相同:

                  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(應該先發(fā)布這個):

                  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>
                  

                  推薦答案

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

                  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).

                  • 要測試第一種情況,請確保首先將所有參數(shù)轉換為字符串
                  • 要測試第二種情況,請創(chuàng)建您的 SoapClient,并將 trace 選項設置為 true,以便之后通過 $client->__getLastResponse() 從服務器獲得對實際 XML 答案的訪問(您也可以通過 __getLastRequest() 將其用于請求調(diào)試.
                  • 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:

                  • 根據(jù)已發(fā)布的 WSDL,CanLoadProductRequest"具有第五個參數(shù)esn",您不會在函數(shù)調(diào)用中提供該參數(shù).
                  • 您使用 $client->__soapCall("CanLoadProduct", $params) 而不是 $client->CanLoadProduct($username, $password, etc.) 的任何原因?(第一個版本是一個較低級別的變體,旨在用于非 WSDL 場景.第二個版本可能會為您提供更詳細的錯誤/異常)
                  • 您能否通過其他方式測試對 CanLoadProductRequest 的 SOAP 調(diào)用?錯誤可能在服務器端,試圖返回不符合 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:編碼:違反編碼規(guī)則?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關文檔推薦

                  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算法的實現(xiàn))
                  Sending a byte array from PHP to WCF(將字節(jié)數(shù)組從 PHP 發(fā)送到 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网站 | 亚洲蜜桃av | 日韩精品少妇 | 日韩色黄大片 | 免费av一区二区三区 | 少妇高潮久久久久久潘金莲 | 国产区一区 | 亚洲九九九 | 亚洲第一第二区 | 黄网站视频 | 国产主播精品 | 成人精品在线 | av中文网| 天天操天天干天天操 | 欧美a级黄色片 | 99视频在线观看免费 | 国产日韩一区二区 | 欧美日韩91 | 成人免费毛片嘿嘿连载视频 | 日韩欧美小视频 | 亚洲超碰在线 | 成人日韩在线 | 色婷婷视频在线观看 | 在线不卡一区 | 国产精品午夜视频 | 丰满少妇高潮 | 黄色片免费网站 | 欧美在线激情 | 午夜精品久久久久久久久久久久 | 91免费网站入口 | av网站免费看 | 电家庭影院午夜 | 性色av一区| 天天插天天狠天天透 |