\Zend\Soap\Wsdl

category Zend
package Zend_Soap

 Methods

Constructor

__construct(string $name, string | \Zend\Uri\Uri $uri, \Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface $strategy, array $classMap) 

Parameters

$name

string

Name of the Web Service being Described

$uri

string\Zend\Uri\Uri

URI where the WSDL will be available

$strategy

null\Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface

Strategy for detection of complex types

$classMap

nullarray

Map of PHP Class names to WSDL QNames

Exceptions

\Zend\Soap\Exception\RuntimeException

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

addBinding(string $name, string $portType) : object

Parameters

$name

string

Name of the Binding

$portType

string

name of the portType to bind

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, array $output, array $fault) : 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 $inputNode, 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

$inputNode

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:

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, string $output, string $fault) : 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

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

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

Parameters

$name

string

Service Name

$portName

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, string $transport) : bool

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

bool

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

addSoapOperation($binding, string $soapAction) : bool

Parameters

$binding

$soapAction

string

SOAP Action

Returns

bool

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

addType(string $type, string $wsdlType) : \Zend\Soap\Wsdl

Parameters

$type

string

$wsdlType

string

Returns

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) : bool

Parameters

$filename

Returns

bool

Get the class map of php to wsdl qname types.

getClassMap() : array

Returns

array

Return the Schema node of the WSDL

getSchema() : \DOMElement

Returns

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 the class map of php to wsdl qname types.

setClassMap($classMap) 

Parameters

$classMap

Set a strategy for complex type detection and handling

setComplexTypeStrategy(\Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface $strategy) : \Zend\Soap\Wsdl

Set a new uri for this WSDL

setUri(string | \Zend\Uri\Uri $uri) : \Zend\Soap\Wsdl

Parameters

$uri

string\Zend\Uri\Uri

Returns

Return DOM Document

toDomDocument() : object

Returns

objectDomDocum ent

Return the WSDL as XML

toXML() : string

Returns

stringWSDL as XML

Translate PHP type into WSDL QName

translateType(string $type) : string

Parameters

$type

string

Returns

stringQName

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

Exceptions

\Zend\Soap\Exception\RuntimeException if $element is not an array

Returns

\DOMElementparsed element

 Properties

 

Map of PHP Class names to WSDL QNames.

$classMap : array

 

Strategy for detection of complex types

$strategy 

 

<p>DomDocument Instance</p>

$dom : object

 

Types defined on schema

$includedTypes : array

 

$schema

$schema : \DOMElement

 

<p>URI where the WSDL will be available</p>

$uri : string

 

<p>WSDL Root XML_Tree_Node</p>

$wsdl : object