Methods

__construct()

__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) : \DOMElement

Parameters

$name

string

Name of the Binding

$portType

string

name of the portType to bind

Returns

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

Add an operation to a binding element

addBindingOperation(\DOMElement $binding, string $name, array | bool $input, array | bool $output, array | bool $fault, int $soapVersion) : \DOMElement

Parameters

$binding

\DOMElement

A binding XML_Tree_Node returned by {@link function addBinding}

$name

string

$input

arraybool

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

arraybool

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

arraybool

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

$soapVersion

int

SOAP version: SOAP_1_1 or SOAP_1_2, default: SOAP_1_1

Returns

\DOMElementThe 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(\DOMElement $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

\DOMElement

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 $messageName, array $parts) : \DOMElement

Parameters

$messageName

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

\DOMElementThe 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(\DOMElement $portType, string $name, bool | string $input, bool | string $output, bool | string $fault) : \DOMElement

Parameters

$portType

\DOMElement

a portType XML_Tree_Node, from {@link function addPortType}

$name

string

Operation name

$input

boolstring

Input Message

$output

boolstring

Output Message

$fault

boolstring

Fault Message

Returns

\DOMElementThe 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) : \DOMElement

Parameters

$name

string

portType element's name

Returns

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

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

addSchemaTypeSection() : \Zend\Soap\self

Returns

\Zend\Soap\self

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

addService(string $name, string $portName, string $binding, string $location, int $soapVersion) : \DOMElement

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

$soapVersion

int

SOAP version: SOAP_1_1 or SOAP_1_2, default: SOAP_1_1

Returns

\DOMElementThe 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(\DOMElement $binding, string $style, string $transport, int $soapVersion) : \DOMElement

Parameters

$binding

\DOMElement

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)

$soapVersion

int

SOAP version: SOAP_1_1 or SOAP_1_2, default: SOAP_1_1

Returns

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

addSoapOperation(\DOMElement $operation, string $soapAction, int $soapVersion) : \DOMElement

Parameters

$operation

\DOMElement

An operation XML_Tree_Node returned by {@link function addBindingOperation}

$soapAction

string

SOAP Action

$soapVersion

int

SOAP version: SOAP_1_1 or SOAP_1_2, default: SOAP_1_1

Returns

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

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

Parameters

$type

string

$wsdlType

string

Returns

\Zend\Soap\self

Add WSDL Types element

addTypes(\DOMNode $types) 

Parameters

$types

\DOMDocument\DOMNode\DOMElement\DOMDocumentFragment

A DOMDocument|DOMNode|DOMElement|DOMDocumentFragment with all the XML Schema types defined in it

Echo the WSDL as XML

dump(bool $filename) : bool

Parameters

$filename

bool

Returns

bool

Get the class map of php to wsdl mappings.

getClassMap() : array

.

Returns

array

Return the Schema node of the WSDL

getSchema() : \DOMElement

Returns

Retrieve target namespace of the WSDL document.

getTargetNamespace() : string

Returns

string

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

Return WSDL uri

getUri() : string

Returns

string

Function for sanitizing uri

sanitizeUri(string | \Zend\Uri\Uri $uri) : string

Parameters

$uri

string\Zend\Uri\Uri

Exceptions

\Zend\Soap\Exception\InvalidArgumentException

Returns

string

Set the class map of php to wsdl mappings.

setClassMap($classMap) : \Zend\Soap\self

.

Parameters

$classMap

Returns

\Zend\Soap\self

Set a strategy for complex type detection and handling

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

Parameters

Returns

\Zend\Soap\self

Set a new uri for this WSDL

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

Parameters

$uri

string\Zend\Uri\Uri

Returns

\Zend\Soap\self

Return DOM Document

toDomDocument() : \DOMDocument

Returns

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

Convert associative array to attributes of given node using optional {@link function sanitizeAttributeValueByName}

arrayToAttributes(\DOMNode $node, array $attributes, bool $withSanitizer) 

Parameters

$node

\DOMNode

$attributes

array

$withSanitizer

bool

Get the wsdl XML document with all namespaces and required attributes

getDOMDocument(string $name, string $uri) : \DOMDocument

Parameters

$name

string

$uri

string

Returns

Return soap namespace uri according to $soapVersion

getSoapNamespaceUriByVersion(int $soapVersion) : string

Parameters

$soapVersion

int

SOAP_1_1 or SOAP_1_2 constants

Exceptions

\Zend\Soap\Exception\InvalidArgumentException

Returns

string

Prepare attribute value for specific attributes

sanitizeAttributeValueByName(string $name, mixed $value) : string

Parameters

$name

string

$value

mixed

Returns

stringsafe value or original $value

Set attribute to given node

setAttribute(\DOMNode $node, string $attributeName, mixed $attributeValue) 

Parameters

$node

\DOMNode

$attributeName

string

$attributeValue

mixed

Set attribute to given node using {@link function sanitizeAttributeValueByName}

setAttributeWithSanitization(\DOMNode $node, string $attributeName, mixed $attributeValue) 

Parameters

$node

\DOMNode

$attributeName

string

$attributeValue

mixed

 Properties

 

Map of PHP Class names to WSDL QNames.

$classMap : array

 

DOM Instance

$dom : \DOMDocument

 

Types defined on schema

$includedTypes : array

 

$schema

$schema : \DOMElement

 

Strategy for detection of complex types

$strategy 

 

URI where the WSDL will be available

$uri : string

 

Root XML_Tree_Node

$wsdl : \DOMElement

 Constants

 

SOAP_11_NS

SOAP_11_NS 

 

SOAP_11_NS_URI

SOAP_11_NS_URI 

 

SOAP_12_NS

SOAP_12_NS 

 

SOAP_12_NS_URI

SOAP_12_NS_URI 

 

SOAP_ENC_NS

SOAP_ENC_NS 

 

SOAP_ENC_URI

SOAP_ENC_URI 

 

TYPES_NS

TYPES_NS 

 

WSDL_NS

WSDL_NS 

 

WSDL_NS_URI

WSDL_NS_URI 

 

XML_NS

XML_NS 

 

XML_NS_URI

XML_NS_URI 

 

XSD_NS

XSD_NS 

 

XSD_NS_URI

XSD_NS_URI