SOAP Complex Type Variable

From: Date: Tue, 31 Jul 2007 12:29:08 +0000
Subject: SOAP Complex Type Variable
Groups: php.soap 
Request: Send a blank email to php-soap+get-2580@lists.php.net to get a copy of this message
I am building a webservice using PEAR SOAP and I need to define a complex type which can take input like following: <EquipmentInfo> <Equipment> <EquipmentTypeId></EquipmentTypeId> <Quantity></Quantity> </Equipment> <Equipment> <EquipmentTypeId></EquipmentTypeId> <Quantity></Quantity> </Equipment> </EquipmentInfo> EquipmentInfo variable needs to be defined as a sequence of elements of type Equipment. Equipment Type should have two sub-elements. Following is the source code but it doesn't produce correct WSDL. class EquipOrder { var $__dispatch_map = array(); var $__typedef = array(); function EquipOrder () { $this->__typedef['Equipment'] = array("EquipmentTypeId"=>"Integer", "Quantity"=>"Integer"); $this->__typedef['EquipmentInfo'] = array(array('Equipment'=> "{urn:EquipOrder}Equipment")); } } Can someone please shed some light on it? Thanks, -Punit.

« previous php.soap (#2580) next »