Index: trunk/zoo-project/zoo-kernel/service_internal.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal.c	(revision 402)
+++ trunk/zoo-project/zoo-kernel/service_internal.c	(revision 403)
@@ -1215,10 +1215,8 @@
   nc = xmlNewNode(ns, BAD_CAST "Process");
   map* tmp2=getMap(serv->content,"processVersion");
-
   if(tmp2!=NULL)
     xmlNewNsProp(nc,ns,BAD_CAST "processVersion",BAD_CAST tmp2->value);
   
   printDescription(nc,ns_ows,serv->name,serv->content);
-  //fflush(stderr);
 
   xmlAddChild(n,nc);
@@ -1339,8 +1337,8 @@
       scursor=getElements(serv->outputs,mcursor->name);
       if(scursor!=NULL){
-	if(testResponse==NULL)
+	if(testResponse==NULL || tmp0==NULL)
 	  printIOType(doc,nc,ns,ns_ows,ns_xlink,scursor,mcursor,"Output");
 	else
-	  if(strncmp(tmp0->value,"true",4)==0)
+	  if(tmp0!=NULL && strncmp(tmp0->value,"true",4)==0)
 	    printIOType(doc,nc,ns,ns_ows,ns_xlink,scursor,mcursor,"Output");
       }
Index: trunk/zoo-project/zoo-kernel/service_internal_js.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_js.c	(revision 402)
+++ trunk/zoo-project/zoo-kernel/service_internal_js.c	(revision 403)
@@ -112,9 +112,5 @@
 
   /* Create the global object. */
-  //#ifdef JS_NewCompartmentAndGlobalObject
   global = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL);
-  //#else
-  //global = JS_NewObject(cx, &global_class, 0,0);
-  //#endif
 
   /* Populate the global object with the standard globals,
@@ -124,4 +120,6 @@
   }
 
+  /* Define specific function and global variable to share with JS runtime
+   */
   jsval tmp=INT_TO_JSVAL(3);
   if (!JS_SetProperty(cx, global, "SERVICE_SUCCEEDED", &tmp))
@@ -385,5 +383,4 @@
     fprintf(stderr,"Array Object is NULL!\n");
   maps* tmp=t;
-
   while(tmp!=NULL){
     jsuint len;
@@ -392,5 +389,4 @@
     jsval pvalj=OBJECT_TO_JSVAL(pval);
     JS_SetProperty(cx, res, tmp->name, &pvalj);
-
 #ifdef JS_DEBUG
     fprintf(stderr,"Length of the Array %d, element : %s added \n",len,tmp->name);
@@ -408,5 +404,5 @@
   map* isBinary=getMap(t,"size");
   map* tmap=getMapType(t);
-#ifdef DEBUG
+#ifdef JS_DEBUG
   if(tmap==NULL)
     fprintf(stderr,"tmap is null !\n");
@@ -414,20 +410,19 @@
     fprintf(stderr,"tmap is not null ! (%s = %s)\n",tmap->name,tmap->value);
 #endif
-  /* Avoid gesture of binary content which failed due to strlen function use */
-  if(isBinary!=NULL){
-    return res;
-  }
-  while(tmpm!=NULL){
-    if(isArray==NULL || strncasecmp(tmpm->name,"value",5)!=0 || 
-       (tmap!=NULL && strncasecmp(tmpm->name,tmap->name,strlen(tmap->name))!=0)){
-      jsval jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm->value,strlen(tmpm->value)));
+  if(isArray==NULL){
+    while(tmpm!=NULL){
+      jsval jsstr;
+      if(isBinary!=NULL && strncasecmp(tmpm->name,"value",5)==0)
+	jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm->value,atoi(isBinary->value)));
+      else
+	jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm->value,strlen(tmpm->value)));
       JS_SetProperty(cx, res, tmpm->name,&jsstr);
 #ifdef JS_DEBUG
-      fprintf(stderr,"%s => %s\n",tmpm->name,tmpm->value);
-#endif
-    }
-    tmpm=tmpm->next;
-  }
-  if(isArray!=NULL){
+      fprintf(stderr,"[JS] %s => %s\n",tmpm->name,tmpm->value);
+#endif
+      tmpm=tmpm->next;
+    }
+  }
+  else{
     map* len=getMap(t,"length");
     int cnt=atoi(len->value);
@@ -515,6 +510,5 @@
 	free(tres);
 	tres=NULL;
-	
-	
+		
       }
     }
@@ -604,5 +598,4 @@
 	  fprintf(stderr,"JSVAL NVP1J IS NOT OBJECT !!\n");
 #endif
-
       }
 #ifdef JS_DEBUG
Index: trunk/zoo-project/zoo-kernel/zoo_loader.c
===================================================================
--- trunk/zoo-project/zoo-kernel/zoo_loader.c	(revision 402)
+++ trunk/zoo-project/zoo-kernel/zoo_loader.c	(revision 403)
@@ -198,5 +198,4 @@
       xmlInitParser();
       xmlDocPtr doc = xmlParseMemory(t1->value,cgiContentLength);
-
       {
 	xmlXPathObjectPtr reqptr=extractFromDoc(doc,"/*[local-name()='Envelope']/*[local-name()='Body']/*");
