cvs: pecl(FULMAR) /sdo/SCA/Bindings/soap Mapper.php Wrapper.php

From: Date: Thu, 31 Jan 2008 18:23:52 +0000
Subject: cvs: pecl(FULMAR) /sdo/SCA/Bindings/soap Mapper.php Wrapper.php
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-9648@lists.php.net to get a copy of this message
mfp Thu Jan 31 18:23:52 2008 UTC Modified files: (Branch: FULMAR) /pecl/sdo/SCA/Bindings/soap Mapper.php Wrapper.php Log: Adapt to the fact that the xmldas __toString method is sending things back in a different order. This was found after examining the problem raised by Dali on the google group - see topic "SCA Webservice in WSDL mode" http://cvs.php.net/viewvc.cgi/pecl/sdo/SCA/Bindings/soap/Mapper.php?r1=1.2.4.3&r2=1.2.4.4&diff_format=u Index: pecl/sdo/SCA/Bindings/soap/Mapper.php diff -u pecl/sdo/SCA/Bindings/soap/Mapper.php:1.2.4.3 pecl/sdo/SCA/Bindings/soap/Mapper.php:1.2.4.4 --- pecl/sdo/SCA/Bindings/soap/Mapper.php:1.2.4.3 Thu Nov 29 17:09:49 2007 +++ pecl/sdo/SCA/Bindings/soap/Mapper.php Thu Jan 31 18:23:52 2008 @@ -255,43 +255,29 @@ $str = $this->xmldas->__toString(); $types = array(); $line = strtok($str, self::EOL); - while ($line !== false) { - if (strpos($line, 'RootType') !== false) - break; + $line = strtok(self::EOL); // skip line that says this is an SDO + $line = strtok(self::EOL); // skip line that says nn types have been defined + + while ($line !== false && strpos($line,'commonj.sdo')) { $line = strtok(self::EOL); } - $line = strtok(self::EOL); - - while ($line !== false) { - // format changed recently - namespace and type separated by # - // instead of : - // quick fix to try and deal with either - if (strpos($line,'#') !== false) { - $trimmed_line = trim($line); - $words = explode(' ', $trimmed_line); - if ($words[0] !== '-') break; - $namespace_and_type_in_parens = $words[2]; - $namespace_and_type = substr($namespace_and_type_in_parens, 1, strlen($namespace_and_type_in_parens)-2); - $pos_last_hash = strrpos($namespace_and_type, '#'); - $namespace = substr($namespace_and_type, 0, $pos_last_hash); - $type = substr($namespace_and_type, $pos_last_hash+1); - $types[] = array($namespace, $type); - $line = strtok(self::EOL); - } else { - $trimmed_line = trim($line); - $words = explode(' ', $trimmed_line); - if ($words[0] !== '-') break; - $namespace_and_type_in_parens = $words[2]; - $namespace_and_type = substr($namespace_and_type_in_parens, 1, strlen($namespace_and_type_in_parens)-2); - $pos_last_colon = strrpos($namespace_and_type, ':'); - $namespace = substr($namespace_and_type, 0, $pos_last_colon); - $type = substr($namespace_and_type, $pos_last_colon+1); - $types[] = array($namespace, $type); - $line = strtok(self::EOL); + while ($line !== false && $line != '}') { + $trimmed_line = trim($line); + $words = explode(' ', $trimmed_line); + if ($words[0] == '-') { + $line = strtok(self::EOL); + continue; } + $namespace_and_type = $words[1]; + $pos_last_hash = strrpos($namespace_and_type, '#'); + $namespace = substr($namespace_and_type, 0, $pos_last_hash); + $type = substr($namespace_and_type, $pos_last_hash+1); + if ($type != 'RootType') { + $types[] = array($namespace, $type); + } + $line = strtok(self::EOL); } return $types; - } }/* End instance check */ http://cvs.php.net/viewvc.cgi/pecl/sdo/SCA/Bindings/soap/Wrapper.php?r1=1.3&r2=1.3.4.1&diff_format=u Index: pecl/sdo/SCA/Bindings/soap/Wrapper.php diff -u pecl/sdo/SCA/Bindings/soap/Wrapper.php:1.3 pecl/sdo/SCA/Bindings/soap/Wrapper.php:1.3.4.1 --- pecl/sdo/SCA/Bindings/soap/Wrapper.php:1.3 Fri Jun 22 14:32:38 2007 +++ pecl/sdo/SCA/Bindings/soap/Wrapper.php Thu Jan 31 18:23:52 2008 @@ -45,11 +45,14 @@ { private $instance_of_the_base_class = null ; private $xmldas = null ; + private $class_name = null; public function __construct($class_name, $handler ) { SCA::$logger->log('Entering'); SCA::$logger->log("class name = $class_name"); + + $this->class_name = $class_name; $this->xmldas = $handler->getXmlDas(); $this->instance_of_the_base_class = SCA::createInstance($class_name); @@ -85,7 +88,8 @@ } } - $xdoc = $this->xmldas->createDocument($method_name . "Response"); + $namespace = 'http://' . $this->class_name; + $xdoc = $this->xmldas->createDocument($namespace,$method_name . "Response"); $response_object = $xdoc->getRootDataObject(); $response_object[$method_name."Return"] = is_object($return) ? clone $return

« previous php.pecl.cvs (#9648) next »