ID: 43910 Updated by: [EMAIL PROTECTED] Reported By: vbrodsky at tremormedia dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: CentOS release 5 (Final) PHP Version: 5.2.5 New Comment:
Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2008-01-22 17:50:54] vbrodsky at tremormedia dot com Description: ------------ I am trying to access Akamai Cache Control Service using SOAP Client. Since Akamai officially does not support PHP, I am using Java wsdl https://ccuapi.akamai.com/ccuapi-axis.wsdl. I have created various tests, but no matter what I do I get PHP SOAP exception (see below). Is there is something wrong with the array of strings passed as a parameter? There apparently used to be idoox interoperatbility issue with an array of strings (http://aspn.activestate.com/ASPN/Mail/Message/soapbuilders/761488) but it is fixed, supposedly. BTW my php version is 1.5.6 (comes CentOS distribution) Reproduce code: --------------- echo "******************************<BR>"; echo "Example1: call using array() to pass ArrayOfString"; $client = new SoapClient("https://ccuapi.akamai.com/ccuapi-axis.wsdl"); var_dump($client->__getFunctions()); var_dump($client->__getTypes()); $params = array('xxx', 'yyy', NULL, NULL, "http://objects.dev.tremormedia.com/xml/val.xml"); try { $purgeResult = $client->purgeRequest($params); } catch(SoapFault $e){ echo "Exception <BR>"; var_dump($e); echo "<BR>"; } var_dump($purgeResult); echo "******************************<BR>"; echo "Example7: call using associative array() to pass parameters; ArrayOfString is passed as php array()" . "<BR>"; $client = new SoapClient("https://ccuapi.akamai.com/ccuapi-axis.wsdl"); var_dump($client->__getFunctions()); var_dump($client->__getTypes()); $params = array( "name" => "xxx", "pwd" => "yyy", "network" => array(''), "opt" => array("action=remove"), "uri"=> array("http://objects.dev.tremormedia.com/xml/val.xml") ); try { $purgeResult = $client->purgeRequest($params); } catch(SoapFault $e){ echo "Exception <BR>"; var_dump($e); echo "<BR>"; } var_dump($purgeResult); Expected result: ---------------- should return something... perhaps an Akamai error (url does not existetc.). Should not cause a php exception Actual result: -------------- object(SoapFault)[2] protected 'message' => string 'Exception: class com.idoox.soap.DemarshallException: Type in schema differs from type in SOAP message - expected [EMAIL PROTECTED]://www.w3.org/1999/XMLSchema; got [EMAIL PROTECTED]://www.akamai.com/purge' (length=199) private 'string' => string '' (length=0) protected 'code' => int 0 protected 'file' => string '/var/www/html/ais2/service/akamaisoap/test.php' (length=46) protected 'line' => int 13 private 'trace' => array 0 => array 'function' => string '__call' (length=6) 'class' => string 'SoapClient' (length=10) 'type' => string '->' (length=2) 'args' => array ... 1 => array 'file' => string '/var/www/html/ais2/service/akamaisoap/test.php' (length=46) 'line' => int 13 'function' => string 'purgeRequest' (length=12) 'class' => string 'SoapClient' (length=10) 'type' => string '->' (length=2) 'args' => array ... public 'faultstring' => string 'Exception: class com.idoox.soap.DemarshallException: Type in schema differs from type in SOAP message - expected [EMAIL PROTECTED]://www.w3.org/1999/XMLSchema; got [EMAIL PROTECTED]://www.akamai.com/purge' (length=199) public 'faultcode' => string 'SOAP-ENV:Server' (length=15) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43910&edit=1