summaryrefslogtreecommitdiff
path: root/framework/3rdParty/WsdlGen/Wsdl.php
diff options
context:
space:
mode:
authorwei <>2007-01-12 05:53:43 +0000
committerwei <>2007-01-12 05:53:43 +0000
commitf7ca8c7ac8718899c1ab36513aaf3853a4514816 (patch)
tree3eae66f3578b84bc68c489538fd832b3f424ad05 /framework/3rdParty/WsdlGen/Wsdl.php
parent34d24de2f004df6ab096f4165eb31e16e70e76bb (diff)
Fixed a number of SOAP bugs.
Diffstat (limited to 'framework/3rdParty/WsdlGen/Wsdl.php')
-rw-r--r--framework/3rdParty/WsdlGen/Wsdl.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/framework/3rdParty/WsdlGen/Wsdl.php b/framework/3rdParty/WsdlGen/Wsdl.php
index 4b94fbb4..1c754200 100644
--- a/framework/3rdParty/WsdlGen/Wsdl.php
+++ b/framework/3rdParty/WsdlGen/Wsdl.php
@@ -105,6 +105,7 @@ class Wsdl
xmlns:tns="'.$this->targetNamespace.'"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"></definitions>';
$dom = new DOMDocument();
@@ -128,7 +129,7 @@ class Wsdl
public function addTypes(DomDocument $dom)
{
if (!count($this->types)) return;
- $types = $dom->createElement('types');
+ $types = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:types');
$schema = $dom->createElementNS('http://www.w3.org/2001/XMLSchema', 'xsd:schema');
$schema->setAttribute('targetNamespace', $this->targetNamespace);
foreach($this->types as $type => $elements)
@@ -139,10 +140,10 @@ class Wsdl
{
$complexContent = $dom->createElementNS('http://www.w3.org/2001/XMLSchema', 'xsd:complexContent');
$restriction = $dom->createElementNS('http://www.w3.org/2001/XMLSchema', 'xsd:restriction');
- $restriction->setAttribute('base', 'SOAP-ENC:Array');
+ $restriction->setAttribute('base', 'soap-enc:Array');
$attribute = $dom->createElementNS('http://www.w3.org/2001/XMLSchema', 'xsd:attribute');
- $attribute->setAttribute('ref', "SOAP-ENC:arrayType");
- $attribute->setAttribute('arrayType', 'tns:' . substr($type, 0, strlen($type) - 5) . '[]');
+ $attribute->setAttribute('ref', "soap-enc:arrayType");
+ $attribute->setAttribute('wsdl:arrayType', 'tns:' . substr($type, 0, strlen($type) - 5) . '[]');
$restriction->appendChild($attribute);
$complexContent->appendChild($restriction);
$complexType->appendChild($complexContent);
@@ -183,7 +184,7 @@ class Wsdl
*/
protected function addPortTypes(DOMDocument $dom)
{
- $portType = $dom->createElement('portType');
+ $portType = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:portType');
$portType->setAttribute('name', $this->serviceName.'PortType');
$this->definitions->appendChild($portType);
@@ -199,7 +200,7 @@ class Wsdl
*/
protected function addBindings(DOMDocument $dom)
{
- $binding = $dom->createElement('binding');
+ $binding = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:binding');
$binding->setAttribute('name', $this->serviceName.'Binding');
$binding->setAttribute('type', 'tns:'.$this->serviceName.'PortType');
@@ -222,10 +223,10 @@ class Wsdl
*/
protected function addService(DomDocument $dom)
{
- $service = $dom->createElement('service');
+ $service = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:service');
$service->setAttribute('name', $this->serviceName.'Service');
- $port = $dom->createElement('port');
+ $port = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:port');
$port->setAttribute('name', $this->serviceName.'Port');
$port->setAttribute('binding', 'tns:'.$this->serviceName.'Binding');