summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-05-07 20:19:51 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-05-07 20:19:51 +0000
commitbd75c092f327be047fbc039839fba7a90767509e (patch)
tree16496d2829be15dc75c1aa5cba6b9b07023491f3
parentbd993957aea0b60eb1e21a4f2d4fee05b381d2ea (diff)
Use Base64 class from commons-codec instead of forbidden internal JRE class (TUSCANY-3549)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@942202 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--sca-java-1.x/trunk/modules/binding-jsonrpc-runtime/pom.xml5
-rw-r--r--sca-java-1.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java5
2 files changed, 8 insertions, 2 deletions
diff --git a/sca-java-1.x/trunk/modules/binding-jsonrpc-runtime/pom.xml b/sca-java-1.x/trunk/modules/binding-jsonrpc-runtime/pom.xml
index aa10dbf0c6..a53babda8a 100644
--- a/sca-java-1.x/trunk/modules/binding-jsonrpc-runtime/pom.xml
+++ b/sca-java-1.x/trunk/modules/binding-jsonrpc-runtime/pom.xml
@@ -102,6 +102,11 @@
</exclusions>
</dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.3</version>
+ </dependency>
<!-- Test Dependencies -->
<dependency>
diff --git a/sca-java-1.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java b/sca-java-1.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java
index bdfdeb8392..61998b6c08 100644
--- a/sca-java-1.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java
+++ b/sca-java-1.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java
@@ -50,7 +50,7 @@ import com.metaparadigm.jsonrpc.JSONRPCBridge;
import com.metaparadigm.jsonrpc.JSONRPCResult;
import com.metaparadigm.jsonrpc.JSONRPCServlet;
-import com.sun.xml.internal.messaging.saaj.util.Base64;
+import org.apache.commons.codec.binary.Base64;
/**
* Servlet that handles JSON-RPC requests invoking SCA services.
@@ -137,7 +137,8 @@ public class JSONRPCServiceServlet extends JSONRPCServlet {
//parse the GET QueryString
try {
- String params = Base64.base64Decode(URLDecoder.decode(request.getParameter("params"),charset));
+ String reqParams = URLDecoder.decode(request.getParameter("params"),charset);
+ String params = new String(Base64.decodeBase64(reqParams.getBytes()));
StringBuffer sb = new StringBuffer();
sb.append("{");