【问题标题】:Error consuming Web Service: SOAP-ENV:Client Internal Server Error SoapDoc::CheckNameSpace: Wrong xml name space使用 Web 服务时出错:SOAP-ENV:Client Internal Server Error SoapDoc::CheckNameSpace: Wrong xml name space
【发布时间】:2013-08-14 08:08:51
【问题描述】:

我不得不在 php(Zend 框架)中使用 Web 服务,一切似乎都很好,但是当我想通过这样的 try catch 系统从服务器检索响应时:

try{
    $response = $client->METHOD_TO_CONSUME(array(
            'DATA1' => $data1,
            'DATA2' => $data2
            )
        );
} catch (SoapFault $e) {
    Mage::log("Fault Message: " . $e->getMessage());
    Mage::log("Fault Code: " . $e->faultcode . ' ' . $e->faultstring . ' ' . $e->detail);
    Mage::log("Fault: " . (string) $e);
}

但后来我得到了这个错误: SOAP-ENV:客户端 SOAP-ENV:Client Internal Server Error SoapDoc::CheckNameSpace: Wrong xml name space

首先我认为这是 WSDL 的问题,但后来我用 SoapUi 进行了一些测试,一切正常。 我不知道会发生什么?

【问题讨论】:

    标签: php web-services magento


    【解决方案1】:

    经过几个小时的调查,我解决了,问题是 Soap 版本,默认情况下,Zend 使用 Soap 1.2。 当我将其更改为 1.1 版本时,一切正常。

    $params = array(
                'soapVersion' => SOAP_1_1
            );
    
     $client = new Zend_Soap_Client($url, $params);
    

    我希望能帮助别人:D

    问候

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-01-02
      • 1970-01-01
      • 1970-01-01
      • 2011-09-22
      • 2017-02-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多