= ZOO Services HowTos = ZOO Services are quiet easy to create once you have install ZOO Kernel and that you have chosen a code to turn into a ZOO service. Here are some !HelloWorlds in Python, PHP, Java and !JavaScript with link to the correpondant .zcfg files. = Python = {{{ #!python import sys def HelloPy(conf,inputs,outputs): outputs["Result"]["value"]="Hello "+inputs["a"]["value"]+" from Python World !" return 3 }}} [browser:trunk/zoo-services/hello-py/cgi-env/HelloPy.zcfg Link to HelloPy.zcfg] = PHP = {{{ #!php }}} [browser:trunk/zoo-services/hello-php/cgi-env/HelloPHP.zcfg Link to HelloPHP.zcfg] = Java = {{{ #!java import java.util.*; public class HelloJava { public static int HelloWorldJava(HashMap conf,HashMap inputs, HashMap outputs) { HashMap hm1 = new HashMap(); hm1.put("dataType","string"); HashMap tmp=(HashMap)(inputs.get("S")); java.lang.String v=tmp.get("value").toString(); hm1.put("value","Hello "+v+" from JAVA WOrld !"); outputs.put("Result",hm1); System.err.println("Hello from JAVA WOrld !"); return 3; } } }}} [browser:trunk/zoo-services/hello-java/cgi-env/HelloWorldJava.zcfg Link to HelloJava.zcfg] = Javascript = {{{ function hellojs(conf,inputs,outputs){ outputs=new Array(); outputs[0]={}; outputs[0]["result"]["value"]="Hello "+inputs[0]["S"]["value"]+" from JS World !"; return Array(3,outputs); } }}} [browser:trunk/zoo-services/hello-js/cgi-env/hellojs.zcfg Link to Hellojs.zcfg]