Index: /trunk/zoo-api/js/ZOO-api.js
===================================================================
--- /trunk/zoo-api/js/ZOO-api.js	(revision 273)
+++ /trunk/zoo-api/js/ZOO-api.js	(revision 274)
@@ -6067,20 +6067,16 @@
    *          needs to be interpreted.
    */
-  Execute: function(inputs) {
+  Execute: function(inputs,outputs) {
     if (this.identifier == null)
       return null;
-    var body = new XML('<wps:Execute service="WPS" version="1.0.0" xmlns:wps="'+this.namespaces['wps']+'" xmlns:ows="'+this.namespaces['ows']+'" xmlns:xlink="'+this.namespaces['xlink']+'" xmlns:xsi="'+this.namespaces['xsi']+'" xsi:schemaLocation="'+this.schemaLocation+'"><ows:Identifier>'+this.identifier+'</ows:Identifier>'+this.buildDataInputsNode(inputs)+'</wps:Execute>');
+    var body = new XML('<wps:Execute service="WPS" version="1.0.0" xmlns:wps="'+this.namespaces['wps']+'" xmlns:ows="'+this.namespaces['ows']+'" xmlns:xlink="'+this.namespaces['xlink']+'" xmlns:xsi="'+this.namespaces['xsi']+'" xsi:schemaLocation="'+this.schemaLocation+'"><ows:Identifier>'+this.identifier+'</ows:Identifier>'+this.buildDataInputsNode(inputs)+this.buildDataOutputsNode(outputs)+'</wps:Execute>');
     body = body.toXMLString();
     var response = ZOO.Request.Post(this.url,body,['Content-Type: text/xml; charset=UTF-8']);
     return response;
   },
-  /**
-   * Property: buildInput
-   * Object containing methods to build WPS inputs.
-   */
-  buildInput: {
-    /**
-     * Method: buildInput.complex
-     * Given an E4XElement representing the WPS complex data input.
+  buildOutput:{
+    /**
+     * Method: buildOutput.ResponseDocument
+     * Given an E4XElement representing the WPS ResponseDocument output.
      *
      * Parameters:
@@ -6091,7 +6087,43 @@
      * {E4XElement} A WPS Input node.
      */
+    'ResponseDocument': function(identifier,obj) {
+      var output = new XML('<wps:ResponseForm xmlns:wps="'+this.namespaces['wps']+'"><wps:ResponseDocument><wps:Output'+(obj["mimeType"]?' mimeType="'+obj["mimeType"]+'" ':'')+(obj["encoding"]?' encoding="'+obj["encoding"]+'" ':'')+(obj["asReference"]?' asReference="'+obj["asReference"]+'" ':'')+'><ows:Identifier xmlns:ows="'+this.namespaces['ows']+'">'+identifier+'</ows:Identifier></wps:Output></wps:ResponseDocument></wps:ResponseForm>');
+      if (obj.encoding)
+        output.*::Data.*::ComplexData.@encoding = obj.encoding;
+      if (obj.schema)
+        output.*::Data.*::ComplexData.@schema = obj.schema;
+      output = output.toXMLString();
+      return output;
+    },
+    'RawDataOutput': function(identifier,obj) {
+      var output = new XML('<wps:ResponseForm xmlns:wps="'+this.namespaces['wps']+'"><wps:RawDataOutput><wps:Output '+(obj["mimeType"]?' mimeType="'+obj["mimeType"]+'" ':'')+(obj["encoding"]?' encoding="'+obj["encoding"]+'" ':'')+'><ows:Identifier xmlns:ows="'+this.namespaces['ows']+'">'+identifier+'</ows:Identifier></wps:Output></wps:RawDataOutput></wps:ResponseForm>');
+      if (obj.encoding)
+        output.*::Data.*::ComplexData.@encoding = obj.encoding;
+      if (obj.schema)
+        output.*::Data.*::ComplexData.@schema = obj.schema;
+      output = output.toXMLString();
+      return output;
+    }
+
+  },
+  /**
+   * Property: buildInput
+   * Object containing methods to build WPS inputs.
+   */
+  buildInput: {
+    /**
+     * Method: buildInput.complex
+     * Given an E4XElement representing the WPS complex data input.
+     *
+     * Parameters:
+     * identifier - {String} the input indetifier
+     * data - {Object} A WPS complex data input.
+     *
+     * Returns:
+     * {E4XElement} A WPS Input node.
+     */
     'complex': function(identifier,data) {
       var input = new XML('<wps:Input xmlns:wps="'+this.namespaces['wps']+'"><ows:Identifier xmlns:ows="'+this.namespaces['ows']+'">'+identifier+'</ows:Identifier><wps:Data><wps:ComplexData>'+data.value+'</wps:ComplexData></wps:Data></wps:Input>');
-      input.*::Data.*::ComplexData.@mimeType = data.mimetype ? data.mimetype : 'text/plain';
+      input.*::Data.*::ComplexData.@mimeType = data.mimetype ? data.mimetype : 'application/json';
       if (data.encoding)
         input.*::Data.*::ComplexData.@encoding = data.encoding;
@@ -6160,4 +6192,21 @@
     return '<wps:DataInputs xmlns:wps="'+this.namespaces['wps']+'">'+inputsArray.join('\n')+'</wps:DataInputs>';
   },
+
+  buildDataOutputsNode:function(outputs){
+    var data, builder, outputsArray=[];
+    for (var attr in outputs) {
+      data = outputs[attr];
+      builder = this.buildOutput[data.type];
+      /*if (data.mimetype || data.type == 'complex')
+        builder = this.buildInput['complex'];
+      else if (data.type == 'reference' || data.type == 'url')
+        builder = this.buildInput['reference'];
+      else
+      builder = this.buildInput['literal'];*/
+      outputsArray.push(builder.apply(this,[attr,data]));
+    }
+    return outputsArray.join('\n');
+  },
+
   CLASS_NAME: "ZOO.Process"
 });
