You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by se...@apache.org on 2008/11/05 14:13:52 UTC

svn commit: r711561 - in /turbine/core/branches/TURBINE_2_3_BRANCH: ./ src/java/org/apache/turbine/modules/screens/ src/java/org/apache/turbine/services/jsonrpc/ src/test/org/apache/turbine/services/jsonrpc/ xdocs/ xdocs/services/

Author: seade
Date: Wed Nov  5 05:13:51 2008
New Revision: 711561

URL: http://svn.apache.org/viewvc?rev=711561&view=rev
Log:
Update json-rpc from org.metaparadigm.jsonrpc to org.jabsorb.
Corrected JSONScreen to set the correct content type and to cater for the response character set.

Modified:
    turbine/core/branches/TURBINE_2_3_BRANCH/pom.xml
    turbine/core/branches/TURBINE_2_3_BRANCH/project.xml
    turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONScreen.java   (contents, props changed)
    turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONSecureScreen.java   (contents, props changed)
    turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JSONProcessor.java   (contents, props changed)
    turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JsonRpcService.java   (contents, props changed)
    turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpc.java   (contents, props changed)
    turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpcService.java   (contents, props changed)
    turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/package.html   (contents, props changed)
    turbine/core/branches/TURBINE_2_3_BRANCH/src/test/org/apache/turbine/services/jsonrpc/JsonrpcServicelTest.java   (contents, props changed)
    turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/changes.xml
    turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/index.xml
    turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/jsonrpc-service.xml

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/pom.xml
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/pom.xml?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/pom.xml (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/pom.xml Wed Nov  5 05:13:51 2008
@@ -39,7 +39,7 @@
   <groupId>org.apache.turbine</groupId>
   <artifactId>turbine</artifactId>
   <name>turbine-2</name>
-  <version>2.3.3-b1</version>
+  <version>2.3.3-RC1</version>
   <description>Turbine is a servlet based framework that allows experienced Java
     developers to quickly build secure web applications. Parts of Turbine
     can also be used independently of the web portion of Turbine as
@@ -516,9 +516,9 @@
 <!--        <configuration/>-->
 <!--      </plugin>-->
       <plugin>
-        <groupId>torque</groupId>
-        <artifactId>maven-torque-plugin</artifactId>
-        <version>3.2</version>
+        <groupId>org.apache.torque</groupId>
+        <artifactId>torque-maven-plugin</artifactId>
+        <version>3.3</version>
         <configuration/>
       </plugin>
       <plugin>
@@ -767,9 +767,9 @@
       <optional>true</optional>
     </dependency>
     <dependency>
-      <groupId>com.metaparadigm</groupId>
-      <artifactId>json-rpc</artifactId>
-      <version>1.0</version>
+      <groupId>org.jabsorb</groupId>
+      <artifactId>jabsorb</artifactId>
+      <version>1.3</version>
       <type>jar</type>
       <scope>compile</scope>
       <optional>true</optional>

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/project.xml
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/project.xml?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/project.xml (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/project.xml Wed Nov  5 05:13:51 2008
@@ -43,7 +43,7 @@
     well. In other words, we strive to make portions of Turbine easily
     available for use in other applications.
   </description>
-  <url>http://turbine.apache.org/turbine/turbine-2.3.3-rc1/index.html</url>
+  <url>http://turbine.apache.org/turbine/turbine-2.3.3-rc1/</url>
   <issueTrackingUrl>http://issues.apache.org/jira/browse/TRB</issueTrackingUrl>
   <siteAddress>people.apache.org</siteAddress>
   <siteDirectory>/www/turbine.apache.org/turbine/development/turbine-2.3/</siteDirectory>
@@ -644,10 +644,20 @@
       </properties>
     </dependency>
     <dependency>
-      <groupId>com.metaparadigm</groupId>
-      <artifactId>json-rpc</artifactId>
-      <version>1.0</version>
-      <url>http://oss.metaparadigm.com/jsonrpc/</url>
+      <groupId>org.jabsorb</groupId>
+      <artifactId>jabsorb</artifactId>
+      <version>1.3</version>
+      <url>http://jabsorb.org/</url>
+      <type>jar</type>
+      <properties>
+      <war.bundle>true</war.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jcl</artifactId>
+      <version>1.0.1</version>
+      <url>http://slf4j.org/</url>
       <type>jar</type>
       <properties>
       <war.bundle>true</war.bundle>

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONScreen.java
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONScreen.java?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONScreen.java (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONScreen.java Wed Nov  5 05:13:51 2008
@@ -1,140 +1,144 @@
-package org.apache.turbine.modules.screens;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.BufferedReader;
-import java.io.PrintWriter;
-import java.io.CharArrayWriter;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.turbine.modules.screens.RawScreen;
-import org.apache.turbine.services.jsonrpc.TurbineJsonRpc;
-import org.apache.turbine.util.RunData;
-
-import com.metaparadigm.jsonrpc.JSONRPCBridge;
-
-/**
- * A Screen class for dealing with JSON-RPC requests.  Typically you would
- * extend this class and override the doOutput() method to use TurbineJsonRpc
- * to register the POJOs that will provide the functions you are making
- * available via JSON-RPC.  Use JSONSecureScreen if you need the user to be
- * logged in prior to executing the functions you provide.
- *
- * <p>Here is an example from a superclass:
- * <code>
- * public void doOutput(RunData data) throws Exception
- * {
- *     User user = data.getUser();
- *
- *     MyJsonFunctions myFunctions = new MyJsonFunctions(user.getName());
- *
- *     // Session specific
- *     TurbineJsonRpc.registerObject(data.getSession(), "myFunctions", myFunctions);
- *
- *     // Global
- *     //TurbineJsonRpc.registerObjectGlobal("testGlobal", testObject);
- *
- *     super.doOutput(data);
- * }
- * </code>
- * 
- * <p>The class MyFunctions would be something like:
- * <code>
- * public class MyJsonFunctions
- * {
- *     private String getHello(String clientParameter)
- *     {
- *         return "Hello " + clientParameter;
- *     }
- * }
- * </code>
- *
- * <p>This code is derived from the com.metaparadigm.jsonrpc.JSONRPCServlet
- *
- * @author brad@folkens.com
- * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
- * @version $Id$
- */
-public class JSONScreen extends RawScreen
-{
-    protected static final String JSONRPC_CONTENT_TYPE = "text/plain";
-
-    protected final static int BUFFER_SIZE = 4096;
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.turbine.modules.screens.RawScreen#getContentType(org.apache.turbine.util.RunData)
-     */
-    protected String getContentType(RunData data)
-    {
-        return JSONRPC_CONTENT_TYPE;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.turbine.modules.screens.RawScreen#doOutput(org.apache.turbine.util.RunData)
-     */
-    
-    /**
-     * Output the dynamic content.
-     *
-     * @param data The RunData object.
-     */
-    protected void doOutput(RunData data) throws Exception
-    {
-        data.declareDirectResponse();
-        HttpServletRequest request = data.getRequest();
-        
-        //String charset = request.getCharacterEncoding();
-        //if(charset == null)
-        //{
-        //    charset = "UTF-8";
-        //}
-        //BufferedReader in = new BufferedReader(new InputStreamReader(request.getInputStream(), charset));
-        BufferedReader in = new BufferedReader(new InputStreamReader(request.getInputStream()));
-
-        // Read the request
-        CharArrayWriter cdata = new CharArrayWriter();
-        char buf[] = new char[BUFFER_SIZE];
-        int ret;
-        while ((ret = in.read(buf, 0, BUFFER_SIZE)) != -1)
-        {
-            cdata.write(buf, 0, ret);
-        }
-
-        // Find the JSONRPCBridge for this session or create one
-        // if it doesn't exist
-        JSONRPCBridge json_bridge = TurbineJsonRpc.getBridge(data.getSession());
-
-        // Process the request
-        Object json_res = TurbineJsonRpc.processCall(cdata, json_bridge, request);
-
-        PrintWriter out = new PrintWriter(
-                new OutputStreamWriter(data.getResponse().getOutputStream()));
-        out.print(json_res.toString());
-        out.flush();
-        out.close();
-    }
-}
+package org.apache.turbine.modules.screens;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.BufferedReader;
+import java.io.PrintWriter;
+import java.io.CharArrayWriter;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.turbine.modules.screens.RawScreen;
+import org.apache.turbine.services.jsonrpc.TurbineJsonRpc;
+import org.apache.turbine.util.RunData;
+
+import org.jabsorb.JSONRPCBridge;
+
+/**
+ * A Screen class for dealing with JSON-RPC requests.  Typically you would
+ * extend this class and override the doOutput() method to use TurbineJsonRpc
+ * to register the POJOs that will provide the functions you are making
+ * available via JSON-RPC.  Use JSONSecureScreen if you need the user to be
+ * logged in prior to executing the functions you provide.
+ *
+ * <p>Here is an example from a superclass:
+ * <code>
+ * public void doOutput(RunData data) throws Exception
+ * {
+ *     User user = data.getUser();
+ *
+ *     MyJsonFunctions myFunctions = new MyJsonFunctions(user.getName());
+ *
+ *     // Session specific
+ *     TurbineJsonRpc.registerObject(data.getSession(), "myFunctions", myFunctions);
+ *
+ *     // Global
+ *     //TurbineJsonRpc.registerObjectGlobal("testGlobal", testObject);
+ *
+ *     super.doOutput(data);
+ * }
+ * </code>
+ * 
+ * <p>The class MyFunctions would be something like:
+ * <code>
+ * public class MyJsonFunctions
+ * {
+ *     private String getHello(String clientParameter)
+ *     {
+ *         return "Hello " + clientParameter;
+ *     }
+ * }
+ * </code>
+ *
+ * <p>This code is derived from the org.jabsorb.JSONRPCServlet
+ *
+ * @author brad@folkens.com
+ * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
+ * @version $Id$
+ */
+public class JSONScreen extends RawScreen
+{
+    /**
+     * Depending on your needs you may want to suffix this with the characterset
+     * thus: "application/json;charset=utf-8"
+     */
+    protected static final String JSONRPC_CONTENT_TYPE = "application/json";
+
+    protected final static int BUFFER_SIZE = 4096;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.turbine.modules.screens.RawScreen#getContentType(org.apache.turbine.util.RunData)
+     */
+    protected String getContentType(RunData data)
+    {
+        return JSONRPC_CONTENT_TYPE;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.turbine.modules.screens.RawScreen#doOutput(org.apache.turbine.util.RunData)
+     */
+    
+    /**
+     * Output the dynamic content.
+     *
+     * @param data The RunData object.
+     */
+    protected void doOutput(RunData data) throws Exception
+    {
+        data.declareDirectResponse();
+        HttpServletRequest request = data.getRequest();
+        
+        String charset = request.getCharacterEncoding();
+        if(charset == null)
+        {
+            charset = data.getCharSet();
+        }
+        BufferedReader in = new BufferedReader(
+                new InputStreamReader(request.getInputStream(), charset));
+
+        // Read the request
+        CharArrayWriter cdata = new CharArrayWriter();
+        char buf[] = new char[BUFFER_SIZE];
+        int ret;
+        while ((ret = in.read(buf, 0, BUFFER_SIZE)) != -1)
+        {
+            cdata.write(buf, 0, ret);
+        }
+
+        // Find the JSONRPCBridge for this session or create one
+        // if it doesn't exist
+        JSONRPCBridge json_bridge = TurbineJsonRpc.getBridge(data.getSession());
+
+        // Process the request
+        Object json_res = TurbineJsonRpc.processCall(cdata, json_bridge, request);
+
+        PrintWriter out = new PrintWriter(
+                new OutputStreamWriter(data.getResponse().getOutputStream(), charset));
+        out.print(json_res.toString());
+        out.flush();
+        out.close();
+    }
+}

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONScreen.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONScreen.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONSecureScreen.java
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONSecureScreen.java?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONSecureScreen.java (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONSecureScreen.java Wed Nov  5 05:13:51 2008
@@ -1,104 +1,104 @@
-package org.apache.turbine.modules.screens;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.turbine.modules.screens.JSONScreen;
-import org.apache.turbine.util.RunData;
-
-/**
- * An extension to JSONScreen that performs a Security Check before invoking
- * doBuildTemplate().  You should extend this class and add the specific
- * security check needed.  If you have a number of screens that need to perform
- * the same check, you could make a base screen by extending this class and
- * implementing the isAuthorized().  Then each screen that needs to perform the
- * same check could extend your base screen.
- * 
- * <p>Typically you would extend this class and override the doOutput() method
- * to use TurbineJsonRpc to register the POJOs that will provide the functions
- * you are making available via JSON-RPC.  Use JSONScreen if you <p>do not</b>
- * need the user to be logged in prior to executing the functions you provide.
- *
- * <p>Here is an example from a superclass:
- * <code>
- * public void doOutput(RunData data) throws Exception
- * {
- *     User user = data.getUser();
- *
- *     MySecureJsonFunctions myFunctions
- *             = new MySecureJsonFunctions(user.getName());
- *
- *     // Session specific
- *     TurbineJsonRpc.registerObject(data.getSession(), "myFunctions", myFunctions);
- *
- *     // Global
- *     //TurbineJsonRpc.registerObjectGlobal("testGlobal", testObject);
- *
- *     super.doOutput(data);
- * }
- * </code>
- * 
- * <p>The class MyFunctions would be something like:
- * <code>
- * public class MySecureJsonFunctions
- * {
- *     private final String name;
- *
- *     public MySecureJsonFunctions(String name)
- *     {
- *         this.name = name;
- *     }
- *
- *     private String getName(String clientParameter)
- *     {
- *         return "Client " + clientParameter + " says Hello World to " + name;
- *     }
- * }
- * </code>
- *
- * @author <a href="mailto:seade@policypoint.net">Scott Eade</a>
- * @version $Id$
- */
-public abstract class JSONSecureScreen extends JSONScreen
-{
-    /**
-     * This method overrides the method in JSONScreen to perform a security
-     * check prior to producing the output.
-     *
-     * @param data Turbine information.
-     * @exception Exception, a generic exception.
-     */
-    protected void doOutput(RunData data) throws Exception
-    {
-        if (isAuthorized(data))
-        {
-            super.doOutput(data);
-        }
-    }
-
-    /**
-     * Override this method to perform the necessary security checks.
-     *
-     * @param data Turbine information.
-     * @return <code>true</code> if the user is authorized to access the screen.
-     * @exception Exception A generic exception.
-     */
-    protected abstract boolean isAuthorized(RunData data)
-            throws Exception;
-}
+package org.apache.turbine.modules.screens;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.turbine.modules.screens.JSONScreen;
+import org.apache.turbine.util.RunData;
+
+/**
+ * An extension to JSONScreen that performs a Security Check before invoking
+ * doBuildTemplate().  You should extend this class and add the specific
+ * security check needed.  If you have a number of screens that need to perform
+ * the same check, you could make a base screen by extending this class and
+ * implementing the isAuthorized().  Then each screen that needs to perform the
+ * same check could extend your base screen.
+ * 
+ * <p>Typically you would extend this class and override the doOutput() method
+ * to use TurbineJsonRpc to register the POJOs that will provide the functions
+ * you are making available via JSON-RPC.  Use JSONScreen if you <p>do not</b>
+ * need the user to be logged in prior to executing the functions you provide.
+ *
+ * <p>Here is an example from a superclass:
+ * <code>
+ * public void doOutput(RunData data) throws Exception
+ * {
+ *     User user = data.getUser();
+ *
+ *     MySecureJsonFunctions myFunctions
+ *             = new MySecureJsonFunctions(user.getName());
+ *
+ *     // Session specific
+ *     TurbineJsonRpc.registerObject(data.getSession(), "myFunctions", myFunctions);
+ *
+ *     // Global
+ *     //TurbineJsonRpc.registerObjectGlobal("testGlobal", testObject);
+ *
+ *     super.doOutput(data);
+ * }
+ * </code>
+ * 
+ * <p>The class MyFunctions would be something like:
+ * <code>
+ * public class MySecureJsonFunctions
+ * {
+ *     private final String name;
+ *
+ *     public MySecureJsonFunctions(String name)
+ *     {
+ *         this.name = name;
+ *     }
+ *
+ *     private String getName(String clientParameter)
+ *     {
+ *         return "Client " + clientParameter + " says Hello World to " + name;
+ *     }
+ * }
+ * </code>
+ *
+ * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
+ * @version $Id$
+ */
+public abstract class JSONSecureScreen extends JSONScreen
+{
+    /**
+     * This method overrides the method in JSONScreen to perform a security
+     * check prior to producing the output.
+     *
+     * @param data Turbine information.
+     * @exception Exception, a generic exception.
+     */
+    protected void doOutput(RunData data) throws Exception
+    {
+        if (isAuthorized(data))
+        {
+            super.doOutput(data);
+        }
+    }
+
+    /**
+     * Override this method to perform the necessary security checks.
+     *
+     * @param data Turbine information.
+     * @return <code>true</code> if the user is authorized to access the screen.
+     * @exception Exception A generic exception.
+     */
+    protected abstract boolean isAuthorized(RunData data)
+            throws Exception;
+}

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONSecureScreen.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/modules/screens/JSONSecureScreen.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JSONProcessor.java
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JSONProcessor.java?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JSONProcessor.java (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JSONProcessor.java Wed Nov  5 05:13:51 2008
@@ -1,60 +1,90 @@
-package org.apache.turbine.services.jsonrpc;
-
-import java.io.CharArrayWriter;
-import java.text.ParseException;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.json.JSONArray;
-import org.json.JSONObject;
-
-import com.metaparadigm.jsonrpc.JSONRPCBridge;
-import com.metaparadigm.jsonrpc.JSONRPCResult;
-
-public class JSONProcessor
-{
-    /** Log. */
-    private static Log log = LogFactory.getLog(JSONProcessor.class);
-
-    public static Object processCall(CharArrayWriter cdata, JSONRPCBridge json_bridge, HttpServletRequest request)
-    {
-        // Process the request
-        JSONObject json_req = null;
-        Object json_res = null;
-        try
-        {
-            json_req = new JSONObject(cdata.toString());
-            if (log.isDebugEnabled())
-            {
-                String methodName = (String) json_req.getString("method");
-                JSONArray arguments = json_req.getJSONArray("params");
-                
-                // If this a CallableReference it will have a non-zero objectID
-                int object_id = json_req.optInt("objectID");
-                StringBuffer sb = new StringBuffer(".doprocessCall(): call ");
-                if (object_id != 0)
-                {
-                    sb.append("objectID=").append(object_id).append(" ");
-                }
-                sb.append(methodName).append("(").append(arguments).append(")");
-                log.debug(sb.toString());
-            }
-            //json_res = json_bridge.call(new Object[] {request}, object_id, methodName, arguments);
-            json_res = json_bridge.call(new Object[] {request}, json_req);
-        }
-        catch (ParseException e)
-        {
-            log.error(".processCall(): can't parse call: " + cdata, e);
-            json_res = JSONRPCResult.MSG_ERR_PARSE;
-        }
-        // Write the response
-        if (log.isDebugEnabled())
-        {
-            log.debug(".processCall():  returns " + json_res.toString());
-        }
-        return json_res;
-    }
-
-}
+package org.apache.turbine.services.jsonrpc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.CharArrayWriter;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.json.JSONException;
+
+import org.jabsorb.JSONRPCBridge;
+import org.jabsorb.JSONRPCResult;
+
+/**
+ * JSON call processor.
+ *
+ * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
+ * @version $Id$
+ */
+public class JSONProcessor
+{
+    /** Log. */
+    private static Log log = LogFactory.getLog(JSONProcessor.class);
+
+    public static Object processCall(CharArrayWriter cdata, JSONRPCBridge json_bridge, HttpServletRequest request)
+    {
+        // Process the request
+        String requestString = cdata.toString();
+        if (log.isDebugEnabled())
+        {
+            log.debug(".processCall() - requestString: " + requestString);
+        }
+        JSONObject json_req = null;
+        Object json_res = null;
+        try
+        {
+            json_req = new JSONObject(requestString);
+            if (log.isDebugEnabled())
+            {
+                String methodName = (String) json_req.getString("method");
+                JSONArray arguments = json_req.getJSONArray("params");
+                
+                // A CallableReference it will have a non-zero objectID
+                int object_id = json_req.optInt("objectID");
+                StringBuffer sb = new StringBuffer(".doprocessCall(): call ");
+                if (object_id != 0)
+                {
+                    sb.append("objectID=").append(object_id).append(" ");
+                }
+                sb.append(methodName).append("(").append(arguments).append(")");
+                log.debug(sb.toString());
+            }
+            //json_res = json_bridge.call(new Object[] {request}, object_id, methodName, arguments);
+            json_res = json_bridge.call(new Object[] {request}, json_req);
+        }
+        catch (JSONException e)
+        {
+            log.error(".processCall() - can't parse call: " + requestString, e);
+            json_res = JSONRPCResult.MSG_ERR_PARSE;
+        }
+        // Write the response
+        if (log.isDebugEnabled())
+        {
+            log.debug(".processCall() - returning: " + json_res.toString());
+        }
+        return json_res;
+    }
+
+}

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JSONProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JSONProcessor.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JsonRpcService.java
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JsonRpcService.java?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JsonRpcService.java (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JsonRpcService.java Wed Nov  5 05:13:51 2008
@@ -1,53 +1,53 @@
-package org.apache.turbine.services.jsonrpc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.CharArrayWriter;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.apache.turbine.services.Service;
-
-import com.metaparadigm.jsonrpc.JSONRPCBridge;
-
-/**
- * The interface an JsonRpcService implements.
- *
- * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
- * @version $Id$
- */
-public interface JsonRpcService
-        extends Service
-{
-    /** TurbineJsonRpcService. */
-    public static final String SERVICE_NAME = "JsonRpcService";
-
-    public Object processCall(CharArrayWriter cdata,
-            JSONRPCBridge json_bridge, HttpServletRequest request);
-
-    public void registerObject(HttpSession session, String key, Object value);
-
-    public void registerObjectGlobal(String key, Object value);
-
-    public JSONRPCBridge getBridge(HttpSession session);
-
-    public void clearBridge(HttpSession session);
-}
+package org.apache.turbine.services.jsonrpc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.CharArrayWriter;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.apache.turbine.services.Service;
+
+import org.jabsorb.JSONRPCBridge;
+
+/**
+ * The interface an JsonRpcService implements.
+ *
+ * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
+ * @version $Id$
+ */
+public interface JsonRpcService
+        extends Service
+{
+    /** TurbineJsonRpcService. */
+    public static final String SERVICE_NAME = "JsonRpcService";
+
+    public Object processCall(CharArrayWriter cdata,
+            JSONRPCBridge json_bridge, HttpServletRequest request);
+
+    public void registerObject(HttpSession session, String key, Object value);
+
+    public void registerObjectGlobal(String key, Object value);
+
+    public JSONRPCBridge getBridge(HttpSession session);
+
+    public void clearBridge(HttpSession session);
+}

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JsonRpcService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/JsonRpcService.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpc.java
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpc.java?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpc.java (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpc.java Wed Nov  5 05:13:51 2008
@@ -1,75 +1,75 @@
-package org.apache.turbine.services.jsonrpc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.CharArrayWriter;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.apache.turbine.services.TurbineServices;
-
-import com.metaparadigm.jsonrpc.JSONRPCBridge;
-
-/**
- * This is a static accessor class for {@link JsonRpcService}.
- *
- * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
- * @version $Id$
- */
-public abstract class TurbineJsonRpc
-{
-    /**
-     * Returns system's configured implementation of {@link JsonRpcService}.
-     *
-     * @return an implementation of <code>JsonRpcService</code>
-     */
-    public static JsonRpcService getService()
-    {
-        return (JsonRpcService) TurbineServices.getInstance()
-                .getService(JsonRpcService.SERVICE_NAME);
-    }
-
-    public static Object processCall(CharArrayWriter cdata, 
-            JSONRPCBridge json_bridge, HttpServletRequest request)
-    {
-        return getService().processCall(cdata, json_bridge, request);
-    }
-
-    public static void registerObject(HttpSession session, String key, Object value)
-    {
-        getService().registerObject(session, key, value);
-    }
-
-    public static void registerObjectGlobal(String key, Object value)
-    {
-        getService().registerObjectGlobal(key, value);
-    }
-
-    public static JSONRPCBridge getBridge(HttpSession session)
-    {
-        return getService().getBridge(session);
-    }
-
-    public static void clearBridge(HttpSession session)
-    {
-        getService().clearBridge(session);
-    }
-}
+package org.apache.turbine.services.jsonrpc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.CharArrayWriter;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.apache.turbine.services.TurbineServices;
+
+import org.jabsorb.JSONRPCBridge;
+
+/**
+ * This is a static accessor class for {@link JsonRpcService}.
+ *
+ * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
+ * @version $Id$
+ */
+public abstract class TurbineJsonRpc
+{
+    /**
+     * Returns system's configured implementation of {@link JsonRpcService}.
+     *
+     * @return an implementation of <code>JsonRpcService</code>
+     */
+    public static JsonRpcService getService()
+    {
+        return (JsonRpcService) TurbineServices.getInstance()
+                .getService(JsonRpcService.SERVICE_NAME);
+    }
+
+    public static Object processCall(CharArrayWriter cdata, 
+            JSONRPCBridge json_bridge, HttpServletRequest request)
+    {
+        return getService().processCall(cdata, json_bridge, request);
+    }
+
+    public static void registerObject(HttpSession session, String key, Object value)
+    {
+        getService().registerObject(session, key, value);
+    }
+
+    public static void registerObjectGlobal(String key, Object value)
+    {
+        getService().registerObjectGlobal(key, value);
+    }
+
+    public static JSONRPCBridge getBridge(HttpSession session)
+    {
+        return getService().getBridge(session);
+    }
+
+    public static void clearBridge(HttpSession session)
+    {
+        getService().clearBridge(session);
+    }
+}

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpc.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpc.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpcService.java
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpcService.java?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpcService.java (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpcService.java Wed Nov  5 05:13:51 2008
@@ -1,109 +1,109 @@
-package org.apache.turbine.services.jsonrpc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.CharArrayWriter;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.turbine.services.TurbineBaseService;
-
-import com.metaparadigm.jsonrpc.JSONRPCBridge;
-
-/**
- * This is a service that will respond to JSON-RPC calls.
- *
- * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
- * @version $Id$
- */
-public class TurbineJsonRpcService
-        extends TurbineBaseService
-        implements JsonRpcService
-{
-    /** Log. */
-    private static Log log = LogFactory.getLog(TurbineJsonRpcService.class);
-
-    /** The key used to store the bridge in the session. */
-    public static final String JSON_BRIDGE_KEY = "JSONRPCBridge";
-    /**
-     * The debug option for the bridge can be enabled by enabling debug level
-     * logging for this class.
-     */
-    private static final boolean DEBUG = log.isDebugEnabled();
-
-    public Object processCall(CharArrayWriter cdata,
-            JSONRPCBridge json_bridge, HttpServletRequest request)
-    {
-        return JSONProcessor.processCall(cdata, json_bridge, request);
-    }
-
-    public void registerObjectGlobal(String key, Object value)
-    {
-        JSONRPCBridge.getGlobalBridge().setDebug(DEBUG);
-        JSONRPCBridge.getGlobalBridge().registerObject(key, value);
-    }
-
-    public void registerObject(HttpSession session, String key, Object value)
-    {
-        JSONRPCBridge json_bridge = getBridge(session);
-        json_bridge.setDebug(DEBUG);
-        json_bridge.registerObject(key, value);
-    }
-
-    public JSONRPCBridge getBridge(HttpSession session)
-    {
-        JSONRPCBridge json_bridge = (JSONRPCBridge) session.getAttribute(JSON_BRIDGE_KEY);
-        if (json_bridge == null)
-        {
-            json_bridge = new JSONRPCBridge();
-            session.setAttribute(JSON_BRIDGE_KEY, json_bridge);
-        }
-        return json_bridge;
-    }
-
-    public void clearBridge(HttpSession session)
-    {
-        session.removeAttribute(JSON_BRIDGE_KEY);
-    }
-
-// The following is modeled on XmlRpcSercice. 
-//    /**
-//     * Initialize the JsonRpcService.
-//     *
-//     * @throws InitializationException Something went wrong in the init stage.
-//     */
-//    public void init() throws InitializationException
-//    {
-//        //Configuration conf = getConfiguration();
-//        setInit(true);
-//    }
-//
-//    /**
-//     * Shuts down this service, stopping running threads.
-//     */
-//    public void shutdown()
-//    {
-//        setInit(false);
-//    }
-
-}
+package org.apache.turbine.services.jsonrpc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.CharArrayWriter;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.turbine.services.TurbineBaseService;
+
+import org.jabsorb.JSONRPCBridge;
+
+/**
+ * This is a service that will respond to JSON-RPC calls.
+ *
+ * @author <a href="mailto:seade@backstagetech.com.au">Scott Eade</a>
+ * @version $Id$
+ */
+public class TurbineJsonRpcService
+        extends TurbineBaseService
+        implements JsonRpcService
+{
+    /** Log. */
+    private static Log log = LogFactory.getLog(TurbineJsonRpcService.class);
+
+    /** The key used to store the bridge in the session. */
+    public static final String JSON_BRIDGE_KEY = "JSONRPCBridge";
+    /**
+     * The debug option for the bridge can be enabled by enabling debug level
+     * logging for this class.
+     */
+    private static final boolean DEBUG = log.isDebugEnabled();
+
+    public Object processCall(CharArrayWriter cdata,
+            JSONRPCBridge json_bridge, HttpServletRequest request)
+    {
+        return JSONProcessor.processCall(cdata, json_bridge, request);
+    }
+
+    public void registerObjectGlobal(String key, Object value)
+    {
+        JSONRPCBridge.getGlobalBridge().setDebug(DEBUG);
+        JSONRPCBridge.getGlobalBridge().registerObject(key, value);
+    }
+
+    public void registerObject(HttpSession session, String key, Object value)
+    {
+        JSONRPCBridge json_bridge = getBridge(session);
+        json_bridge.setDebug(DEBUG);
+        json_bridge.registerObject(key, value);
+    }
+
+    public JSONRPCBridge getBridge(HttpSession session)
+    {
+        JSONRPCBridge json_bridge = (JSONRPCBridge) session.getAttribute(JSON_BRIDGE_KEY);
+        if (json_bridge == null)
+        {
+            json_bridge = new JSONRPCBridge();
+            session.setAttribute(JSON_BRIDGE_KEY, json_bridge);
+        }
+        return json_bridge;
+    }
+
+    public void clearBridge(HttpSession session)
+    {
+        session.removeAttribute(JSON_BRIDGE_KEY);
+    }
+
+// The following is modeled on XmlRpcSercice. 
+//    /**
+//     * Initialize the JsonRpcService.
+//     *
+//     * @throws InitializationException Something went wrong in the init stage.
+//     */
+//    public void init() throws InitializationException
+//    {
+//        //Configuration conf = getConfiguration();
+//        setInit(true);
+//    }
+//
+//    /**
+//     * Shuts down this service, stopping running threads.
+//     */
+//    public void shutdown()
+//    {
+//        setInit(false);
+//    }
+
+}

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpcService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/TurbineJsonRpcService.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/package.html
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/package.html?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/package.html (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/package.html Wed Nov  5 05:13:51 2008
@@ -1,29 +1,29 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<html>
-<head>
-<!-- head part is ignored -->
-</head>
-
-<body>
-The JSON-RPC Service supports JavaScript to Java AJAX communications between
-browsers and Turbine applications.<br />
-<font size="-2">$Id$</font>
-</body>
-</html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<html>
+<head>
+<!-- head part is ignored -->
+</head>
+
+<body>
+The JSON-RPC Service supports JavaScript to Java AJAX communications between
+browsers and Turbine applications.<br />
+<font size="-2">$Id$</font>
+</body>
+</html>

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/java/org/apache/turbine/services/jsonrpc/package.html
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/src/test/org/apache/turbine/services/jsonrpc/JsonrpcServicelTest.java
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/src/test/org/apache/turbine/services/jsonrpc/JsonrpcServicelTest.java?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/src/test/org/apache/turbine/services/jsonrpc/JsonrpcServicelTest.java (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/src/test/org/apache/turbine/services/jsonrpc/JsonrpcServicelTest.java Wed Nov  5 05:13:51 2008
@@ -1,50 +1,50 @@
-package org.apache.turbine.services.jsonrpc;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.turbine.test.BaseTurbineTest;
-
-import com.metaparadigm.jsonrpc.JSONRPCBridge;
-
-
-public class JsonrpcServicelTest
-        extends BaseTurbineTest
-{
-    public JsonrpcServicelTest(String name)
-            throws Exception
-    {
-        super(name, "conf/test/TurbineResources.properties");
-    }
-
-    public static Test suite()
-    {
-        return new TestSuite(JsonrpcServicelTest.class);
-    }
-
-    public void testBridgeAccess()
-    {
-        JSONRPCBridge bridge = new JSONRPCBridge();
-        assertNotNull(bridge);
-    }
-
-}
+package org.apache.turbine.services.jsonrpc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.turbine.test.BaseTurbineTest;
+
+import org.jabsorb.JSONRPCBridge;
+
+
+public class JsonrpcServicelTest
+        extends BaseTurbineTest
+{
+    public JsonrpcServicelTest(String name)
+            throws Exception
+    {
+        super(name, "conf/test/TurbineResources.properties");
+    }
+
+    public static Test suite()
+    {
+        return new TestSuite(JsonrpcServicelTest.class);
+    }
+
+    public void testBridgeAccess()
+    {
+        JSONRPCBridge bridge = new JSONRPCBridge();
+        assertNotNull(bridge);
+    }
+
+}

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/test/org/apache/turbine/services/jsonrpc/JsonrpcServicelTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: turbine/core/branches/TURBINE_2_3_BRANCH/src/test/org/apache/turbine/services/jsonrpc/JsonrpcServicelTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/changes.xml?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/changes.xml (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/changes.xml Wed Nov  5 05:13:51 2008
@@ -29,6 +29,16 @@
 <body>
   <release version="2.3.3" date="in SVN">
     <action type="fix" dev="seade">
+      Corrected JSONScreen to set the correct content type and to cater for
+      the response character set.
+    </action>
+    <action type="update" dev="seade">
+      Updated the JSON-RPC Service from
+      <a href="http://oss.metaparadigm.com/jsonrpc/">JSON-RPC-Java</a> to its
+      replacement, <a href="http://jabsorb.org">jabsorb</a>.  Applications
+      should update the related JavaScript files.
+    </action>
+    <action type="fix" dev="seade">
       Minor correction to intake.dtd - added missing fieldClass attribute
       to field element.
     </action>

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/index.xml
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/index.xml?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/index.xml (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/index.xml Wed Nov  5 05:13:51 2008
@@ -115,7 +115,7 @@
 <a href="jsonrpc-service.html">JSON-RPC Service</a>
 <br/>
 The JSON-RPC Service supports JavaScript to Java AJAX communications using
-<a href="http://oss.metaparadigm.com/jsonrpc/">JSON-RPC-Java</a>.
+<a href="http://jabsorb.org/">jabsorb</a>.
 </li>
 
 <li>

Modified: turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/jsonrpc-service.xml
URL: http://svn.apache.org/viewvc/turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/jsonrpc-service.xml?rev=711561&r1=711560&r2=711561&view=diff
==============================================================================
--- turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/jsonrpc-service.xml (original)
+++ turbine/core/branches/TURBINE_2_3_BRANCH/xdocs/services/jsonrpc-service.xml Wed Nov  5 05:13:51 2008
@@ -32,7 +32,7 @@
 
 <p>
 The JSON-RPC Service supports JavaScript to Java AJAX communications using
-<a href="http://oss.metaparadigm.com/jsonrpc/">JSON-RPC-Java</a>.
+<a href="http://jabsorb.org/">jabsorb</a>.
 </p>
 
 </section>
@@ -152,8 +152,7 @@
 
 <p>
 In these pages you also need to include the JavaScript necessary to process the
-JSON calls - this file is available as part of the JSON-RPC-Java distribution
-(it is included in the <code>webapps\jaonrpc</code> directory):
+JSON calls - this file is available as part of the jabsorb distribution:
 </p>
 
 <source><![CDATA[