Zend_Soap_Client switch from WAMP to LAMP and params won't set properly
-
10-10-2019 - |
문제
All the required libraries are set for soap. I'm using standard WSDL. Moved my code to the LAMP (RedHat Enterprise).
$params = array(
'test1'=>'Testing',
'test2'=> '1'
);
$soapClient->method1($params);
$soapClient->getLastRequest();
Result:
<test1>Testing</test1>
<test2>false</test2>
Has this ever happened to anyone and how did you fix it?
해결책
I believe the issue may be how Zend_Soap_Client when the WSDL has a parameter that is defined as boolean will not properly convert a "true", "1" into a boolean true. I had to force the data type to be set manually. Once that was done everything worked.
$params = array(
'test1'=> 'Testing',
'test2'=> true
);
I believe the reason this happened had to do the with the different versions of PHP.
제휴하지 않습니다 StackOverflow