Index: /trunk/zoo-kernel/configure.ac
===================================================================
--- /trunk/zoo-kernel/configure.ac	(revision 273)
+++ /trunk/zoo-kernel/configure.ac	(revision 274)
@@ -314,18 +314,18 @@
 	JS_FILE=""
 else
+	JS_FILE="service_internal_js.o"
 	if test "$JSHOME" = "yes"
 	then
-        	JS_FILE="service_internal_js.o"
 
 		#on teste si on est sous debian like 
 		if test -f "/usr/bin/dpkg"
 		then
-			if test -n "`dpkg -l | grep libmozjs-dev`"
+			if test -n "`dpkg -l | grep libmozjs185-dev`"
 			then
-				JS_CPPFLAGS="-I/usr/include/mozjs/"
-                        	JS_LDFLAGS="-L/usr/lib -lmozjs -lm"
-                        	JS_LIB="mozjs"
+				JS_CPPFLAGS="-I/usr/include/js/"
+                        	JS_LDFLAGS="-L/usr/lib -lmozjs185 -lm"
+                        	JS_LIB="mozjs185"
 			else 
-				XUL_VERSION="`dpkg -l | grep xulrunner | grep dev | awk '{print $3;}' | sed -e 's/\([[0-9]]\{1,2\}\.[[0-9]]\{1,2\}\.[[0-9]]\{1,2\}\.[[0-9]]\{1,2\}\).*/\1/'`"
+				XUL_VERSION="`dpkg -l | grep xulrunner | grep dev | awk '{print $3;}' | cut -d'+' -f1`"
 				if test -n "$XUL_VERSION"
 				then
@@ -334,14 +334,14 @@
 					JS_LIB="mozjs"
 				else
-					AC_MSG_ERROR([You must install libmozjs-dev or xulrunner-dev ])
+					AC_MSG_ERROR([You must install libmozjs185-dev or xulrunner-dev ])
 				fi
 			fi
 		else
