slaws Fri Feb 16 18:55:29 2007 UTC
Modified files: (Branch: AVOCET)
/pecl/sdo/SCA SCA_CommentReader.php SCA.php
Log:
Fix up rest.rpc proxy support
http://cvs.php.net/viewvc.cgi/pecl/sdo/SCA/SCA_CommentReader.php?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: pecl/sdo/SCA/SCA_CommentReader.php
diff -u pecl/sdo/SCA/SCA_CommentReader.php:1.3.2.3
pecl/sdo/SCA/SCA_CommentReader.php:1.3.2.4
--- pecl/sdo/SCA/SCA_CommentReader.php:1.3.2.3 Fri Feb 16 16:39:23 2007
+++ pecl/sdo/SCA/SCA_CommentReader.php Fri Feb 16 18:55:29 2007
@@ -23,7 +23,7 @@
| Caroline Maynard, |
| Simon Laws |
+-----------------------------------------------------------------------------+
-$Id: SCA_CommentReader.php,v 1.3.2.3 2007/02/16 16:39:23 slaws Exp $
+$Id: SCA_CommentReader.php,v 1.3.2.4 2007/02/16 18:55:29 slaws Exp $
*/
require "SCA/SCA_AnnotationRules.php";
@@ -411,7 +411,7 @@
$reference_type->setBindingType("restresource");
} else if ($this->_hasAnnotation(self::REST_RPC_BINDING)) {
$binding =
$this->_getSingleWordFollowing(self::REST_RPC_BINDING);
- $reference_type->setBindingType("resprpc");
+ $reference_type->setBindingType("restrpc");
} else if ($this->_hasAnnotation(self::ATOM_BINDING)) {
$binding = $this->_getSingleWordFollowing(self::ATOM_BINDING);
$reference_type->setBindingType("atom");
http://cvs.php.net/viewvc.cgi/pecl/sdo/SCA/SCA.php?r1=1.2.4.8&r2=1.2.4.9&diff_format=u
Index: pecl/sdo/SCA/SCA.php
diff -u pecl/sdo/SCA/SCA.php:1.2.4.8 pecl/sdo/SCA/SCA.php:1.2.4.9
--- pecl/sdo/SCA/SCA.php:1.2.4.8 Fri Feb 16 16:23:34 2007
+++ pecl/sdo/SCA/SCA.php Fri Feb 16 18:55:29 2007
@@ -22,7 +22,7 @@
| Chris Miller. |
| |
+-----------------------------------------------------------------------------+
-$Id: SCA.php,v 1.2.4.8 2007/02/16 16:23:34 slaws Exp $
+$Id: SCA.php,v 1.2.4.9 2007/02/16 18:55:29 slaws Exp $
*/
/**
@@ -78,7 +78,6 @@
require "SCA/SCA_Helper.php" ;
require "SCA/SCA_LogFactory.php" ;
require "SCA/SCA_BindingFactory.php" ;
-//require "SCA/SCA_LocalProxy.php";
/* TODO remove this once the Tuscany binding is converted to
* the pluggable model
@@ -273,39 +272,30 @@
}
}
+
// set up the type in the case where getService has been
// call from a client script and the type has defaulted to null
- if (strstr($target, 'wsdl')) {
- SCA::$logger->log("A SOAP proxy is required for this target.");
- $type = 'ws';
- }
- if (strstr($target, '.smd') || strstr($target,'?smd')) {
- SCA::$logger->log("A JSON-RPC proxy is required for this
target.");
- $type = 'jsonrpc';
- }
- if (strstr($target, '.php')) {
- SCA::$logger->log("A local proxy is required for this
target.");
- $type = 'local';
- }
+ if ($type == null)
+ {
+ if (strstr($target, 'wsdl')) {
+ SCA::$logger->log("A SOAP proxy is required for this
target.");
+ $type = 'ws';
+ } else if (strstr($target, '.smd') || strstr($target,'?smd')) {
+ SCA::$logger->log("A JSON-RPC proxy is required for this
target.");
+ $type = 'jsonrpc';
+ } else if (strstr($target, '.php')) {
+ SCA::$logger->log("A local proxy is required for this
target.");
+ $type = 'local';
+ } else {
+ // type remains null and the error message at the bottom
will
+ // kick in
+ }
+ }
if (isset($type) && $type !== null) {
SCA::$logger->log("A $type proxy is required for target
$target.");
return SCA_Binding_Factory::createProxy($type,$target);
}
-/*
- // special procesing for distinguished file extensions
- if (strstr($target, 'wsdl')) {
- SCA::$logger->log("A SOAP proxy is required for this target.");
- return SCA_Binding_Factory::createProxy('ws',$target);
- }
- if (strstr($target, '.smd') || strstr($target,'?smd')) {
- SCA::$logger->log("A JSON proxy is required for this target.");
- return SCA_Binding_Factory::createProxy('jsonrpc',$target);
- }
- if (strstr($target, '.php')) {
- return new SCA_LocalProxy($target);
- }
-*/
$file = basename($target);
$dir = dirname($target);
|