php關於請求webservice的有關問題,請版主幫忙

來源:互聯網
上載者:User
php關於請求webservice的問題,請版主幫忙
php關於請求webservice的問題。

請求地址是:http://b2b.ourgame.com/DDService.asmx
如何使用PHP的soap類(nusoap-0.7.3)擷取到SaleResponse的結果,我試過用正常的PHP的soap方法去調用這個請求,但是返回的是錯誤資訊。錯誤資訊如下:

array (
"faultcode" => "soap:Client",
"faultstring" => "Unexpected wrapper element Sale found.Expected {http://service.web.b2b.lianzhong.com/}Sale."
)

請問如何解決?


------解決方案--------------------
由於不知道所需參數的含義,所以只能這樣了
PHP code
$url = 'http://b2b.ourgame.com/DDService.asmx?wsdl';$soapClient = new soapclient($url);/* 讀取可用的方法和所需的資料結構 */print_r( $soapClient->__getFunctions ()); print_r($soapClient->__getTypes () ); $rs = $soapClient->Sale();print_r($rs);
------解決方案--------------------
PHP code
ini_set("soap.wsdl_cache_enabled",0);    try{        $client = new SoapClient("http://b2b.ourgame.com/DDService.asmx",array("exceptions" => 1));                var_dump($client->Sale(array("arg0"=>1,"arg1"=>"123","arg2"=>"456","arg3"=>"789","arg4"=>4,"arg5"=>5,"arg6"=>"111","arg7"=>"222")));    }catch(Exception $ex){        var_dump($ex->faultstring);    } 
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.