1745. Class

1745.1. Zend\Soap\Wsdl

ZendSoapWsdl

1745.1.1. Methods

1745.1.1.1. __construct

__construct()

Constructor

Parameters:
  • string – Name of the Web Service being Described
  • string|Uri – URI where the WSDL will be available
  • null|ComplexTypeStrategy – Strategy for detection of complex types
  • null|array – Map of PHP Class names to WSDL QNames
Throws ExceptionRuntimeException:
 

1745.1.1.2. escapeUri

escapeUri()

URL encode query part of the URI if it is present.

Parameters:string
Return type:string

1745.1.1.3. decodeAmpersand

decodeAmpersand()

Convert encoded ampersand back to decoded value, to avoid double encoding by DOMElement::setAttribute()

Parameters:$uri
Return type:mixed

1745.1.1.4. getTargetNamespace

getTargetNamespace()

Retrieve target namespace of the WSDL document.

Return type:string

1745.1.1.5. getClassMap

getClassMap()

Get the class map of php to wsdl qname types.

Return type:array

1745.1.1.6. setClassMap

setClassMap()

Set the class map of php to wsdl qname types.

1745.1.1.7. setUri

setUri()

Set a new uri for this WSDL

Parameters:string|Uri
Return type:ZendSoapWsdl

1745.1.1.8. setComplexTypeStrategy

setComplexTypeStrategy()

Set a strategy for complex type detection and handling

Parameters:ComplexTypeStrategy
Return type:ZendSoapWsdl

1745.1.1.9. getComplexTypeStrategy

getComplexTypeStrategy()

Get the current complex type strategy

Return type:ComplexTypeStrategy

1745.1.1.10. addMessage

addMessage()

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

Parameters:
Return type:

DOMElement The new message’s XML_Tree_Node for use in {@link function addDocumentation}

1745.1.1.11. addPortType

addPortType()

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

Parameters:string – portType element’s name
Return type:DOMElement The new portType’s XML_Tree_Node for use in {@link function addPortOperation} and {@link function addDocumentation}

1745.1.1.12. addPortOperation

addPortOperation()

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

Parameters:
  • DOMElement – a portType XML_Tree_Node, from {@link function addPortType}
  • string – Operation name
  • bool|string – Input Message
  • bool|string – Output Message
  • bool|string – Fault Message
Return type:

DOMElement The new operation’s XML_Tree_Node for use in {@link function addDocumentation}

1745.1.1.13. addBinding

addBinding()

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

Parameters:
  • string – Name of the Binding
  • string – name of the portType to bind
Return type:

DOMElement The new binding’s XML_Tree_Node for use with {@link function addBindingOperation} and {@link function addDocumentation}

1745.1.1.14. addBindingOperation

addBindingOperation()

Add an operation to a binding element

Parameters:
  • DOMElement – A binding XML_Tree_Node returned by {@link function addBinding}
  • string
  • bool|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}
  • bool|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}
  • bool|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}
  • int – SOAP version to be used in binding operation. 1.1 used by default.
Return type:

DOMElement The new Operation’s XML_Tree_Node for use with {@link function addSoapOperation} and {@link function addDocumentation}

1745.1.1.15. addSoapBinding

addSoapBinding()

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

Parameters:
  • DOMElement – A binding XML_Tree_Node returned by {@link function addBinding}
  • string – binding style, possible values are “rpc” (the default) and “document”
  • string – Transport method (defaults to HTTP)
  • int – SOAP version to be used in binding. 1.1 used by default.
Return type:

DOMElement

1745.1.1.16. addSoapOperation

addSoapOperation()

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

Parameters:
  • DOMElement – An operation XML_Tree_Node returned by {@link function addBindingOperation}
  • string – SOAP Action
  • int – SOAP version to be used in operation. 1.1 used by default.
Return type:

DOMElement

1745.1.1.17. addService

addService()

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

Parameters:
  • string – Service Name
  • string – Name of the port for the service
  • string – Binding for the port
  • string – SOAP Address for the service
  • int – SOAP version to be used in service. 1.1 used by default.
Return type:

DOMElement The new service’s XML_Tree_Node for use with {@link function addDocumentation}

1745.1.1.18. addDocumentation

addDocumentation()

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:
  • DOMElement – An XML_Tree_Node returned by another method to add the documentation to
  • string – Human readable documentation for the node
Return type:

DOMElement The documentation element

1745.1.1.19. addTypes

addTypes()

Add WSDL Types element

Parameters:DOMNode – A DOM Node with all the XML Schema types defined in it

1745.1.1.20. addType

addType()

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

Parameters:
  • string
  • string
Return type:

ZendSoapWsdl

1745.1.1.21. getTypes

getTypes()

Return an array of all currently included complex types

Return type:array

1745.1.1.22. getSchema

getSchema()

Return the Schema node of the WSDL

Return type:DOMElement

1745.1.1.23. toXML

toXML()

Return the WSDL as XML

Return type:string WSDL as XML

1745.1.1.24. toDomDocument

toDomDocument()

Return DOM Document

Return type:DOMDocument

1745.1.1.25. dump

dump()

Echo the WSDL as XML to stdout or save the WSDL to a file

Parameters:bool|string – Filename to save the output (Optional)
Return type:bool

1745.1.1.26. getType

getType()

Returns an XSD Type for the given PHP type

Parameters:string – PHP Type to get the XSD type for
Return type:string

1745.1.1.27. addSchemaTypeSection

addSchemaTypeSection()

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

Return type:ZendSoapWsdl

1745.1.1.28. translateType

translateType()

Translate PHP type into WSDL QName

Parameters:string
Return type:string QName

1745.1.1.29. addComplexType

addComplexType()

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

Parameters:string – Name of the class to be specified
Return type:string XSD Type for the given PHP type

1745.1.1.30. _parseElement

_parseElement()

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

Parameters:array – an xsd:element represented as an array
Throws ExceptionRuntimeException:
 if $element is not an array
Return type:DOMElement parsed element

1745.1.1.31. addElement

addElement()

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: <xsd:element name=”MyElement”><xsd:complexType><xsd:sequence>
<xsd:element name=”myString” type=”string”/> <xsd:element name=”myInteger” type=”int”/>

</xsd:sequence></xsd:complexType></xsd:element>

Parameters:array – an xsd:element represented as an array
Return type:string xsd:element for the given element array

1745.1.2. Constants

1745.1.2.1. XML_NS

1745.1.2.2. XML_NS_URI

1745.1.2.3. WSDL_NS

1745.1.2.4. WSDL_NS_URI

1745.1.2.5. SOAP_11_NS

1745.1.2.6. SOAP_11_NS_URI

1745.1.2.7. SOAP_12_NS

1745.1.2.8. SOAP_12_NS_URI

1745.1.2.9. SOAP_ENC_NS

1745.1.2.10. SOAP_ENC_URI

1745.1.2.11. XSD_NS

1745.1.2.12. XSD_NS_URI

1745.1.2.13. TYPES_NS