ZF-11313: Autodiscover does not allow setting of manually defined types or attributes

Description

Auto discovery has two major failings.

  1. if you want to pass a default element type i.e. 'xsd:DateTime' there is no mechanism for this.
  2. if you want to add custom attributes to an element there is no mechanism for this

Comments

I have generated a patch for this to review and fix. unfortunately due to some weird issue with my CLA I dont seem to be able to do anything in Jira at the moment.I have asked BinaryKitten to upload for me

The patch will now allow you to define arbitrary xsd types for a property beware this does not have any validation for the type. It now allows


/**
 * a property
 * @var xsd:DateTime
 */
 public $property

It will also now allow the setting of additional attributes for elements that hit the DefaultComplexType


$autodiscover = new Zend_Soap_AutoDiscover();
$strategy = new Zend_Soap_Wsdl_Strategy_DefaultComplexType();
$strategy->setAdditionalAttributes(array('minOccurs','maxOccurs');
$autodiscover->setComplexTypeStrategy($strategy);
$autodiscover->setClass('Soap_Service');
$autodiscover->handle();

Which will now allow you to define these attributes in a properties docblock


/**
 * a property
 * @var string
 * @minOccurs 0
 * @maxOccurs 5
 */
 public $property

Attached Diff provided by Matt Cockayne

I think your point is covered at least partially by the issue ZF-9180.