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.