Zend_Soap_Wsdl

category Zend
package Zend_Soap

 Methods

Constructor

__construct(string $name, string $uri, boolean|string|\Zend_Soap_Wsdl_Strategy_Interface $strategy = true

Parameters

$name

string

Name of the Web Service being Described

$uri

string

URI where the WSDL will be available

$strategy

booleanstring\Zend_Soap_Wsdl_Strategy_Interface

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

addBinding(string $name, $portType) : object

Parameters

$name

string

Name of the Binding

$portType

Returns

objectThe new binding's XML_Tree_Node for use with {@link function addBindingOperation} and {@link function addDocumentation}

Add an operation to a binding element

addBindingOperation(object $binding, $name, array $input = false, array $output = false, array $fault = false) : object

Parameters

$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

objectThe new Operation's XML_Tree_Node for use with {@link function addSoapOperation} and {@link function addDocumentation}

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

addComplexType(string $type) : string

Parameters

$type

string

Name of the class to be specified

Returns

stringXSD Type for the given PHP type

Add a documentation element to any element in the WSDL.

addDocumentation(object $input_node, string $documentation) : \DOMElement

Note that the WSDL specification uses 'document', but the WSDL schema uses 'documentation' instead. The WS-I Basic Profile 1.1 recommends using 'documentation'.

Parameters

$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

\DOMElementThe documentation element

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

addElement(array $element) : string

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:

             <xsd:element name="myInteger" type="int"/>
           </xsd:sequence></xsd:complexType></xsd:element>

Parameters

$element

array

an xsd:element represented as an array

Returns

stringxsd:element for the given element array

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

addMessage(string $name, array $parts) : object

Parameters

$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

objectThe new message's XML_Tree_Node for use in {@link function addDocumentation}

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

addPortOperation(object $portType, string $name, string $input = false, string $output = false, string $fault = false) : object

Parameters

$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

objectThe new operation's XML_Tree_Node for use in {@link function addDocumentation}

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

addPortType(string $name) : object

Parameters

$name

string

portType element's name

Returns

objectThe new portType's XML_Tree_Node for use in {@link function addPortOperation} and {@link function addDocumentation}

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

addSchemaTypeSection() : \Zend_Soap_Wsdl

Returns

\Zend_Soap_Wsdl

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

addService(string $name, string $port_name, string $binding, string $location) : object

Parameters

$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

objectThe new service's XML_Tree_Node for use with {@link function addDocumentation}

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

addSoapBinding(object $binding, string $style = 'document', string $transport = 'http://schemas.xmlsoap.org/soap/http') : boolean

Parameters

$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

boolean

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

addSoapOperation($binding, string $soap_action) : boolean

Parameters

$binding

$soap_action

string

SOAP Action

Returns

boolean

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

addType(string $type) : \Zend_Soap_Wsdl

Parameters

$type

string

Returns

\Zend_Soap_Wsdl

Add WSDL Types element

addTypes(object $types) 

Parameters

$types

object

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

Echo the WSDL as XML

dump($filename = false) : boolean

Parameters

$filename

Returns

boolean

Get the current complex type strategy

getComplexTypeStrategy() : \Zend_Soap_Wsdl_Strategy_Interface

Returns

\Zend_Soap_Wsdl_Strategy_Interface

Return the Schema node of the WSDL

getSchema() : \DOMElement

Returns

\DOMElement

Returns an XSD Type for the given PHP type

getType(string $type) : string

Parameters

$type

string

PHP Type to get the XSD type for

Returns

string

Return an array of all currently included complex types

getTypes() : array

Returns

array

Set a strategy for complex type detection and handling

setComplexTypeStrategy(boolean|string|\Zend_Soap_Wsdl_Strategy_Interface $strategy) : \Zend_Soap_Wsdl
todo Boolean is for backwards compability with extractComplexType object var. Remove it in later versions.

Parameters

$strategy

booleanstring\Zend_Soap_Wsdl_Strategy_Interface

Returns

\Zend_Soap_Wsdl

Set a new uri for this WSDL

setUri(string|\Zend_Uri_Http $uri) : \Zend_Server_Wsdl

Parameters

$uri

string\Zend_Uri_Http

Returns

\Zend_Server_Wsdl

Return DOM Document

toDomDocument() : object

Returns

objectDomDocum ent

Return the WSDL as XML

toXML() : string

Returns

stringWSDL as XML

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

_parseElement(array $element) : \DOMElement

Parameters

$element

array

an xsd:element represented as an array

Returns

\DOMElementparsed element

 Properties

 

Strategy for detection of complex types

$_strategy 

Default

null
 

DomDocument Instance

$_dom : object

Default

 

Types defined on schema

$_includedTypes : array

Default

array()
 

$_schema

$_schema : \DOMElement

Default

null
 

URI where the WSDL will be available

$_uri : string

Default

 

WSDL Root XML_Tree_Node

$_wsdl : object

Default