de.folt.webservices
Class OpenTMSWebServiceClient

java.lang.Object
  extended by de.folt.webservices.OpenTMSWebServiceClient

public class OpenTMSWebServiceClient
extends java.lang.Object

Implementation des Clients der einen WebService anspricht.

Author:
Klemens Waldhör

Field Summary
static boolean bWithServer
           
static java.lang.String helpString
           
static OpenTMSWebServiceInterface openTMSService
           
static OpenTMSWebServiceServer server
           
static OpenTMSWebService service
           
static boolean syncmode
           
static java.lang.String url
           
 
Constructor Summary
OpenTMSWebServiceClient()
           
 
Method Summary
static void main(java.lang.String[] args)
          Test Client for openTMS Webservice.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

syncmode

public static boolean syncmode

server

public static OpenTMSWebServiceServer server

bWithServer

public static boolean bWithServer

url

public static java.lang.String url

service

public static OpenTMSWebService service

openTMSService

public static OpenTMSWebServiceInterface openTMSService

helpString

public static java.lang.String helpString
Constructor Detail

OpenTMSWebServiceClient

public OpenTMSWebServiceClient()
Method Detail

main

public static void main(java.lang.String[] args)
Test Client for openTMS Webservice.
Parameters are supplied as key value pairs: - ...
-f <filename> or -file <filename> - file with key value pairs
-withServer true/false - start webservice if true - default = true
-url url of the webservice (if not specified default is used = "http://localhost:8082")
-test test1 / test2 / test3 / test4 call various test procedures
-json / -json[0-99] jsonstring supply a web service method as a json string
-script / -script[0-99] <scriptfilename> supply a script containing lines of json strings with web service methods
-param value - supply various params for the webservice (note that the - will be removed from the key for the web service calls)
Example of a script file (* can be used for comment lines):
 * test query method of synchronize call
 *
 * query list of shared memories available for the given user
 {"method":"query","user-id":"klemens","password":"blabla"}
 *
 * query details for a specific shared memory
 {"method":"query","user-id":"klemens","password":"blabla","name":"mysqlsynctest"}
 
Example of a json parameter from command line
 java -cp  "%JARS%" -Xmx1000M de.folt.webservices.OpenTMSWebServiceClient -url http://localhost:8090 -withServer false -json "{\"method\":\"query\",\"user-id\":\"klemens\",\"password\":\"blabla\"}" -json0 "{\"method\":\"query\",\"user-id\":\"klemens\",\"password\":\"blabla\",\"name\":\"mysqlsynctest\"}" > webserviceclient.log 2>&1
 

Parameters:
args -