Soap/Wsdl.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Soap  
Version
$Id$  

\Zend_Soap_Wsdl

Package: Zend_Soap
Zend_Soap_Wsdl
Category
Zend  

Properties

>VPropertyprivateobject $_dom

DomDocument Instance

Details
Type
object
>VPropertyprivatearray $_includedTypes = array()
Types defined on schema
Default valuearray()Details
Type
array
>VPropertyprivate\DOMElement $_schema = null
Default valuenullDetails
Type
\DOMElement
>VPropertyprotected$_strategy = null
Strategy for detection of complex types
Default valuenullDetails
Type
n/a
>VPropertyprivatestring $_uri

URI where the WSDL will be available

Details
Type
string
>VPropertyprivateobject $_wsdl

WSDL Root XML_Tree_Node

Details
Type
object

Methods

methodpublic__construct(string $name, string $uri, boolean | string | \Zend_Soap_Wsdl_Strategy_Interface $strategy = true) : void

Constructor

Parameters
NameTypeDescription
$namestring

Name of the Web Service being Described

$uristring

URI where the WSDL will be available

$strategyboolean | string | \Zend_Soap_Wsdl_Strategy_Interface
methodprivate_parseElement(array $element) : \DOMElement

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

Parameters
NameTypeDescription
$elementarray

an xsd:element represented as an array

Returns
TypeDescription
\DOMElementparsed element
methodpublicaddBinding(string $name,  $portType) : object

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

Parameters
NameTypeDescription
$namestring

Name of the Binding

$portType
Returns
TypeDescription
objectThe new binding's XML_Tree_Node for use with {@link function addBindingOperation} and {@link function addDocumentation}
methodpublicaddBindingOperation(object $binding,  $name, array $input = false, array $output = false, array $fault = false) : object

Add an operation to a binding element

Parameters
NameTypeDescription
$bindingobject

A binding XML_Tree_Node returned by {@link function addBinding}

$name
$inputarray

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}

$outputarray

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}

$faultarray

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
TypeDescription
objectThe new Operation's XML_Tree_Node for use with {@link function addSoapOperation} and {@link function addDocumentation}
methodpublicaddComplexType(string $type) : string

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

Parameters
NameTypeDescription
$typestring

Name of the class to be specified

Returns
TypeDescription
stringXSD Type for the given PHP type
methodpublicaddDocumentation(object $input_node, string $documentation) : \DOMElement

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
NameTypeDescription
$input_nodeobject

An XML_Tree_Node returned by another method to add the documentation to

$documentationstring

Human readable documentation for the node

Returns
TypeDescription
\DOMElementThe documentation element
methodpublicaddElement(array $element) : string

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:
Parameters
NameTypeDescription
$elementarray

an xsd:element represented as an array

Returns
TypeDescription
stringxsd:element for the given element array
methodpublicaddMessage(string $name, array $parts) : object

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

Parameters
NameTypeDescription
$namestring

Name for the {@link http://www.w3.org/TR/wsdl#_messages message}

$partsarray

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
TypeDescription
objectThe new message's XML_Tree_Node for use in {@link function addDocumentation}
methodpublicaddPortOperation(object $portType, string $name, string $input = false, string $output = false, string $fault = false) : object

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

Parameters
NameTypeDescription
$portTypeobject

a portType XML_Tree_Node, from {@link function addPortType}

$namestring

Operation name

$inputstring

Input Message

$outputstring

Output Message

$faultstring

Fault Message

Returns
TypeDescription
objectThe new operation's XML_Tree_Node for use in {@link function addDocumentation}
methodpublicaddPortType(string $name) : object

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

Parameters
NameTypeDescription
$namestring

portType element's name

Returns
TypeDescription
objectThe new portType's XML_Tree_Node for use in {@link function addPortOperation} and {@link function addDocumentation}
methodpublicaddSchemaTypeSection() : \Zend_Soap_Wsdl

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

Returns
TypeDescription
\Zend_Soap_Wsdl
methodpublicaddService(string $name, string $port_name, string $binding, string $location) : object

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

Parameters
NameTypeDescription
$namestring

Service Name

$port_namestring

Name of the port for the service

$bindingstring

Binding for the port

$locationstring

SOAP Address for the service

Returns
TypeDescription
objectThe new service's XML_Tree_Node for use with {@link function addDocumentation}
methodpublicaddSoapBinding(object $binding, string $style = 'document', string $transport = 'http://schemas.xmlsoap.org/soap/http') : boolean

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

Parameters
NameTypeDescription
$bindingobject

A binding XML_Tree_Node returned by {@link function addBinding}

$stylestring

binding style, possible values are "rpc" (the default) and "document"

$transportstring

Transport method (defaults to HTTP)

Returns
TypeDescription
boolean
methodpublicaddSoapOperation( $binding, string $soap_action) : boolean

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

Parameters
NameTypeDescription
$binding
$soap_actionstring

SOAP Action

Returns
TypeDescription
boolean
methodpublicaddType(string $type) : \Zend_Soap_Wsdl

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

Parameters
NameTypeDescription
$typestring
Returns
TypeDescription
\Zend_Soap_Wsdl
methodpublicaddTypes(object $types) : void

Add WSDL Types element

Parameters
NameTypeDescription
$typesobject

A DomDocument|DomNode|DomElement|DomDocumentFragment with all the XML Schema types defined in it

methodpublicdump( $filename = false) : boolean

Echo the WSDL as XML

Parameters
NameTypeDescription
$filename
Returns
TypeDescription
boolean
methodpublicgetComplexTypeStrategy() : \Zend_Soap_Wsdl_Strategy_Interface

Get the current complex type strategy

methodpublicgetSchema() : \DOMElement

Return the Schema node of the WSDL

Returns
TypeDescription
\DOMElement
methodpublicgetType(string $type) : string

Returns an XSD Type for the given PHP type

Parameters
NameTypeDescription
$typestring

PHP Type to get the XSD type for

Returns
TypeDescription
string
methodpublicgetTypes() : array

Return an array of all currently included complex types

Returns
TypeDescription
array
methodpublicsetComplexTypeStrategy(boolean | string | \Zend_Soap_Wsdl_Strategy_Interface $strategy) : \Zend_Soap_Wsdl

Set a strategy for complex type detection and handling

Parameters
NameTypeDescription
$strategyboolean | string | \Zend_Soap_Wsdl_Strategy_Interface
Returns
TypeDescription
\Zend_Soap_Wsdl
Details
Todo
Boolean is for backwards compability with extractComplexType object var. Remove it in later versions.  
methodpublicsetUri(string | \Zend_Uri_Http $uri) : \Zend_Server_Wsdl

Set a new uri for this WSDL

Parameters
NameTypeDescription
$uristring | \Zend_Uri_Http
Returns
TypeDescription
\Zend_Server_Wsdl
methodpublictoDomDocument() : object

Return DOM Document

Returns
TypeDescription
objectDomDocum ent
methodpublictoXML() : string

Return the WSDL as XML

Returns
TypeDescription
stringWSDL as XML
Documentation was generated by phpDocumentor 2.2.0 .