문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top