1
我想从提供者访问Web服务(SOAP)。我没有控制服务器的响应。对于这个我使用,Zend_Soap_Client通过构造函数中的WDSL和选项,我可以做getFunctions,但是当试图访问第一个SOAP方法我得到Zend_Soap_Client得到“看起来我们没有XML文档”错误
[Sender] looks like we got no XML document
环顾四周,检查答案,我从一开始后,与soapUI的服务器我看到答案缺少XML声明:
<?xml version="1.0" encoding="XXXXXXX"?>
那么,有没有奥比的方法,使Zend_Soap_Client省略基于XML声明XML验证?假设缺乏声明是我的问题。
下面是我用这个代码:
private $_connection_settings = array('login' => self::API_user, 'pwd' => self::API_password, 'key'=> self::API_Key);
private static $CONNEXION_PARAMS = array(
'soap_version' => SOAP_1_1,
'encoding' => 'UTF-8'
);
...
//somewhere in my code:
$client = new Zend_Soap_Client('http://server_URL?wsdl', self::$CONNEXION_PARAMS);
$response = $client->fistSoapMethod($this->_connection_settings);
和响应不分配。
谢谢!
它缺少编码部分吗?将其视为UTF8。您的问题可能与字节顺序标记(BOM)有关。参见:http://stackoverflow.com/questions/4313952/soap-looks-like-we-got-no-xml-document – ficuscr