API Documentation

Zend/Soap/Wsdl.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Soap  
Version
$Id: Wsdl.php 25032 2012-08-17 19:45:06Z matthew $  

\Zend_Soap_Wsdl

Package: Zend\Soap

Zend_Soap_Wsdl

Category
Zend  

Properties

Propertyprivateobject  $_dom= ''

DomDocument Instance
Details
Type
object
Propertyprivatearray  $_includedTypes= 'array()'

Types defined on schema

Default valuearray()Details
Type
array
Propertyprivate\DOMElement  $_schema= 'null'

Default valuenullDetails
Type
\DOMElement
Propertyprotected  $_strategy= 'null'

Strategy for detection of complex types

Default valuenullDetails
Type
Propertyprivatestring  $_uri= ''

URI where the WSDL will be available
Details
Type
string
Propertyprivateobject  $_wsdl= ''

WSDL Root XML_Tree_Node
Details
Type
object

Methods

methodpublic__construct( string $name, string $uri, boolean|string|\Zend_Soap_Wsdl_Strategy_Interface $strategy = true ) : void

Constructor

Parameters
Name Type Description
$name string

Name of the Web Service being Described

$uri string

URI where the WSDL will be available

$strategy boolean|string|\Zend_Soap_Wsdl_Strategy_Interface
methodprivate_parseElement( array $element ) : \DOMElement

Parse an xsd:element represented as an array into a DOMElement.

Parameters
Name Type Description
$element array

an xsd:element represented as an array

Returns
Type Description
\DOMElement parsed element
methodpublicaddBinding( string $name,  $portType ) : object

Add a {@link http://www.w3.org/TR/wsdl#_bindings binding} element to WSDL

Parameters
Name Type Description
$name string

Name of the Binding

$portType
Returns
Type Description
object The new binding's XML_Tree_Node for use with {@link function addBindingOperation} and {@link function addDocumentation}
methodpublicaddBindingOperation( object $binding,  $name, array $input = false, array $output = false, array $fault = false ) : object

Add an operation to a binding element

Parameters
Name Type Description
$binding object

A binding XML_Tree_Node returned by {@link function addBinding}

$name
$input array

An array of attributes for the input element, allowed keys are: 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information}

$output array

An array of attributes for the output element, allowed keys are: 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information}

$fault array

An array of attributes for the fault element, allowed keys are: 'name', 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information}

Returns
Type Description
object The new Operation's XML_Tree_Node for use with {@link function addSoapOperation} and {@link function addDocumentation}
methodpublicaddComplexType( string $type ) : string

