Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Soap_ComplexTypeValuesValidator Component Proposal

Proposed Component Name Zend_Soap_ComplexTypeValuesValidator
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Soap_ComplexTypeValuesValidator
Proposers Jeannie BOFFEL
Zend Liaison TBD
Revision 1.0 - 07 December 2010: Initial Draft. (wiki revision: 6)

Table of Contents

1. Overview

I'd like to introduce to Zend Framework a new layer to check/validates values returned in a SOAP response against what user declared in the schema through auto discovery system.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will add support for checking validity of values against XSD declaration from auto discovery support.
  • This component will not make sure values are meaningful.
  • This component will not validate the XSD generated. Meanning we don't prevent user from doing wrong XSD by adding unexisting attribute to an element for example.
  • This component will not be exhaustive and will not support all XSD features immediately.

4. Dependencies on Other Framework Components

  • PHP >= 5.3.0
  • Zend_Soap
  • Zend_Soap_AutoDiscovery
  • Zend_Soap_Zend_Soap_Wsdl_Strategy_DefaultComplexType (modified by proposal)
  • Zend_Soap_SimpleValuesValidator (in other proposal)

5. Theory of Operation

The component is instantiated through extending of class.

6. Milestones / Tasks

  • Feature Request 1: Support more XSD base type than just PHP variable base set type.
  • Milestone #: [DONE] Design
  • Milestone #: [DONE] Proof of concept by implement new complex type and simple type value checking
  • Milestone #: [DONE] Start support of all base type compatible with PHP variable base set type
  • Milestone #: [DONE] Start support of user defined type through SimpleType in XSD (other proposal)
  • Milestone #: [DONE] Start support of user defined type through ComplexType in XSD
  • Milestone 1: Working prototype checked into the incubator supporting use cases #1.
  • Milestone 2: Unit tests exist, work, and are checked into SVN.
  • Milestone 3: Initial documentation exists.

7. Class Index

  • Zend_Soap_ComplexTypeValuesValidator

8. Use Cases

Use case in future.

UC-01

Exemple of definition of complex type which will check and assign values.

UC-02

Exemple of definition of complex type which will only check assigned values then manually assign values.
__set magic method has syntax limitation, it will not be called even if property doesn't exist when used with auto index array for example.
We do not bother memory for nothing here, the $this->CheckO_Anything will never really exist in class properties, it's just a trick to call __set of parent class.

If everything is ok, no output, if one value is wrong, exception.

UC-03

Here the same example but with handling of exception for debug help at programming moment and/or to send custome SoapFault to customer instead of invalid values or even try to fix the wrong value.

If everything is ok, no output, if one value is wrong, exception.

9. Class Skeletons

]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.