diff options
author | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
commit | c82d349f864e6bd9f96fd1156903bc1f7193a203 (patch) | |
tree | e117a87533656110b6acd56fc0ca64289892a9f5 /fs_selfservice/java/biz/freeside/SelfService.java | |
parent | 74e058c8a010ef6feb539248a550d0bb169c1e94 (diff) |
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'fs_selfservice/java/biz/freeside/SelfService.java')
-rwxr-xr-x | fs_selfservice/java/biz/freeside/SelfService.java | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/fs_selfservice/java/biz/freeside/SelfService.java b/fs_selfservice/java/biz/freeside/SelfService.java deleted file mode 100755 index 752815a02..000000000 --- a/fs_selfservice/java/biz/freeside/SelfService.java +++ /dev/null @@ -1,52 +0,0 @@ -package biz.freeside; - -// see http://ws.apache.org/xmlrpc/client.html for these classes -import org.apache.xmlrpc.XmlRpcException; -import org.apache.xmlrpc.client.XmlRpcClient; -import org.apache.xmlrpc.client.XmlRpcClientConfig; -import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; - -import java.util.HashMap; -import java.util.List; -import java.net.URL; - -public class SelfService extends XmlRpcClient { - - public SelfService( String url ) throws Exception { - super(); - XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); - config.setServerURL(new URL( url )); - this.setConfig(config); - } - - private String canonicalMethod ( String method ) { - String canonical = new String(method); - if (!canonical.startsWith( "FS.SelfService.XMLRPC." )) { - canonical = "FS.SelfService.XMLRPC." + canonical; - } - return canonical; - } - - private HashMap testResponse ( Object toTest ) throws XmlRpcException { - if (! ( toTest instanceof HashMap )) { - throw new XmlRpcException("expected HashMap but got" + toTest.getClass()); - } - return (HashMap) toTest; - } - - public HashMap execute( String method, List params ) throws XmlRpcException { - return testResponse(super.execute( canonicalMethod(method), params )); - } - - public HashMap execute( String method, Object[] params ) throws XmlRpcException { - return testResponse(super.execute( canonicalMethod(method), params )); - } - - public HashMap execute( XmlRpcClientConfig config, String method, List params ) throws XmlRpcException { - return testResponse(super.execute( config, canonicalMethod(method), params )); - } - - public HashMap execute( XmlRpcClientConfig config, String method, Object[] params ) throws XmlRpcException { - return testResponse(super.execute( config, canonicalMethod(method), params )); - } -} |