ID: 31727 Updated by: [EMAIL PROTECTED] Reported By: adam at trachtenberg dot com -Status: Open +Status: Assigned Bug Type: SOAP related Operating System: n/a PHP Version: 5CVS-2005-01-27 (dev) -Assigned To: +Assigned To: dmitry
Previous Comments: ------------------------------------------------------------------------ [2005-01-27 19:55:12] adam at trachtenberg dot com Description: ------------ The SOAPClient class is incorrectly encoding parameters. It is not placing them inside their own named elements. I believe this to be a bug, but it's quite hard to confirm because the SOAP spec is so theoretical. I can't find any real examples. Also, even after this bug is fixed, the "working" code won't make a successful request, as the WSDL endpoint is wrong and there are no headers. This is just a stripped down version to reproduce the bug. Reproduce code: --------------- $wsdl_url = 'http://developer.ebay.com/webservices/393/eBaySvc.wsdl'; $client = new SOAPClient($wsdl_url, array('trace' => 1, 'exceptions' => 0, )); $DetailLevel = new SOAPParam(new SOAPVar('ReturnAll', XSD_STRING, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseCo\ mponents'), 'DetailLevel'); $Version = new SOAPParam(new SOAPVar(393, XSD_DOUBLE, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseCom\ ponents'), 'Version'); $user = $client->GetUser($Version, $DetailLevel); print "GetUser(): \n".$client->__getLastRequest() ."\n"; $user = $client->__call('GetUser', array($Version, $DetailLevel)); print "__call(GetUser): \n".$client->__getLastRequest() ."\n"; Expected result: ---------------- GetUser(): <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ebay:apis:eBLBaseComponents"><SOAP-ENV:Body><ns1:GetUserRequest><ns1:Version>393</ns1:Version><ns1:DetailLevel>ReturnAll</ns1:DetailLevel></ns1:GetUserRequest></SOAP-ENV:Body></SOAP-ENV:Envelope> __call(GetUser): <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ebay:apis:eBLBaseComponents"><SOAP-ENV:Body><ns1:GetUserRequest><ns1:Version>393</ns1:Version><ns1:DetailLevel>ReturnAll</ns1:DetailLevel></ns1:GetUserRequest></SOAP-ENV:Body></SOAP-ENV:Envelope> Actual result: -------------- GetUser(): <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ebay:apis:eBLBaseComponents"><SOAP-ENV:Body><ns1:GetUserRequest>393</ns1:GetUserRequest><ns1:DetailLevel>ReturnAll</ns1:DetailLevel></SOAP-ENV:Body></SOAP-ENV:Envelope> __call(GetUser): <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ebay:apis:eBLBaseComponents"><SOAP-ENV:Body><ns1:GetUserRequest>393</ns1:GetUserRequest><ns1:DetailLevel>ReturnAll</ns1:DetailLevel></SOAP-ENV:Body></SOAP-ENV:Envelope> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31727&edit=1