-			AC_MSG_ERROR([You must  specify your custom install of libjs])
+			AC_MSG_ERROR([You must  specify your custom install of libmozjs185])
 		fi
 	else
-		JS_CPPFLAGS="-I$JSHOME/include/"
-                JS_LDFLAGS="-L$JSHOME/lib -lmozjs -lm"
-                JS_LIB="mozjs"
+		JS_CPPFLAGS="-I$JSHOME/include/js/"
+                JS_LDFLAGS="-L$JSHOME/lib -lmozjs185 -lm"
+                JS_LIB="mozjs185"
 
 	fi 
@@ -356,5 +356,5 @@
         LIBS="$JS_LDFLAGS"
 
-        AC_CHECK_LIB([$JS_LIB], [JS_CallFunctionName], [], [AC_MSG_ERROR([could not find $JS_LIB])], [])
+        AC_CHECK_LIB([$JS_LIB], [JS_NewCompartmentAndGlobalObject,JS_CompileFile,JS_CallFunctionName], [], [AC_MSG_ERROR([could not find $JS_LIB])], [])
 			
         AC_SUBST([JS_CPPFLAGS])
@@ -366,3 +366,4 @@
 
 AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([ZOOMakefile.opts])
 AC_OUTPUT
Index: /trunk/zoo-kernel/service_internal.c
===================================================================
--- /trunk/zoo-kernel/service_internal.c	(revision 273)
+++ /trunk/zoo-kernel/service_internal.c	(revision 274)
@@ -258,6 +258,7 @@
 
 JSBool
