Differences

This shows you the differences between two versions of the page.

Link to this comparison view

custom_websvc [2016/09/22 02:35] – external edit 127.0.0.1custom_websvc [2017/12/19 00:35] (current) – removed admin
Line 1: Line 1:
-Besides supported websvc dataset, you may create your own websvc dataset implemented in java. To do so, just create a java class that implements the following method: 
  
-    getXML(String requestURI, java.util.HashHap sysParams, java.util.HashMap websvcList) 
- 
-where 
- 
-  * requestURI - url that invokes this websvc 
-  * sysParams - list of parameters passed by the system to this method, e.g. model name, SvrMgr url, etc. 
-  * websvcList - list of all dataset generated so far for this request. This allows you to build your dataset based on other datasets created before this websvc is called 
- 
-To deploy the custom websvc, 
- 
-  - package the java class into a jar file 
-  - copy the jar file to /lib folder 
-  - restart TestOptimal server 
- 
-To involve this websvc, use the same url described in [[WebSvc Dataset|WebSvc Dataset]] and add your java class path to the **components** parameter, e.g. 
- 
-   [[http://localhost:8888/MbtSvr/app=websvc&action=stat&components=Scxml,demo.websvc.MyWebSvc|http://localhost:8888/MbtSvr/app=websvc&action=stat&components=Scxml,demo.websvc.MyWebSvc]] 
- 
-Here is an [[Example WebSvc|example]] to help you write your own websvc dataset.