Zend Framework
3.0
|
Public Member Functions | |
__construct ($name, $uri, ComplexTypeStrategy $strategy=null, array $classMap=[]) | |
getTargetNamespace () | |
Retrieve target namespace of the WSDL document. | |
getClassMap () | |
Get the class map of php to wsdl mappings. | |
setClassMap (array $classMap) | |
Set the class map of php to wsdl mappings. | |
setUri ($uri) | |
Set a new uri for this WSDL. | |
getUri () | |
Return WSDL uri. | |
sanitizeUri ($uri) | |
Function for sanitizing uri. | |
setComplexTypeStrategy (ComplexTypeStrategy $strategy) | |
Set a strategy for complex type detection and handling. | |
getComplexTypeStrategy () | |
Get the current complex type strategy. | |
addMessage ($messageName, $parts) | |
Add a message element to the WSDL. | |
addPortType ($name) | |
Add a portType element to the WSDL. | |
addPortOperation ($portType, $name, $input=false, $output=false, $fault=false) | |
Add an operation element to a portType element. | |
addBinding ($name, $portType) | |
Add a binding element to WSDL. | |
addBindingOperation ($binding, $name, $input=false, $output=false, $fault=false, $soapVersion=SOAP_1_1) | |
Add an operation to a binding element. | |
addSoapBinding ($binding, $style= 'document', $transport= 'http://schemas.xmlsoap.org/soap/http', $soapVersion=SOAP_1_1) | |
Add a SOAP binding element to a Binding element. | |
addSoapOperation ($operation, $soapAction, $soapVersion=SOAP_1_1) | |
Add a SOAP operation to an operation element. | |
addService ($name, $portName, $binding, $location, $soapVersion=SOAP_1_1) | |
Add a service element to the WSDL. | |
addDocumentation ($inputNode, $documentation) | |
Add a documentation element to any element in the WSDL. | |
addTypes (DOMNode $types) | |
Add WSDL Types element. | |
addType ($type, $wsdlType) | |
Add a complex type name that is part of this WSDL and can be used in signatures. | |
getTypes () | |
Return an array of all currently included complex types. | |
getSchema () | |
Return the Schema node of the WSDL. | |
toXML () | |
Return the WSDL as XML. | |
toDomDocument () | |
Return DOM Document. | |
dump ($filename=false) | |
Echo the WSDL as XML. | |
getType ($type) | |
Returns an XSD Type for the given PHP type. | |
addSchemaTypeSection () | |
This function makes sure a complex types section and schema additions are set. | |
translateType ($type) | |
Translate PHP type into WSDL QName. | |
addComplexType ($type) | |
Add a types data type definition. | |
addElement ($element) | |
Add an xsd:element represented as an array to the schema. | |
Public Attributes | |
const | XML_NS = 'xmlns' |
#@+ XML Namespace uris and prefixes. | |
const | XML_NS_URI = 'http://www.w3.org/2000/xmlns/' |
const | WSDL_NS = 'wsdl' |
const | WSDL_NS_URI = 'http://schemas.xmlsoap.org/wsdl/' |
const | SOAP_11_NS = 'soap' |
const | SOAP_11_NS_URI = 'http://schemas.xmlsoap.org/wsdl/soap/' |
const | SOAP_12_NS = 'soap12' |
const | SOAP_12_NS_URI = 'http://schemas.xmlsoap.org/wsdl/soap12/' |
const | SOAP_ENC_NS = 'soap-enc' |
const | SOAP_ENC_URI = 'http://schemas.xmlsoap.org/soap/encoding/' |
const | XSD_NS = 'xsd' |
const | XSD_NS_URI = 'http://www.w3.org/2001/XMLSchema' |
const | TYPES_NS = 'tns' |
Protected Member Functions | |
getDOMDocument ($name, $uri=null) | |
Get the wsdl XML document with all namespaces and required attributes. | |
parseElement ($element) | |
Parse an xsd:element represented as an array into a DOMElement. | |
sanitizeAttributeValueByName ($name, $value) | |
Prepare attribute value for specific attributes. | |
arrayToAttributes (\DOMNode $node, array $attributes, $withSanitizer=true) | |
Convert associative array to attributes of given node. | |
setAttributeWithSanitization (\DOMNode $node, $attributeName, $attributeValue) | |
Set attribute to given node using sanitizeAttributeValueByName. | |
setAttribute (\DOMNode $node, $attributeName, $attributeValue) | |
Set attribute to given node. | |
getSoapNamespaceUriByVersion ($soapVersion) | |
Return soap namespace uri according to $soapVersion. | |
Protected Attributes | |
$classMap = [] | |
$dom | |
$includedTypes = [] | |
$schema = null | |
$strategy = null | |
Strategy for detection of complex types. | |
$uri | |
$wsdl | |
__construct | ( | $name, | |
$uri, | |||
ComplexTypeStrategy | $strategy = null , |
||
array | $classMap = [] |
||
) |
string | $name | Name of the Web Service being Described |
string | Uri | $uri | URI where the WSDL will be available |
null | ComplexTypeStrategy | $strategy | Strategy for detection of complex types |
null | array | $classMap | Map of PHP Class names to WSDL QNames |
Exception\RuntimeException |
addBinding | ( | $name, | |
$portType | |||
) |
Add a binding element to WSDL.
string | $name | Name of the Binding |
string | $portType | name of the portType to bind |
addBindingOperation | ( | $binding, | |
$name, | |||
$input = false , |
|||
$output = false , |
|||
$fault = false , |
|||
$soapVersion = SOAP_1_1 |
|||
) |
Add an operation to a binding element.
DOMElement | $binding | A binding XML_Tree_Node returned by addBinding |
string | $name | |
array | bool | $input | An array of attributes for the input element, allowed keys are: 'use', 'namespace', 'encodingStyle'. More Information |
array | bool | $output | An array of attributes for the output element, allowed keys are: 'use', 'namespace', 'encodingStyle'. More Information |
array | bool | $fault | An array with attributes for the fault element, allowed keys are: 'name', 'use', 'namespace', 'encodingStyle'. More Information |
int | $soapVersion | SOAP version: SOAP_1_1 or SOAP_1_2, default: SOAP_1_1 |
addComplexType | ( | $type | ) |
Add a types data type definition.
string | $type | Name of the class to be specified |
addDocumentation | ( | $inputNode, | |
$documentation | |||
) |
Add a documentation element to any element in the WSDL.
Note that the WSDL specification uses 'document', but the WSDL schema uses 'documentation' instead.
The WS-I Basic Profile 1.1 recommends using 'documentation'.
DOMElement | $inputNode | An XML_Tree_Node returned by another method to add the documentation to |
string | $documentation | Human readable documentation for the node |
addElement | ( | $element | ) |
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>
array | $element | an xsd:element represented as an array |
addMessage | ( | $messageName, | |
$parts | |||
) |
Add a message element to the WSDL.
string | $messageName | Name for the message |
array | $parts | An array of 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') |
addPortOperation | ( | $portType, | |
$name, | |||
$input = false , |
|||
$output = false , |
|||
$fault = false |
|||
) |
Add an operation element to a portType element.
DOMElement | $portType | a portType XML_Tree_Node, from addPortType |
string | $name | Operation name |
bool | string | $input | Input Message |
bool | string | $output | Output Message |
bool | string | $fault | Fault Message |
addPortType | ( | $name | ) |
Add a portType element to the WSDL.
string | $name | portType element's name |
addSchemaTypeSection | ( | ) |
This function makes sure a complex types section and schema additions are set.
addService | ( | $name, | |
$portName, | |||
$binding, | |||
$location, | |||
$soapVersion = SOAP_1_1 |
|||
) |
Add a service element to the WSDL.
string | $name | Service Name |
string | $portName | Name of the port for the service |
string | $binding | Binding for the port |
string | $location | SOAP Address for the service |
int | $soapVersion | SOAP version: SOAP_1_1 or SOAP_1_2, default: SOAP_1_1 |
addSoapBinding | ( | $binding, | |
$style = 'document' , |
|||
$transport = 'http://schemas.xmlsoap.org/soap/http' , |
|||
$soapVersion = SOAP_1_1 |
|||
) |
Add a SOAP binding element to a Binding element.
DOMElement | $binding | A binding XML_Tree_Node returned by addBinding |
string | $style | binding style, possible values are "rpc" (the default) and "document" |
string | $transport | Transport method (defaults to HTTP) |
int | $soapVersion | SOAP version: SOAP_1_1 or SOAP_1_2, default: SOAP_1_1 |
addSoapOperation | ( | $operation, | |
$soapAction, | |||
$soapVersion = SOAP_1_1 |
|||
) |
Add a SOAP operation to an operation element.
DOMElement | $operation | An operation XML_Tree_Node returned by addBindingOperation |
string | $soapAction | SOAP Action |
int | $soapVersion | SOAP version: SOAP_1_1 or SOAP_1_2, default: SOAP_1_1 |
addType | ( | $type, | |
$wsdlType | |||
) |
Add a complex type name that is part of this WSDL and can be used in signatures.
string | $type | |
string | $wsdlType |
addTypes | ( | DOMNode | $types | ) |
Add WSDL Types element.
DOMDocument | DOMNode | DOMElement | DOMDocumentFragment | $types | A DOMDocument|DOMNode|DOMElement|DOMDocumentFragment with all the XML Schema types defined in it |
|
protected |
Convert associative array to attributes of given node.
Optionally uses sanitizeAttributeValueByName.
DOMNode | $node | |
array | $attributes | |
bool | $withSanitizer |
dump | ( | $filename = false | ) |
Echo the WSDL as XML.
bool | $filename |
getClassMap | ( | ) |
Get the class map of php to wsdl mappings.
getComplexTypeStrategy | ( | ) |
Get the current complex type strategy.
|
protected |
Get the wsdl XML document with all namespaces and required attributes.
string | $uri | |
string | $name |
getSchema | ( | ) |
Return the Schema node of the WSDL.
|
protected |
Return soap namespace uri according to $soapVersion.
int | $soapVersion | SOAP_1_1 or SOAP_1_2 constants |
Exception\InvalidArgumentException |
getTargetNamespace | ( | ) |
Retrieve target namespace of the WSDL document.
getType | ( | $type | ) |
Returns an XSD Type for the given PHP type.
string | $type | PHP Type to get the XSD type for |
getTypes | ( | ) |
Return an array of all currently included complex types.
getUri | ( | ) |
Return WSDL uri.
|
protected |
Parse an xsd:element represented as an array into a DOMElement.
array | $element | an xsd:element represented as an array |
Exception\RuntimeException | if $element is not an array |
|
protected |
Prepare attribute value for specific attributes.
string | $name | |
mixed | $value |
sanitizeUri | ( | $uri | ) |
Function for sanitizing uri.
string | Uri | $uri |
Exception\InvalidArgumentException |
|
protected |
Set attribute to given node.
DOMNode | $node | |
string | $attributeName | |
mixed | $attributeValue |
|
protected |
Set attribute to given node using sanitizeAttributeValueByName.
DOMNode | $node | |
string | $attributeName | |
mixed | $attributeValue |
setClassMap | ( | array | $classMap | ) |
Set the class map of php to wsdl mappings.
array | $classMap |
setComplexTypeStrategy | ( | ComplexTypeStrategy | $strategy | ) |
Set a strategy for complex type detection and handling.
ComplexTypeStrategy | $strategy |
setUri | ( | $uri | ) |
toDomDocument | ( | ) |
Return DOM Document.
toXML | ( | ) |
Return the WSDL as XML.
translateType | ( | $type | ) |
Translate PHP type into WSDL QName.
string | $type |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Strategy for detection of complex types.
|
protected |
|
protected |
const SOAP_11_NS = 'soap' |
const SOAP_11_NS_URI = 'http://schemas.xmlsoap.org/wsdl/soap/' |
const SOAP_12_NS = 'soap12' |
const SOAP_12_NS_URI = 'http://schemas.xmlsoap.org/wsdl/soap12/' |
const SOAP_ENC_NS = 'soap-enc' |
const SOAP_ENC_URI = 'http://schemas.xmlsoap.org/soap/encoding/' |
const TYPES_NS = 'tns' |
const WSDL_NS = 'wsdl' |
const WSDL_NS_URI = 'http://schemas.xmlsoap.org/wsdl/' |
const XML_NS = 'xmlns' |
#@+ XML Namespace uris and prefixes.
const XML_NS_URI = 'http://www.w3.org/2000/xmlns/' |
const XSD_NS = 'xsd' |
const XSD_NS_URI = 'http://www.w3.org/2001/XMLSchema' |