-JSUpdateStatus(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+JSUpdateStatus(JSContext *cx, uintN argc, jsval *argv1)
 {
+  jsval *argv = JS_ARGV(cx,argv1);
   JS_MaybeGC(cx);
   char *sid;
@@ -280,6 +281,9 @@
   }
   if(getMapFromMaps(conf,"lenv","status")!=NULL){
-    if(status!=NULL)
+    fprintf(stderr,"STATUS RETURNED : %s\n",status);
+    if(status!=NULL){
       setMapInMaps(conf,"lenv","status",status);
+      free(status);
+    }
     else
       setMapInMaps(conf,"lenv","status","15");
Index: /trunk/zoo-kernel/service_internal.h
===================================================================
--- /trunk/zoo-kernel/service_internal.h	(revision 273)
+++ /trunk/zoo-kernel/service_internal.h	(revision 274)
@@ -83,5 +83,5 @@
 #ifdef USE_JS
   char* JSValToChar(JSContext*,jsval*);
-  JSBool JSUpdateStatus(JSContext*,JSObject*,uintN,jsval *,jsval *);
+  JSBool JSUpdateStatus(JSContext*,uintN,jsval *);
 #endif
   
Index: /trunk/zoo-kernel/service_internal_js.c
===================================================================
--- /trunk/zoo-kernel/service_internal_js.c	(revision 273)
+++ /trunk/zoo-kernel/service_internal_js.c	(revision 274)
@@ -27,4 +27,19 @@
 static char dbg[1024];
 
+JSBool
+JSAlert(JSContext *cx, uintN argc, jsval *argv1)
+{
+  jsval *argv = JS_ARGV(cx,argv1);
+  int i=0;
+  JS_MaybeGC(cx);
+  for(i=0;i<argc;i++){
+    JSString* jsmsg = JS_ValueToString(cx,argv[i]);
+    fprintf(stderr,"[ZOO-API:JS] %s\n",JS_EncodeString(cx,jsmsg));
+  }
+  JS_MaybeGC(cx);
+  
+  return JS_TRUE;
+}
+
 int zoo_js_support(maps** main_conf,map* request,service* s,
 		   maps **inputs,maps **outputs)
@@ -57,13 +72,10 @@
     return 1;
   }
-  JS_SetOptions(cx, JSOPTION_VAROBJFIX);
+  JS_SetOptions(cx, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT);
   JS_SetVersion(cx, JSVERSION_LATEST);
   JS_SetErrorReporter(cx, reportError);
 
   /* Create the global object. */
-  global = JS_NewObject(cx, &global_class, NULL, NULL);
-  if (global == NULL){
-    return 1;
-  }
+  global = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL);
 
   /* Populate the global object with the standard globals,
@@ -72,7 +84,10 @@
     return 1;
   }
+
   if (!JS_DefineFunction(cx, global, "ZOORequest", JSRequest, 4, 0))
     return 1;
   if (!JS_DefineFunction(cx, global, "ZOOUpdateStatus", JSUpdateStatus, 2, 0))
+    return 1;
+  if (!JS_DefineFunction(cx, global, "alert", JSAlert, 2, 0))
     return 1;
 
@@ -86,12 +101,16 @@
   char api0[strlen(tmpm1->value)+strlen(ntmp)+15];
   sprintf(api0,"%s/%sZOO-proj4js.js",ntmp,tmpm1->value);
+#ifdef JS_DEBUG
   fprintf(stderr,"Trying to load %s\n",api0);
-  JSScript *api_script1=loadZooApiFile(cx,global,api0);
+#endif
+  JSObject *api_script1=loadZooApiFile(cx,global,api0);
   fflush(stderr);
 
   char api1[strlen(tmpm1->value)+strlen(ntmp)+11];
   sprintf(api1,"%s/%sZOO-api.js",ntmp,tmpm1->value);
+#ifdef JS_DEBUG
   fprintf(stderr,"Trying to load %s\n",api1);
-  JSScript *api_script2=loadZooApiFile(cx,global,api1);
+#endif
+  JSObject *api_script2=loadZooApiFile(cx,global,api1);
   fflush(stderr);
 
@@ -106,5 +125,7 @@
   sprintf(filename,"%s/%s%s",ntmp,tmpm1->value,tmpm2->value);
   filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+1]=0;
+#ifdef JS_DEBUG
   fprintf(stderr,"FILENAME %s\n",filename);
+#endif
   struct stat file_status;
   stat(filename, &file_status);
@@ -112,7 +133,6 @@
   uint16 lineno;
   jsval rval;
-  FILE *jsfile=fopen(filename,"r");
   JSBool ok ;
-  JSScript *script = JS_CompileFileHandle(cx, global, filename,jsfile);
+  JSObject *script = JS_CompileFile(cx, global, filename);
   if(script!=NULL){
     (void)JS_ExecuteScript(cx, global, script, &rval);
@@ -127,5 +147,4 @@
     JS_DestroyRuntime(rt);
     JS_ShutDown();
-    fclose(jsfile);
     exit(-1);
   }
@@ -161,6 +180,8 @@
     if(strlen(dbg)==0)
       sprintf(dbg,"No result was found after the function call");
-    sprintf(tmp1,"Unable to run %s from the JavScript file %s : \n %s",s->name,filename,dbg);
+    sprintf(tmp1,"Unable to run %s from the JavaScript file %s : \n %s",s->name,filename,dbg);
+#ifdef JS_DEBUG
     fprintf(stderr,"%s",tmp1);
+#endif
     map* err=createMap("text",tmp1);
     addToMap(err,"code","NoApplicableCode");
@@ -211,4 +232,5 @@
     jsval tmp2;
     JSBool hasElement=JS_GetProperty(cx,d,"outputs",&tmp2);
+#ifdef JS_DEBUG
     if(!hasElement)
       fprintf(stderr,"No outputs property returned\n");
@@ -217,19 +239,13 @@
     else
       fprintf(stderr,"outputs is not an array as expected\n");
+#endif
     *outputs=mapsFromJSObject(cx,tmp2);
 #ifdef JS_DEBUG
-    dumpMaps(out);
+    dumpMaps(outputs);
 #endif
   }
 
   /* Cleanup. */
