Differences

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

Link to this comparison view

Next revision
Previous revision
example_websvc [2016/09/22 02:35]
127.0.0.1 external edit
— (current)
Line 1: Line 1:
-package demo.websvc; 
  
-/** 
- 
-   * This is an example of custom websvc dataset.  Just compile it, package it in a jar file, copy it to /lib folder and 
-   * restart server.  It returns the following xml: 
-   * <pre> 
-     <demo.websvc.MyWebSvc> 
-      <MyWebSvc> 
-      <!RequestURI> 
-      /MbtSvr/app=websvc&action=stat&components=Scxml,demo.websvc.MyWebSvc 
-      </RequestURI> 
-    <SysParams> 
-    {MODEL=!VendingMachineJava1, SVRMGR=http://laptop:8000, CURSVR=http://Laptop:8888, EMAIL=lin@to.com, EDITION=Enterprise} 
-    </SysParams> 
-    <WebSvcList> 
-    [Scxml] 
-    </WebSvcList> 
-    </MyWebSvc> 
-    </demo.websvc.MyWebSvc> 
-    </pre> 
-   * @author yxl01 
-   * 
-   */ 
- 
-public class MyWebSvc { 
- 
-     public static String getXML(String requestURI, 
-                                 java.util.HashMap<String, String> sysParams, 
-                                 java.util.HashMap<String, String> websvcList) { 
-        return "<MyWebSvc><RequestURI><![CDATA[" + requestURI + "]]></RequestURI>" 
-               + "<SysParams>" + sysParams.toString() + "</SysParams>" 
-       + "<WebSvcList>" + websvcList.keySet().toString() +"</WebSvcList>" 
-               + "</MyWebSvc>"; 
-        } 
- 
-}