PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Web Services » SOAP » Bug #2905

Proxy generation parse error

Details

Submitted2004-12-06 07:30 UTC
Fromdst at dmc dot de
Assignedchagenbu
StatusClosed
PackageSOAP
PHP Version5.0.2
OSWinXP / Linux
Roadmaps(Not assigned)

Comments

[2004-12-06 07:30 UTC] dst at dmc dot de

Description:
------------
Testing the 0.8.1 release caused a parse error in the evaluated code of the generated proxyclass. The WSDL used was the eCommerce Service Version 4 of Amazon.de (ECS4).

Detailed information about ECS4 can be obtained under http://webservices.amazon.com/

Reproduce code:
---------------
<?php
require_once('SOAP/Client.php');

$wsdl = 'http://webservices.amazon.com/AWSECommerceService/US/AWSECommerceService.wsdl';
$proxyParams = array(
'proxy_host' => 'define.proxy.here.com',
'proxy_port' => 3128,
);

$wsdl = new SOAP_WSDL($wsdl, $proxyParams);
$proxy = $wsdl->getProxy();

?>

Expected result:
----------------
A valid proxyclass.

Actual result:
--------------
Parse error: syntax error, unexpected ':', expecting ')' in C:\Programme\php5\PEAR\SOAP\WSDL.php(614) : eval()'d code on line 259

Fatal error: Class 'WebService_AWSECommerceService_AWSECommerceServicePort' not found in C:\Programme\php5\PEAR\SOAP\WSDL.php on line 617

[2005-02-08 13:33 UTC] pear dot php dot net at johntoews dot com

The eval-ed code causing the issue is below. It seems to have to do with the "tns:" in the variable names. I am not familiar enough with PHP to know whether ":" is valid...

function &MultiOperation($tns:Help, $tns:ItemSearch, $tns:ItemLookup, $tns:ListSearch, $tns:ListLookup, $tns:CustomerContentSearch, $tns:CustomerContentLookup, $tns:SimilarityLookup, $tns:SellerLookup, $tns:CartGet, $tns:CartAdd, $tns:CartCreate, $tns:CartModify, $tns:CartClear, $tns:TransactionLookup, $tns:SellerListingSearch, $tns:SellerListingLookup, $tns:BrowseNodeLookup) {
$tns:Help =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:Help','',$tns:Help);
$tns:ItemSearch =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:ItemSearch','',$tns:ItemSearch);
$tns:ItemLookup =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:ItemLookup','',$tns:ItemLookup);
$tns:ListSearch =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:ListSearch','',$tns:ListSearch);
$tns:ListLookup =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:ListLookup','',$tns:ListLookup);
$tns:CustomerContentSearch =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:CustomerContentSearch','',$tns:CustomerContentSearch);
$tns:CustomerContentLookup =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:CustomerContentLookup','',$tns:CustomerContentLookup);
$tns:SimilarityLookup =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:SimilarityLookup','',$tns:SimilarityLookup);
$tns:SellerLookup =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:SellerLookup','',$tns:SellerLookup);
$tns:CartGet =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:CartGet','',$tns:CartGet);
$tns:CartAdd =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:CartAdd','',$tns:CartAdd);
$tns:CartCreate =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:CartCreate','',$tns:CartCreate);
$tns:CartModify =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:CartModify','',$tns:CartModify);
$tns:CartClear =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:CartClear','',$tns:CartClear);
$tns:TransactionLookup =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:TransactionLookup','',$tns:TransactionLookup);
$tns:SellerListingSearch =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:SellerListingSearch','',$tns:SellerListingSearch);
$tns:SellerListingLookup =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:SellerListingLookup','',$tns:SellerListingLookup);
$tns:BrowseNodeLookup =& new SOAP_Value('{http://webservices.amazon.com/AWSECommerceService/2005-01-19}tns:BrowseNodeLookup','',$tns:BrowseNodeLookup);
return $this->call("MultiOperation",
$v = array("tns:Help"=>$tns:Help, "tns:ItemSearch"=>$tns:ItemSearch, "tns:ItemLookup"=>$tns:ItemLookup, "tns:ListSearch"=>$tns:ListSearch, "tns:ListLookup"=>$tns:ListLookup, "tns:CustomerContentSearch"=>$tns:CustomerContentSearch, "tns:CustomerContentLookup"=>$tns:CustomerContentLookup, "tns:SimilarityLookup"=>$tns:SimilarityLookup, "tns:SellerLookup"=>$tns:SellerLookup, "tns:CartGet"=>$tns:CartGet, "tns:CartAdd"=>$tns:CartAdd, "tns:CartCreate"=>$tns:CartCreate, "tns:CartModify"=>$tns:CartModify, "tns:CartClear"=>$tns:CartClear, "tns:TransactionLookup"=>$tns:TransactionLookup, "tns:SellerListingSearch"=>$tns:SellerListingSearch, "tns:SellerListingLookup"=>$tns:SellerListingLookup, "tns:BrowseNodeLookup"=>$tns:BrowseNodeLookup),
array('namespace'=>'http://webservices.amazon.com/AWSECommerceService/2005-01-19',
'soapaction'=>'http://soap.amazon.com',
'style'=>'document',
'use'=>'literal' ));
}

[2005-02-10 07:42 UTC] dst at dmc dot de

Well yes, of course ":" is not allowed within variable names, however Amazon provides a 100% SOAP conform WSDL so PEAR::SOAP must be able to handle it.

Regards,
Dominique