-  JS_DestroyScript(cx, script);
-  JS_DestroyScript(cx, api_script1);
-  JS_DestroyScript(cx, api_script2);
-  //JS_MaybeGC(cx);
-  // If we use the DestroyContext as requested to release memory then we get 
-  // issue getting back the main configuration maps after coming back to the 
-  // runRequest function ...
-  //JS_DestroyContext(cx);
+  JS_DestroyContext(cx);
   JS_DestroyRuntime(rt);
   JS_ShutDown();
@@ -240,22 +256,27 @@
 }
 
-JSScript * loadZooApiFile(JSContext *cx,JSObject  *global, char* filename){
+JSObject * loadZooApiFile(JSContext *cx,JSObject  *global, char* filename){
   struct stat api_status;
   int s=stat(filename, &api_status);
   if(s==0){
     jsval rval;
-    FILE *jsfile=fopen(filename,"r");
     JSBool ok ;
-    JSScript *script = JS_CompileFileHandle(cx, global, filename,jsfile);
+    JSObject *script = JS_CompileFile(cx, JS_GetGlobalObject(cx), filename);
     if(script!=NULL){
-      (void)JS_ExecuteScript(cx, global, script, &rval);
+      (void)JS_ExecuteScript(cx, JS_GetGlobalObject(cx), script, &rval);
+#ifdef JS_DEBUG
       fprintf(stderr,"**************\n%s correctly loaded\n**************\n",filename);
+#endif
       return script;
     }
+#ifdef JS_DEBUG
     else
       fprintf(stderr,"\n**************\nUnable to run %s\n**************\n",filename);
-  }
+#endif
+  }
+#ifdef JS_DEBUG
   else
     fprintf(stderr,"\n**************\nUnable to load %s\n**************\n",filename);
+#endif
   return NULL;
 }
@@ -288,5 +309,5 @@
   map* tmpm=t;
   while(tmpm!=NULL){
-    jsval jsstr = STRING_TO_JSVAL(JS_NewString(cx,tmpm->value,strlen(tmpm->value)));
+    jsval jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm->value,strlen(tmpm->value)));
     JS_SetProperty(cx, res, tmpm->name,&jsstr);
 #ifdef JS_DEBUG
@@ -335,4 +356,9 @@
       fprintf(stderr,"Properties length :  %d \n",idp->length);
 #endif
