2012-08-22 08:47



I am trying to access a Web Service (SOAP) from a provider. I have not control on the server response. For this I am using, Zend_Soap_Client passing the WDSL and options in the constructor, I can do getFunctions, but when try to access the first Soap method I get

[Sender] looks like we got no XML document

After looking around and checking the answer I get from the server with soapUI I see that the answer is missing the XML declaration:

<?xml version="1.0" encoding="XXXXXXX"?>

So, is there aby way to make the Zend_Soap_Client omit the XML validation based in the XML declaration? Assuming that the lacking of the declaration is my problem.

Here is the code I use for this:

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

And response is not assigned.


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • duanliao5995 duanliao5995 9年前

    No other warnings/errors from your code besides the SOAP Fault?

    Not sure it is the WSDL. Can always try validating the WSDL using an online tool.

    Have you used getLastResponse() and getLastRequest() methods? Sounds like you might be sending some garbage at the start of your request. Another thing I always do when testing is turn off WSDL caching.

    ini_set("soap.wsdl_cache_enabled", 0);

    点赞 评论 复制链接分享