package Default

 Methods

__construct()

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

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|boolean $input = false, array|boolean $output = false, array|boolean $fault = false, integer $soapVersion = SOAP_1_1) : \DOMElement

Parameters

$binding

\DOMElement

A binding XML_Tree_Node returned by {@link function addBinding}

$name

string

$input

arrayboolean

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

arrayboolean

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

arrayboolean

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

integer

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:

             <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 $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, boolean|string $input = false, boolean|string $output = false, boolean|string $fault = false) : \DOMElement

Parameters

$portType

\DOMElement

a portType XML_Tree_Node, from {@link function addPortType}

$name

string

Operation name

$input

booleanstring

Input Message

$output

booleanstring

Output Message

$fault

booleanstring

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\Wsdl
fluent This method is part of a fluent interface and will return the same instance

Returns

\Zend\Soap\Wsdl

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

addService(string $name, string $portName, string $binding, string $location, integer $soapVersion = SOAP_1_1) : \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

integer

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 = 'document', string $transport = 'http://schemas.xmlsoap.org/soap/http', integer $soapVersion = SOAP_1_1) : \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

integer

SOAP version: SOAP_1_1 or SOAP_1_2, default: SOAP_1_1

Returns

\DOMElement

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

addSoapOperation(\DOMElement $operation, string $soapAction, integer $soapVersion = SOAP_1_1) : \DOMElement

Parameters

$operation

\DOMElement

An operation XML_Tree_Node returned by {@link function addBindingOperation}

$soapAction

string

SOAP Action

$soapVersion

integer

SOAP version: SOAP_1_1 or SOAP_1_2, default: SOAP_1_1

Returns

\DOMElement

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
fluent This method is part of a fluent interface and will return the same instance

Parameters

$type

string

$wsdlType

string

Returns

\Zend\Soap\Wsdl

Add WSDL Types element

addTypes(\DOMDocument|\DOMNode|\DOMElement|\DOMDocumentFragment $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(boolean $filename = false) : boolean

Parameters

$filename

boolean

Returns

boolean

Get the class map of php to wsdl mappings.

getClassMap() : array

.

Returns

array

Get the current complex type strategy

getComplexTypeStrategy() : \Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface

Returns

\Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface

Return the Schema node of the WSDL

getSchema() : \DOMElement

Returns

\DOMElement

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(array $classMap) : \Zend\Soap\Wsdl

.

fluent This method is part of a fluent interface and will return the same instance

Parameters

$classMap

array

Returns

\Zend\Soap\Wsdl

Set a strategy for complex type detection and handling

setComplexTypeStrategy(\Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface $strategy) : \Zend\Soap\Wsdl
fluent This method is part of a fluent interface and will return the same instance

Parameters

$strategy

\Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface

Returns

\Zend\Soap\Wsdl

Set a new uri for this WSDL

setUri(string|\Zend\Uri\Uri $uri) : \Zend\Soap\Wsdl
fluent This method is part of a fluent interface and will return the same instance

Parameters

$uri

string\Zend\Uri\Uri

Returns

\Zend\Soap\Wsdl

Return DOM Document

toDomDocument() : \DOMDocument

Returns

\DOMDocument

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, boolean $withSanitizer = true

Parameters

$node

\DOMNode

$attributes

array

$withSanitizer

boolean

Get the wsdl XML document with all namespaces and required attributes

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

Parameters

$name

string

$uri

string

Returns

\DOMDocument

Return soap namespace uri according to $soapVersion

getSoapNamespaceUriByVersion(integer $soapVersion) : string

Parameters

$soapVersion

integer

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

Default

array()
 

DOM Instance

$dom : \DOMDocument

Default

 

Types defined on schema

$includedTypes : array

Default

array()
 

$schema

$schema : \DOMElement

Default

null
 

Strategy for detection of complex types

$strategy 

Default

null
 

URI where the WSDL will be available

$uri : string

Default

 

Root XML_Tree_Node

$wsdl : \DOMElement

Default

 Constants

 

SOAP_11_NS

SOAP_11_NS = 'soap' 
 

SOAP_11_NS_URI

SOAP_11_NS_URI = 'http://schemas.xmlsoap.org/wsdl/soap/' 
 

SOAP_12_NS

SOAP_12_NS = 'soap12' 
 

SOAP_12_NS_URI

SOAP_12_NS_URI = 'http://schemas.xmlsoap.org/wsdl/soap12/' 
 

SOAP_ENC_NS

SOAP_ENC_NS = 'soap-enc' 
 

SOAP_ENC_URI

SOAP_ENC_URI = 'http://schemas.xmlsoap.org/soap/encoding/' 
 

TYPES_NS

TYPES_NS = 'tns' 
 

WSDL_NS

WSDL_NS = 'wsdl' 
 

WSDL_NS_URI

WSDL_NS_URI = 'http://schemas.xmlsoap.org/wsdl/' 
 

XML_NS

XML_NS = 'xmlns' 
 

XML_NS_URI

XML_NS_URI = 'http://www.w3.org/2000/xmlns/' 
 

XSD_NS

XSD_NS = 'xsd' 
 

XSD_NS_URI

XSD_NS_URI = 'http://www.w3.org/2001/XMLSchema'