+      tres=(maps*)malloc(MAPS_SIZE);
+      tres->name=NULL;
+      tres->content=NULL;
+      tres->next=NULL;
+
       for (index=0,argNum=idp->length;index<argNum;index++) { 
 	jsval id = idp->vector[index];
@@ -346,11 +372,13 @@
 	len1 = JS_GetStringLength(jsmsg);
 #ifdef JS_DEBUG
-	fprintf(stderr,"Enumerate id : %d => %s\n",oi,JS_GetStringBytes(jsmsg));
+	fprintf(stderr,"Enumerate id : %d => %s\n",oi,JS_EncodeString(cx,jsmsg));
 #endif
 	jsval nvp=JSVAL_NULL;
-	if((JS_GetProperty(cx, JSVAL_TO_OBJECT(tmp1), JS_GetStringBytes(jsmsg), &nvp)==JS_FALSE))
-#ifdef JS_DEBUG
-	fprintf(stderr,"Enumerate id : %d => %s => No more value\n",oi,JS_GetStringBytes(jsmsg));
-#endif
+	if((JS_GetProperty(cx, JSVAL_TO_OBJECT(tmp1), JS_EncodeString(cx,jsmsg), &nvp)==JS_FALSE)){
+#ifdef JS_DEBUG
+	  fprintf(stderr,"Enumerate id : %d => %s => No more value\n",oi,JS_EncodeString(cx,jsmsg));
+#endif
+	}
+	
 	if(JSVAL_IS_OBJECT(nvp)){
 #ifdef JS_DEBUG
@@ -358,32 +386,30 @@
 #endif
 	}
-#ifdef JS_DEBUG
-	else
-	  fprintf(stderr,"JSVAL NVP IS NOT OBJECT !!\n");
-#endif
-	JSObject *nvp1;
+
+	JSObject *nvp1=JSVAL_NULL;
 	JS_ValueToObject(cx,nvp,&nvp1);
 	jsval nvp1j=OBJECT_TO_JSVAL(nvp1);
 	if(JSVAL_IS_OBJECT(nvp1j)){
-#ifdef JS_DEBUG
-	  fprintf(stderr,"JSVAL NVP1J IS OBJECT\n");
-#endif
-	  tres=(maps*)malloc(MAPS_SIZE);
-	  tres->name=strdup(JS_GetStringBytes(jsmsg));
-	  tres->content=mapFromJSObject(cx,nvp1j);
-	  tres->next=NULL;
-#ifdef JS_DEBUG
-	  dumpMaps(res);
-#endif
-	  if(res==NULL)
-	    res=dupMaps(&tres);
+	  JSString *jsmsg1;
+	  JSObject *nvp2=JSVAL_NULL;
+	  jsmsg1 = JS_ValueToString(cx,nvp1j);
+	  len1 = JS_GetStringLength(jsmsg1);
+	  //#ifdef JS_DEBUG
+	  fprintf(stderr,"JSVAL NVP1J IS OBJECT %s = %s\n",JS_EncodeString(cx,jsmsg),JS_EncodeString(cx,jsmsg1));
+	  //#endif
+	  if(strcasecmp(JS_EncodeString(cx,jsmsg1),"[object Object]")==0){
+	    tres->name=strdup(JS_EncodeString(cx,jsmsg));
+	    tres->content=mapFromJSObject(cx,nvp1j);
+	  }
 	  else
-	    addMapsToMaps(&res,tres);
-	  freeMaps(&tres);
-	  free(tres);
-	  tres=NULL;
-#ifdef JS_DEBUG
-	  dumpMaps(res);
-#endif
+	    if(strcasecmp(JS_EncodeString(cx,jsmsg),"name")==0){
+	      tres->name=strdup(JS_EncodeString(cx,jsmsg1));
+	    }
+	    else{
+	      if(tres->content==NULL)
+		tres->content=createMap(JS_EncodeString(cx,jsmsg),JS_EncodeString(cx,jsmsg1));
+	      else
+		addToMap(tres->content,JS_EncodeString(cx,jsmsg),JS_EncodeString(cx,jsmsg1));
+	    }
 	}
 #ifdef JS_DEBUG
@@ -391,10 +417,22 @@
 	  fprintf(stderr,"JSVAL NVP1J IS NOT OBJECT !!\n");
 #endif
+
       }
+      //#ifdef JS_DEBUG
+      dumpMaps(tres);
+      //#endif
+      if(res==NULL)
+	res=dupMaps(&tres);
+      else
+	addMapsToMaps(&res,tres);
+      freeMaps(&tres);
+      free(tres);
+      tres=NULL;
+
     }
   }
-#ifdef JS_DEBUG
+  //#ifdef JS_DEBUG
   dumpMaps(res);
-#endif
+  //#endif
   return res;
 }
@@ -423,18 +461,18 @@
       len = JS_GetStringLength(jsmsg);
       jsval nvp;
-      JS_GetProperty(cx, JSVAL_TO_OBJECT(t), JS_GetStringBytes(jsmsg), &nvp);
+      JS_GetProperty(cx, JSVAL_TO_OBJECT(t), JS_EncodeString(cx,jsmsg), &nvp);
       jsmsg1 = JS_ValueToString(cx,nvp);
       len1 = JS_GetStringLength(jsmsg1);
 #ifdef JS_DEBUG
