summaryrefslogtreecommitdiff
path: root/framework/3rdParty
diff options
context:
space:
mode:
authorwei <>2007-02-12 12:46:11 +0000
committerwei <>2007-02-12 12:46:11 +0000
commitfd4b8d9f45d1707035021bc19b8d5bc17ede66ce (patch)
tree093b8b3f92d4d6421f19a6d1e7c8211817f3d51d /framework/3rdParty
parentf4c525abc3d4d3f3eecf1019770936e4ca39fd62 (diff)
Add IBM DB2 driver for active record.
Diffstat (limited to 'framework/3rdParty')
-rw-r--r--framework/3rdParty/WsdlGen/WsdlMessage.php14
-rw-r--r--framework/3rdParty/WsdlGen/WsdlOperation.php38
2 files changed, 26 insertions, 26 deletions
diff --git a/framework/3rdParty/WsdlGen/WsdlMessage.php b/framework/3rdParty/WsdlGen/WsdlMessage.php
index 164d81f1..2ba2cef6 100644
--- a/framework/3rdParty/WsdlGen/WsdlMessage.php
+++ b/framework/3rdParty/WsdlGen/WsdlMessage.php
@@ -30,13 +30,13 @@ class WsdlMessage
* @var string
*/
private $name;
-
+
/**
* Represents the parameters for this message
* @var array
*/
private $parts;
-
+
/**
* Creates a new message
* @param string $messageName The name of the message
@@ -46,9 +46,9 @@ class WsdlMessage
{
$this->name = $messageName;
$this->parts = $parts;
-
+
}
-
+
/**
* Gets the name of this message
* @return string The name
@@ -57,7 +57,7 @@ class WsdlMessage
{
return $this->name;
}
-
+
/**
* Return the message as a DOM element
* @param DOMDocument $wsdl The wsdl document the messages will be children of
@@ -66,7 +66,7 @@ class WsdlMessage
{
$message = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:message');
$message->setAttribute('name', $this->name);
-
+
foreach ($this->parts as $part) {
if (isset($part['name'])) {
$partElement = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:part');
@@ -75,7 +75,7 @@ class WsdlMessage
$message->appendChild($partElement);
}
}
-
+
return $message;
}
}
diff --git a/framework/3rdParty/WsdlGen/WsdlOperation.php b/framework/3rdParty/WsdlGen/WsdlOperation.php
index 58690a23..75e21308 100644
--- a/framework/3rdParty/WsdlGen/WsdlOperation.php
+++ b/framework/3rdParty/WsdlGen/WsdlOperation.php
@@ -29,38 +29,38 @@ class WsdlOperation
* The name of the operation
*/
private $operationName;
-
+
/**
* Documentation for the operation
*/
private $documentation;
-
+
/**
* The input wsdl message
*/
private $inputMessage;
-
+
/**
* The output wsdl message
*/
private $outputMessage;
-
+
public function __construct($name, $doc='')
{
$this->operationName = $name;
$this->documentation = $doc;
}
-
+
public function setInputMessage(WsdlMessage $msg)
{
$this->inputMessage = $msg;
}
-
+
public function setOutputMessage(WsdlMessage $msg)
{
$this->outputMessage = $msg;
}
-
+
/**
* Sets the message elements for this operation into the wsdl document
* @param DOMElement $wsdl The parent domelement for the messages
@@ -68,14 +68,14 @@ class WsdlOperation
*/
public function setMessageElements(DOMElement $wsdl, DOMDocument $dom)
{
-
+
$input = $this->inputMessage->getMessageElement($dom);
$output = $this->outputMessage->getMessageElement($dom);
-
+
$wsdl->appendChild($input);
$wsdl->appendChild($output);
}
-
+
/**
* Get the port operations for this operation
* @param DomDocument $dom The dom document to create the messages as children of
@@ -85,20 +85,20 @@ class WsdlOperation
{
$operation = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:operation');
$operation->setAttribute('name', $this->operationName);
-
+
$documentation = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:documentation', htmlentities($this->documentation));
$input = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:input');
$input->setAttribute('message', 'tns:'.$this->inputMessage->getName());
$output = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:output');
$output->setAttribute('message', 'tns:'.$this->outputMessage->getName());
-
+
$operation->appendChild($documentation);
$operation->appendChild($input);
$operation->appendChild($output);
-
+
return $operation;
}
-
+
/**
* Build the binding operations.
* TODO: Still quite incomplete with all the things being stuck in, I don't understand
@@ -111,26 +111,26 @@ class WsdlOperation
{
$operation = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:operation');
$operation->setAttribute('name', $this->operationName);
-
+
$soapOperation = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/soap/', 'soap:operation');
$method = $this->operationName;
$soapOperation->setAttribute('soapAction', $namespace.'#'.$method);
$soapOperation->setAttribute('style', $style);
-
+
$input = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:input');
$output = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/', 'wsdl:output');
-
+
$soapBody = $dom->createElementNS('http://schemas.xmlsoap.org/wsdl/soap/', 'soap:body');
$soapBody->setAttribute('use', 'encoded');
$soapBody->setAttribute('namespace', $namespace);
$soapBody->setAttribute('encodingStyle', 'http://schemas.xmlsoap.org/soap/encoding/');
$input->appendChild($soapBody);
$output->appendChild(clone $soapBody);
-
+
$operation->appendChild($soapOperation);
$operation->appendChild($input);
$operation->appendChild($output);
-
+
return $operation;
}
}