I am using a Zend_Soap_Client to call a web service. I am getting an exception from the error which I suspect is down to me not sending something along with the request:
Fatal error: Uncaught SoapFault exception: [Sender] SOAP-ERROR:
Encoding: object hasn’t ‘V24Flag’ propert
Because it throws an exception I want to try view what is the actual request being sent, however because of the exception, I can not use Zend_Soap_Client->getLastRequest() to get the request (it returns null). Looking at the Zend_Soap_Client->getLastRequest() its a thin wrapper for soapClient->__soapCall() which I’m not sure how to dig deeper from.
Your problem is actually slightly different to what you think it is. The reason
Zend_Soap_Client::getLastRequest()returnsNULLfor you is that no request was ever made: the error is being thrown at the stage where the request internally is being compared against the WSDL you are using. So the method is perfectly correct to returnNULL.As to how to form the parameter for your SOAP call so this error isn’t thrown, I can’t be of much greater help right now (I expect it depends partly on the services you are integrating with), but there’s a userland answer on the php.net page for
SoapClient::__soapCall()which may point you in a fruitful direction. Essentially, some people seem to have got somewhere by doing a deep conversion of an array structure intostdClassobjects. That doesn’t seem to be the whole story (it isn’t for the issue I’m currently investigating), and indeed this may be down to a bug in PHP, but I hope it helps you towards an answer.