XML-RPC example current time
Created: 2011-08-11 11:43:55
Last updated: 2011-08-11 11:43:56
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
|  |
Titles (1)
|  |
XML-RPC example current time |
Descriptions (1)
|  |
Using Apache ws-xmlrpc from Beanshell scripts to call time.xmlrpc.com - see http://www.xmlrpc.com/currentTime
To use, download the JARs from http://ws.apache.org/xmlrpc/download.html (ie. http://apache.mirror.anlx.net//ws/xmlrpc/apache-xmlrpc-current-bin.zip ) - unzip and put into Taverna's home directory lib/ folder. Right-click on the Beanshell script and check the "Dependencies" tab to check that all JARs have been ticked off (minimum required: ws-common-util.jar, xmlrpc-client.jar and xmlrpc-common.jar.
For changing which XML RPC method to use, edit the beanshell script, supplying extra input or output ports as needed. See http://ws.apache.org/xmlrpc/client.html for documentation on the ws-xmlrpc API.
Note as Taverna's Beanshell script can only return 'simple' types like strings and integers, you might ave to use toString() metods for the beanshell output ports.
|
Dependencies (3)
|  |
xmlrpc-client-3.1.3.jar |
xmlrpc-common-3.1.3.jar |
ws-commons-util-1.0.2.jar |
Inputs (0)
|  |
Processors (1)
|  |
Name |
Type |
Description |
xmlrpc_currentTime |
beanshell |
Scriptimport org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(new URL("http://time.xmlrpc.com/RPC2"));
XmlRpcClient client = new XmlRpcClient();
client.setConfig(config);
Object[] params = new Object[]{
// Empty parameters
//new Integer(33), new Integer(9)
};
date = client.execute("currentTime.getCurrentTime", params);
result = date.toString();
|
Beanshells (1)
|  |
Name |
Description |
Inputs |
Outputs |
xmlrpc_currentTime |
|
|
result
|
Outputs (1)
|  |
Datalinks (1)
|  |
Source |
Sink |
xmlrpc_currentTime:result |
time |
Coordinations (0)
|  |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (1)
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Citations (0)Version History
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
No comments yet
Log in to make a comment