Changeset 1124
- Timestamp:
- 12/06/07 20:01:11 (9 months ago)
- Files:
-
- trunk/config/xml/json-rpc-service.xml (modified) (1 diff)
- trunk/examples/config/xml/json-rpc-service.xml (modified) (1 diff)
- trunk/src/main/php/net/stubbles/service/jsonrpc/stubJsonRpcProcessor.php (modified) (4 diffs)
- trunk/src/main/resources/xjconf/json-rpc-service.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/config/xml/json-rpc-service.xml
r689 r1124 4 4 xmlns="http://stubbles.net/service/json-rpc"> 5 5 <service-url>${jsonrpc.service.url}</service-url> 6 <use-firebug>true</use-firebug>7 6 <services> 8 7 <service name="MathService" className="net.stubbles.examples.service.MathService"/> trunk/examples/config/xml/json-rpc-service.xml
r598 r1124 4 4 xmlns="http://stubbles.net/service/json-rpc"> 5 5 <service-url>http://localhost/?processor=jsonrpc</service-url> 6 <use-firebug>true</use-firebug>7 6 <services> 8 7 <service name="MathService" className="net.stubbles.examples.service.MathService"/> trunk/src/main/php/net/stubbles/service/jsonrpc/stubJsonRpcProcessor.php
r1007 r1124 9 9 * @subpackage service_jsonrpc 10 10 */ 11 stubClassLoader::load('net.stubbles.websites.processors.stubAbstractProcessor', 12 'net.stubbles.util.validators.stubRegexValidator', 13 'net.stubbles.util.validators.stubPassThruValidator', 11 stubClassLoader::load('net.stubbles.ioc.stubBinder', 12 'net.stubbles.lang.stubMode', 14 13 'net.stubbles.reflection.reflection', 15 14 'net.stubbles.service.annotations.stubWebMethodAnnotation', 16 15 'net.stubbles.service.jsonrpc.stubJsonRpcResponse', 17 'net.stubbles.ioc.stubBinder' 16 'net.stubbles.util.validators.stubPassThruValidator', 17 'net.stubbles.util.validators.stubRegexValidator', 18 'net.stubbles.websites.processors.stubAbstractProcessor' 18 19 ); 19 20 /** … … 137 138 $xjconf->parse($serviceConfigFile); 138 139 $this->classMap = $xjconf->getConfigValue('services'); 139 $this->serviceConfig['use-firebug'] = $xjconf->getConfigValue('use-firebug'); 140 141 $cacheData = array( 142 'classMap' => $this->classMap, 143 'serviceConfig' => $this->serviceConfig 144 ); 140 $cacheData = array('classMap' => $this->classMap, 141 'serviceConfig' => $this->serviceConfig 142 ); 145 143 file_put_contents($cacheFile, serialize($cacheData)); 146 144 } … … 170 168 $this->response->write($generator->generateJavascriptProxy($serviceConfig['className'], $jsClass)); 171 169 } catch (Exception $e) { 172 if ( true === $this->serviceConfig['use-firebug']) {170 if (stubMode::$CURRENT->name() !== 'PROD') { 173 171 $this->response->write("console.error('Generation of proxy for {$serviceConfig['className']} failed.');\n"); 174 172 $this->response->write($this->convertStringToFirebug($e->__toString())); … … 198 196 $this->response->write($generator->generateSmd($classInfo['className'], $class)); 199 197 } catch (Exception $e) { 200 if ( true === $this->serviceConfig['use-firebug']) {198 if (stubMode::$CURRENT->name() !== 'PROD') { 201 199 $this->response->write("console.error('Generation of SMD for {$classInfo['className']} failed.');\n"); 202 200 $this->response->write($this->convertStringToFirebug($e->__toString())); trunk/src/main/resources/xjconf/json-rpc-service.xml
r588 r1124 4 4 <tag name="services" type="array" /> 5 5 <tag name="service-url" type="string" /> 6 <tag name="use-firebug" type="boolean" />7 6 <tag name="service" type="array" keyAttribute="name"> 8 7 <attribute name="name" type="string" required="true"/>
