PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Zend_Soap_Server constructor

Zend_Soap_Server constructor should be used a bit differently for WSDL and non-WSDL modes.

Zend_Soap_Server constructor for the WSDL mode

Zend_Soap_Server constructor takes two optional parameters when it works in WSDL mode:

  1. $wsdl, which is an URI of a WSDL file [22].

  2. $options - options to create SOAP server object [23].

    The following options are recognized in the WSDL mode:

    • 'soap_version' ('soapVersion') - soap version to use (SOAP_1_1 or SOAP_1_2).

    • 'actor' - the actor URI for the server.

    • 'classmap' ('classMap') which can be used to map some WSDL types to PHP classes.

      The option must be an array with WSDL types as keys and names of PHP classes as values.

    • 'encoding' - internal character encoding (UTF-8 is always used as an external encoding).

    • 'wsdl' which is equivalent to setWsdl($wsdlValue) call.

Zend_Soap_Server constructor for the non-WSDL mode

The first constructor parameter must be set to NULL if you plan to use Zend_Soap_Server functionality in non-WSDL mode.

You also have to set 'uri' option in this case (see below).

The second constructor parameter ($options) is an array with options to create SOAP server object [24].

The following options are recognized in the non-WSDL mode:

  • 'soap_version' ('soapVersion') - soap version to use (SOAP_1_1 or SOAP_1_2).

  • 'actor' - the actor URI for the server.

  • 'classmap' ('classMap') which can be used to map some WSDL types to PHP classes.

    The option must be an array with WSDL types as keys and names of PHP classes as values.

  • 'encoding' - internal character encoding (UTF-8 is always used as an external encoding).

  • 'uri' (required) - URI namespace for SOAP server.



[22] May be set later using setWsdl($wsdl) method.

[23] Options may be set later using setOptions($options) method.

[24] Options may be set later using setOptions($options) method.

Zend Framework