Lapps Service Framework for Wrapping Lisp software.
- Download:
- Compile:
- mvn clean package jetty:run
- Then do not close this command.
- Open WSDL:
- Open http://localhost:4040/sparser/services
- Test WSDL in soupui: http://localhost:4040/sparser/services/SparserWS?wsdl
- Test it Online:
- Deploy:
- Run maven package: mvn clean package
- copy the target/sparser-${version}.war into $TOMCAT_HOME/webapps
- Remote Access:
- We have echo function in echo.lisp and echo.clj (under src/main/resources/), which will be called by ABCL and Clojure.
- Another way to call lisp through new shell script, in this case, we have caller.sh and caller.groovy (under src/main/resources) can be used.
ABCL seems not well enough, maybe the best way is to invoke the lisp through a bash/groovy script.
/** abcl **/
Map res = LispCaller.call(LispCaller.LispType.ABCL, LIFJson.getResourceFile("echo.lisp"), null, "echo", s);
/** clojure **/
Map res = LispCaller.call(LispCaller.LispType.Clojure, LIFJson.getResourceFile("echo.clj"), null, "echo", s);
/** clojure **/
Map res = LispCaller.call(LispCaller.LispType.Bash, null, null, null, s);
/** groovy **/
Map res = LispCaller.call(LispCaller.LispType.Groovy, null, null, null, s);
The return is Map<String, Object>, which will have all the information needed. The output will be :
return res.get(LispCaller.Result_Name_Output).toString();
Other things in the return map includes:
public static final String Result_Name_Tool = "input.tool";
public static final String Result_Name_Lisp = "input.lisp";
public static final String Result_Name_Params = "input.params";
public static final String Result_Name_NS = "input.namespace";
public static final String Result_Name_Method = "input.method";
public static final String Result_Name_Output = "result.output";
public static final String Result_Name_Error = "result.error";
public static final String Result_Name_ReturnCode = "result.retcode";
public static final String Result_Name_Watch = "result.watch";