This is an old revision of the document!


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,

  1. package the java class into a jar file
  2. copy the jar file to /lib folder
  3. restart TestOptimal server

To involve this websvc, use the same url described in 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 to help you write your own websvc dataset.