Skip to end of metadata
Go to start of metadata

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

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

Zend Framework: Zend_Soap Component Proposal

Proposed Component Name Zend_Soap
Developer Notes
Proposers Matthew Weier O'Phinney
Revision 1.0 - 8 February 2007: Initial proposal draft
1.1 - 16 February 2007: Initial proposal completion (wiki revision: 10)

Table of Contents

1. Overview

Zend_Soap is intended as a convenience layer over PHP's SoapServer class. It will allow aggregating configuration options for the SoapServer constructor, error handling, and inspection of requests and responses.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will allow setting SoapServer options individually, en masse, or via the constructor
  • This component will allow inspecting the request and response handled
  • This component will catch errors and exceptions and report them as SOAP faults

4. Dependencies on Other Framework Components

  • SoapServer
  • Zend

5. Theory of Operation

Zend_Soap_Server will operate, at its most basic level, exactly like the PHP SoapServer. The key differences are the addition of:

  • Ability to set configuration options individually
  • Request and response introspection
    • Mimics SoapClient: getLastRequest() and getLastResponse() methods
  • Error/exception handling to explicitly throw as SOAP faults
    • Turns display_errors off
    • Traps exceptions from SoapServer::handle() and re-throws them as SoapFaults
    • Registers an internal method as an error handler for E_USER_FATALs, and throws trapped PHP errors as exceptions
    • Has a whitelist approach to exceptions; only registered exception classes may be returned as SoapFaults; all others result in a SoapFault with an 'unknown error' message

6. Milestones / Tasks

  • Milestone 1: Initial proposal
  • Milestone 2: Code samples and use cases in proposal
  • Milestone 3: Proposal acceptance
  • Milestone 4: Working prototype checked into the incubator supporting use cases (with unit tests)
  • Milestone 5: Initial documentation exists.

7. Class Index

  • Zend_Soap_Server

8. Use Cases


9. Class Skeletons



Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Feb 22, 2007

    <p>What are the benefits of using this class over SoapServer itself?</p>

    1. Feb 22, 2007

      <p>The primary benefits are:</p>

      <li>easier object setup (no need to pass in all options at once to the constructor)</li>
      <li>ability to pass in non-HTTP request strings</li>
      <li>built in introspection of request and response</li>
      <li>ability to capture response prior to returning it, allowing response manipulation</li>
      <li>better error handling
      <li>including the ability to specify which exception classes are allowed to generate fault messages</li>
      <li>ability to capture E_USER_ERROR and return as a soap fault</li>

      <p>Hope that answers your questions!</p>

  2. Mar 02, 2007

    <ac:macro ac:name="note"><ac:parameter ac:name="title">Zend Comments</ac:parameter><ac:rich-text-body>
    <p>The proposal is approved for incubator development, provided that the following issues are addressed:</p>

    <li>The setOptions() method could strtolower($key) for option name case insensitivity.</li>
    <li>Protected methods should appear below public-facing methods.</li>
    <li>Clearly document actor and URI (URN) options.</li>

  3. Jul 12, 2007

    <p>How about to to some progress in this component?</p>

    <p>I've found, that WSDL, generated by Zend_Soap_Autodiscover isn't compatible with Adobe Flex, for example. Web service client, based on Flex mx.rpc.WebService component generates empty body tag in SOAP request.</p>

    <p>Class Zend_Soap_Autodiscover has not very good interface, I think it must not extend Zend_Server_Abstract.</p>