-      fprintf(stderr,"Enumerate id : %d [ %s => %s ]\n",index,JS_GetStringBytes(jsmsg),JS_GetStringBytes(jsmsg1));
+      fprintf(stderr,"Enumerate id : %d [ %s => %s ]\n",index,JS_EncodeString(cx,jsmsg),JS_EncodeString(cx,jsmsg1));
 #endif
       if(res!=NULL){
 #ifdef JS_DEBUG
-	fprintf(stderr,"%s - %s\n",JS_GetStringBytes(jsmsg),JS_GetStringBytes(jsmsg1));
-#endif
-	addToMap(res,JS_GetStringBytes(jsmsg),JS_GetStringBytes(jsmsg1));
+	fprintf(stderr,"%s - %s\n",JS_EncodeString(cx,jsmsg),JS_EncodeString(cx,jsmsg1));
+#endif
+	addToMap(res,JS_EncodeString(cx,jsmsg),JS_EncodeString(cx,jsmsg1));
       }
       else{
-	res=createMap(JS_GetStringBytes(jsmsg),JS_GetStringBytes(jsmsg1));
+	res=createMap(JS_EncodeString(cx,jsmsg),JS_EncodeString(cx,jsmsg1));
 	res->next=NULL;
       }
Index: /trunk/zoo-kernel/service_internal_js.h
===================================================================
--- /trunk/zoo-kernel/service_internal_js.h	(revision 273)
+++ /trunk/zoo-kernel/service_internal_js.h	(revision 274)
@@ -52,5 +52,5 @@
   int zoo_js_support(maps**,map*,service*,maps **,maps **);
 
-  JSScript *loadZooApiFile(JSContext*,JSObject*,char*);
+  JSObject *loadZooApiFile(JSContext*,JSObject*,char*);
 
 #ifdef __cplusplus
Index: /trunk/zoo-kernel/ulinet.c
===================================================================
--- /trunk/zoo-kernel/ulinet.c	(revision 273)
+++ /trunk/zoo-kernel/ulinet.c	(revision 274)
@@ -385,5 +385,5 @@
   jsmsg = JS_ValueToString(context,*arg);
   len = JS_GetStringLength(jsmsg);
-  tmp = JS_GetStringBytes(jsmsg);
+  tmp = JS_EncodeString(context,jsmsg);
   c = (char*)malloc((len+1)*sizeof(char));
   c[len] = '\0';
@@ -435,6 +435,7 @@
 
 JSBool
-JSRequest(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+JSRequest(JSContext *cx, uintN argc, jsval *argv1)
 {
+  jsval *argv = JS_ARGV(cx,argv1);
   HINTERNET hInternet;
   char *url;
@@ -488,5 +489,5 @@
   fprintf(stderr,"content downloaded (%d) (%s) \n",dwRead,tmpValue);
 #endif
-  *rval=STRING_TO_JSVAL(JS_NewString(cx,tmpValue,strlen(tmpValue)));
+  JS_SET_RVAL(cx, argv1,STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpValue,strlen(tmpValue))));
   free(url);
   if(argc>=2)
Index: /trunk/zoo-kernel/ulinet.h
===================================================================
--- /trunk/zoo-kernel/ulinet.h	(revision 273)
+++ /trunk/zoo-kernel/ulinet.h	(revision 274)
@@ -138,5 +138,5 @@
 
 #ifdef USE_JS
-JSBool JSRequest(JSContext*, JSObject*, uintN, jsval*, jsval*);
+JSBool JSRequest(JSContext*, uintN, jsval*);
 #endif
 
Index: /trunk/zoo-kernel/zoo_service_loader.c
===================================================================
--- /trunk/zoo-kernel/zoo_service_loader.c	(revision 273)
+++ /trunk/zoo-kernel/zoo_service_loader.c	(revision 274)
@@ -1632,5 +1632,5 @@
 	       * Title, Asbtract
 	       */
-	      if(xmlStrncasecmp(cur2->name,BAD_CAST "Title",xmlStrlen(cur2->name))==0 ||
+	      else if(xmlStrncasecmp(cur2->name,BAD_CAST "Title",xmlStrlen(cur2->name))==0 ||
 		 xmlStrncasecmp(cur2->name,BAD_CAST "Abstract",xmlStrlen(cur2->name))==0){
 		xmlChar *val=