Add a {@link http://www.w3.org/TR/wsdl#_types types} data type definition

Parameters
Name Type Description
$type string

Name of the class to be specified

Returns
Type Description
string XSD Type for the given PHP type
methodpublicaddDocumentation( object $input_node, string $documentation ) : \DOMElement

Add a documentation element to any element in the WSDL.

Note that the WSDL {@link http://www.w3.org/TR/wsdl#_documentation specification} uses 'document', but the WSDL {@link http://schemas.xmlsoap.org/wsdl/ schema} uses 'documentation' instead. The {@link http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#WSDL_documentation_Element WS-I Basic Profile 1.1} recommends using 'documentation'.

Parameters
Name Type Description
$input_node object

An XML_Tree_Node returned by another method to add the documentation to

$documentation string

Human readable documentation for the node

Returns
Type Description
\DOMElement The documentation element
methodpublicaddElement( array $element ) : string

Add an xsd:element represented as an array to the schema.

Array keys represent attribute names and values their respective value. The 'sequence', 'all' and 'choice' keys must have an array of elements as their value, to add them to a nested complexType.

Example: array( 'name' => 'MyElement', 'sequence' => array( array('name' => 'myString', 'type' => 'string'), array('name' => 'myInteger', 'type' => 'int') ) ); Resulting XML:

Parameters
Name Type Description
$element array

an xsd:element represented as an array

Returns
Type Description
string xsd:element for the given element array
methodpublicaddMessage( string $name, array $parts ) : object

Add a {@link http://www.w3.org/TR/wsdl#_messages message} element to the WSDL

Parameters
Name Type Description
$name string

Name for the {@link http://www.w3.org/TR/wsdl#_messages message}

$parts array

An array of {@link http://www.w3.org/TR/wsdl#_message parts} The array is constructed like: 'name of part' => 'part xml schema data type' or 'name of part' => array('type' => 'part xml schema type') or 'name of part' => array('element' => 'part xml element name')

Returns
Type Description
object The new message's XML_Tree_Node for use in {@link function addDocumentation}
methodpublicaddPortOperation( object $portType, string $name, string $input = false, string $output = false, string $fault = false ) : object

Add an {@link http://www.w3.org/TR/wsdl#_request-response operation} element to a portType element

Parameters
Name Type Description
$portType object

a portType XML_Tree_Node, from {@link function addPortType}

$name string

Operation name

$input string

Input Message

$output string

Output Message

$fault string

Fault Message

Returns
Type Description
object The new operation's XML_Tree_Node for use in {@link function addDocumentation}
methodpublicaddPortType( string $name ) : object

Add a {@link http://www.w3.org/TR/wsdl#_porttypes portType} element to the WSDL

Parameters
Name Type Description
$name string

portType element's name

Returns
Type Description
object The new portType's XML_Tree_Node for use in {@link function addPortOperation} and {@link function addDocumentation}
methodpublicaddSchemaTypeSection( ) : \Zend_Soap_Wsdl

This function makes sure a complex types section and schema additions are set.

Returns
Type Description
\Zend_Soap_Wsdl
methodpublicaddService( string $name, string $port_name, string $binding, string $location ) : object

Add a {@link http://www.w3.org/TR/wsdl#_services service} element to the WSDL

Parameters
Name Type Description
$name string

Service Name

$port_name string

Name of the port for the service

$binding string

Binding for the port

$location string

SOAP Address for the service

Returns
Type Description
object The new service's XML_Tree_Node for use with {@link function addDocumentation}
methodpublicaddSoapBinding( object $binding, string $style = 'document', string $transport = 'http://schemas.xmlsoap.org/soap/http' ) : boolean

Add a {@link http://www.w3.org/TR/wsdl#_soap:binding SOAP binding} element to a Binding element

Parameters
Name Type Description
$binding object

A binding XML_Tree_Node returned by {@link function addBinding}

$style string

binding style, possible values are "rpc" (the default) and "document"

$transport string

Transport method (defaults to HTTP)

Returns
Type Description
boolean
methodpublicaddSoapOperation(  $binding, string $soap_action ) : boolean

Add a {@link http://www.w3.org/TR/wsdl#_soap:operation SOAP operation} to an operation element

Parameters
Name Type Description
$binding
$soap_action string

SOAP Action

Returns
Type Description
boolean
methodpublicaddType( string $type ) : \Zend_Soap_Wsdl

Add a complex type name that is part of this WSDL and can be used in signatures.

Parameters
Name Type Description
$type string
Returns
Type Description
\Zend_Soap_Wsdl
methodpublicaddTypes( object $types ) : void

Add WSDL Types element

Parameters
Name Type Description
$types object

A DomDocument|DomNode|DomElement|DomDocumentFragment with all the XML Schema types defined in it

methodpublicdump(  $filename = false ) : boolean

Echo the WSDL as XML

Parameters
Name Type Description
$filename
Returns
Type Description
boolean
methodpublicgetComplexTypeStrategy( ) : \Zend_Soap_Wsdl_Strategy_Interface

Get the current complex type strategy

Returns
Type Description
\Zend_Soap_Wsdl_Strategy_Interface
methodpublicgetSchema( ) : \DOMElement

Return the Schema node of the WSDL

Returns
Type Description
\DOMElement
methodpublicgetType( string $type ) : string

Returns an XSD Type for the given PHP type

Parameters
Name Type Description
$type string

PHP Type to get the XSD type for

Returns
Type Description
string
methodpublicgetTypes( ) : array

Return an array of all currently included complex types

Returns
Type Description
array
methodpublicsetComplexTypeStrategy( boolean|string|\Zend_Soap_Wsdl_Strategy_Interface $strategy ) : \Zend_Soap_Wsdl

Set a strategy for complex type detection and handling

Parameters
Name Type Description
$strategy boolean|string|\Zend_Soap_Wsdl_Strategy_Interface
Returns
Type Description
\Zend_Soap_Wsdl
Details
Todo
Boolean is for backwards compability with extractComplexType object var. Remove it in later versions.  
methodpublicsetUri( string|\Zend_Uri_Http $uri ) : \Zend_Server_Wsdl

Set a new uri for this WSDL

Parameters
Name Type Description
$uri string|\Zend_Uri_Http
Returns
Type Description
\Zend_Server_Wsdl
methodpublictoDomDocument( ) : object

Return DOM Document

Returns
Type Description
object DomDocum ent
methodpublictoXML( ) : string

Return the WSDL as XML

Returns
Type Description
string WSDL as XML
Documentation was generated by DocBlox 0.15.1.