Index: trunk/zoo-project/zoo-kernel/main.cfg
===================================================================
--- trunk/zoo-project/zoo-kernel/main.cfg	(revision 534)
+++ trunk/zoo-project/zoo-kernel/main.cfg	(revision 539)
@@ -1,114 +1,32 @@
-[mm]
-biLayerAlias=Carte,Ortophoto,Ortophoto 2005,Parcels,Etat Major,Cassini,Elev
-editingToolbar=select,add,edit
-navName=Authenticate,Permalink,Twitter sharing,Facebook sharing,Scroll,Pan,Geolocate,Track my position,Zoom Box,Zoom To Max Extent,Identify,Identify Circle,Mesure Distance,Mesure Area,Print,Profile
-scales=443744273,221872136,110936068,55468034,27734017,13867008,6933504,3466752,1733376,866688,433344,216672,108336,54168,27084,13542,6771,3385,1692
-rasterToolbarAlias=Profile,Contour,Shaded Relief,Color Relief,Slope Map,Clip
-supportedDbs=PostGIS,MySQL
-mapcacheUrl=http://127.0.0.1/cache/
-biLayers=GEOGRAPHICALGRIDSYSTEMS.MAPS,ORTHOIMAGERY.ORTHOPHOTOS,ORTHOIMAGERY.ORTHOPHOTOS2000-2005,CADASTRALPARCELS.PARCELS,GEOGRAPHICALGRIDSYSTEMS.ETATMAJOR40,GEOGRAPHICALGRIDSYSTEMS.CASSINI,ELEVATION.SLOPES
-bgLayers=google.maps.MapTypeId.TERRAIN,null,google.maps.MapTypeId.SATELLITE,google.maps.MapTypeId.HYBRID
-bpDefault=g
-bgName=Google
-bbLayers=Road,Aerial,AerialWithLabels
-navIcon=auth,permalink,tshare,fshare,scroll,pan,geoloc,track,zoom-in,zoomtomaxextent,info,infocircle,dist,area,print,terrain-profile
-bbName=Bing
-boLayerAlias=OpenStreetMap
-bmLayerAlias=Streets,Satelite
-toolbars=Vector
-navId=authenticate,permalink,tshare,fshare,scroll,control,geolocate,track,zoomin,zoomtomaxextent,getFeature,getFeatureCircle,line,polygon,print,profile
-navIdX=authenticate,permalink,tshare,fshare,zoomtomaxextent,print
-navIdXX=scroll
-navIdF=loadLoginForm,permalink,shareOnTwitter,shareOnFB,gotoMaxExtent,printIntoDocument
-nvIID=getFeature,getFeatureCircle
-osmApiUrl=http://open.mapquestapi.com/xapi/api/0.6/
-vectorToolbar=buffer,spatial-buffer,centroid,boundary,convexhull,simplify,spatial-query
-bmLayers=Map,Aerial
-boName=OSM
-editingToolbarAlias=Select feature,Add feature,Edit feature
-boLayers=OSM
-address=http://127.0.0.1/mm
-bmName=MapQuest
-bpList=g,b,i
-uomsName=Foot,Meter,Deegree
-adminTheme=green
-vectorToolbarAlias=Buffer,BufferMask,Centroid,Boundary,ConvexHull,Simplify,SpatialQuery
-mapcacheCfg=/Users/djay/Sites/mapcache.xml
-dateFormat=%A %d %B %Y
-uomsId=english,metric,geographic
-oldToolbars=Editing,Raster
-rasterToolbar=profile,contour,shaded_relief,color_relief,slope_map,clip
-bgLayerAlias=Physical,Streets,Satelite,Hybrid
-bbLayerAlias=Streets,Satelite,Hybrid
-sizeLimit=100M
-biName=IGN
-
-[headers]
-X-Powered-By=ZOO-Project@MapMint
+[main]
+encoding = utf-8
+version = 1.0.0
+serverAddress = http://www.zoo-project.org/zoo/
+lang = fr-FR,en-CA,en-US
+tmpPath=/tmp/
+tmpUrl = ../mpPathRelativeToServerAdress/
+dataPath = /tmp/
+cacheDir = /tmp/
 
 [identification]
-keywords=WPS,GIS,buffer,MapMint,ZOO-Project
-title=ZOO-Project WPS Production Server
-abstract=Development version of ZooWPS. See http://www.zoo-project.org
-accessConstraints=none
-fees=None
+title = The Zoo WPS Development Server
+abstract = Development version of ZooWPS. See http://www.zoo-project.org
+fees = None
+accessConstraints = none
+keywords = WPS,GIS,buffer
 
 [provider]
+providerName=ZOO Project
+providerSite=http://www.zoo-project.org
+individualName=Gerald FENOY
 positionName=Developer
-providerName=GeoLabs SARL
+role=Dev
+addressDeliveryPoint=1280, avenue des Platanes
+addressCity=Lattes
 addressAdministrativeArea=False
-addressDeliveryPoint=1280, avenue des Platanes
+addressPostalCode=34970
 addressCountry=fr
-phoneVoice=+33 4 67 43 09 95
-addressPostalCode=34970
-role=Dev
-providerSite=http://www.geolabs.fr
+addressElectronicMailAddress=gerald@geolabs.fr
+phoneVoice=False
 phoneFacsimile=False
-addressElectronicMailAddress=gerald@geolabs.fr
-addressCity=Lattes
-individualName=Gerald FENOY
 
-[main]
-encoding=utf-8
-isTrial=true
-dataPath=/Users/djay/Sites/data
-tmpPath=/Users/djay/Sites/tmp
-supportedDbs=PostGIS,MySQL,WFS
-cacheDir=/Users/djay/Sites/cache
-rootUrl=/~djay/mm-np/public/
-publicationUrl=/~djay/pm-np/
-dblink=/Users/djay/Sites/mm.db
-mmPath=/Users/djay/Sites/mm-np/
-sessPath=/Users/djay/Sites/tmp
-version=1.0.0
-dbuser=npdb
-dcount=3
-dbuserName=np
-3D=false
-Rpy2=true
-applicationAddress=http://127.0.0.1/~djay/mm-np/
-mmAddress=/~djay/mm-np/
-publicationPath=/Users/djay/Sites/pm-np/
-msOgcVersion=1.0.0
-serverAddress=http://127.0.0.1/np-bin/zoo_loader.cgi
-lang=fr-FR,en-US,ja-JP
-mapserverAddress=http://127.0.0.1/np-bin/mapserv.cgi
-tmpUrl=http://127.0.0.1/~djay/tmp/
-templatesPath=/Users/djay/Sites/mm-np/templates/
-templatesAddress=http://127.0.0.1/~djay/pm-np/tmpl/
-crs=IGNF:LAMB93
-jsCache=dev
-cssCache=prod
-cookiePrefix=MMID
-
-[npdb]
-host=127.0.0.1
-schema=velo
-user=postgres
-dbname=demogis
-port=5432
-
-[oo]
-external=true
-path=/Applications/LibreOffice.app/Contents/program/python
-ghostscript=/usr/local/bin/gs
Index: trunk/zoo-project/zoo-kernel/service_conf.l
===================================================================
--- trunk/zoo-project/zoo-kernel/service_conf.l	(revision 534)
+++ trunk/zoo-project/zoo-kernel/service_conf.l	(revision 539)
@@ -41,5 +41,5 @@
 
 attname	[a-zA-Z0-9_\-]+
-attvalue1	[\^\*\+,;@a-zA-Z0-9_\-::.:" "\"\'/\\\(\)\t\|\$\&>\[\]]+
+attvalue1	[\^\*\+,;@a-zA-Z0-9%_\-::.:" "\"\'/\\\(\)\t\|\$\&>\[\]]+
 
 attvalue		\"[^"]*\"|\'[^']*\'\(\)
Index: trunk/zoo-project/zoo-kernel/service_conf.y
===================================================================
--- trunk/zoo-project/zoo-kernel/service_conf.y	(revision 534)
+++ trunk/zoo-project/zoo-kernel/service_conf.y	(revision 539)
@@ -515,5 +515,5 @@
   fflush(stderr);
 #endif
-  if($1!=NULL){
+  if($1!=NULL && curr_key!=NULL){
     if(current_content==NULL){
 #ifdef DEBUG_SERVICE_CONF
Index: trunk/zoo-project/zoo-kernel/service_internal.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal.c	(revision 534)
+++ trunk/zoo-project/zoo-kernel/service_internal.c	(revision 539)
@@ -1777,5 +1777,6 @@
     xmlNewNsProp(nc,ns,BAD_CAST "processVersion",BAD_CAST tmp2->value);
   
-  printDescription(nc,ns_ows,serv->name,serv->content);
+  map* tmpI=getMapFromMaps(m,"lenv","oIdentifier");
+  printDescription(nc,ns_ows,tmpI->value,serv->content);
 
   xmlAddChild(n,nc);
@@ -3361,6 +3362,8 @@
 
 void parseIdentifier(maps* conf,char* conf_dir,char *identifier,char* buffer){
+  setMapInMaps(conf,"lenv","oIdentifier",identifier);
+  char *lid=zStrdup(identifier);
   char *saveptr1;
-  char *tmps1=strtok_r(identifier,".",&saveptr1);
+  char *tmps1=strtok_r(lid,".",&saveptr1);
   int level=0;
   char key[25];
@@ -3420,4 +3423,6 @@
   sprintf(buffer,"%s.zcfg",tmp0);
   free(tmp0);
+  fprintf(stderr,"DEBUG %s\n",lid);
+  free(lid);
 }
 
@@ -3451,4 +3456,8 @@
     char size[1024];
     map* tmp=getMapFromMaps(outputs,parameterName,"value");
+    if(tmp==NULL){
+      setMapInMaps(outputs,parameterName,"value","");
+      tmp=getMapFromMaps(outputs,parameterName,"value");
+    }
     free(tmp->value);
     tmp->value=(char*) malloc((numberOfBytes+1)*sizeof(char));
Index: trunk/zoo-project/zoo-kernel/service_internal_java.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_java.c	(revision 534)
+++ trunk/zoo-project/zoo-kernel/service_internal_java.c	(revision 539)
@@ -51,5 +51,4 @@
       sprintf(classpath,"%s/%s/",ntmp,tmp->value);
     }
-    sprintf(oclasspath,"-Djava.class.path=%s",classpath);
   }else{
     if(cclasspath!=NULL){
@@ -67,5 +66,4 @@
       sprintf(classpath,"%s/",ntmp);
     }
-    sprintf(oclasspath,"-Djava.class.path=%s",classpath);
 
   }
@@ -77,8 +75,20 @@
 #endif
 
+  int nb=1;
+  int nbc0=0;
+  maps* javaXXMap=getMaps(main_conf,"javaxx");
+  if(javaXXMap!=NULL){
+    nbc0+=count(javaXXMap->content);
+  }
+  int nbc1=0;
+  maps* javaXMap=getMaps(main_conf,"javax");
+  if(javaXMap!=NULL){
+    nbc1+=count(javaXMap->content);
+  }
 #ifdef WIN32
-  JavaVMOption options[2];
-#else
-  JavaVMOption options[1];
+  nb=2+nbc0+nbc1;
+  JavaVMOption options[nb];
+#else
+  JavaVMOption options[nb+nbc0+nbc1];
 #endif
   JavaVMInitArgs vm_args;
@@ -95,22 +105,35 @@
   jclass cls_gr;
 #endif
-  int i;
-
+  int i,start;
+  map *cursorxx=NULL;
+  if(javaXXMap!=NULL)
+    cursorxx=javaXXMap->content;
+  map *cursorx=NULL;
+  if(javaXMap!=NULL)
+    cursorx=javaXMap->content;
   options[0].optionString = oclasspath;
 #ifdef WIN32
+  start=2;
   options[1].optionString = "-Xmx512m";
-  /*options[2].optionString = "-Xms128m";
-  options[3].optionString = "-XX:MaxPermSize=256m";
-  options[4].optionString = "-XX:MaxHeapFreeRatio=70";*/
-#endif
+#else
+  start=1;
+#endif
+  for(i=0;i<nbc0;i++){
+    char *tmp=parseJVMXXOption(cursorxx);
+    options[start+i].optionString = tmp;
+    free(tmp);
+    cursorxx=cursorxx->next;
+  }
+  for(;i<nbc1+nbc0;i++){
+    char *tmp=parseJVMXOption(cursorx);
+    options[start+i].optionString = tmp;
+    free(tmp);
+    cursorx=cursorx->next;
+  }
 
   JNI_GetDefaultJavaVMInitArgs(&vm_args);
   vm_args.version = JNI_VERSION_1_6;
   vm_args.options = options;
-#ifdef WIN32
-  vm_args.nOptions = 2;
-#else
-  vm_args.nOptions = 1;
-#endif
+  vm_args.nOptions = start+nbc0+nbc1;
   vm_args.ignoreUnrecognized = JNI_TRUE;
 
@@ -264,4 +287,21 @@
 }
 
+char *parseJVMXXOption(map* m){
+  char *res=(char*)malloc((strlen(m->name)+strlen(m->value)+5)*sizeof(char));
+  if(strncasecmp(m->value,"minus",5)==0)
+    sprintf(res,"-XX:-%s",m->name);
+  else if(strncasecmp(m->value,"plus",5)==0)
+    sprintf(res,"-XX:+%s",m->name);
+  else
+    sprintf(res,"-XX:%s=%s",m->name,m->value);
+  return res;
+}
+
+char *parseJVMXOption(map* m){
+  char *res=(char*)malloc((strlen(m->name)+strlen(m->value)+5)*sizeof(char));
+  sprintf(res,"-X%s:%s",m->name,m->value);
+  return res;
+}
+
 jobject HashMap_FromMaps(JNIEnv *env,maps* t,jclass scHashMapClass,jclass scHashMap_class,jmethodID scHashMap_constructor){
   jobject scObject,scObject1;
Index: trunk/zoo-project/zoo-kernel/service_internal_java.h
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_java.h	(revision 534)
+++ trunk/zoo-project/zoo-kernel/service_internal_java.h	(revision 539)
@@ -41,4 +41,8 @@
   void displayStack(JNIEnv*,maps*);
 
+  char *parseJVMXXOption(map*);
+
+  char *parseJVMXOption(map*);
+
   int zoo_java_support(maps**,map*,service*,maps**,maps**);
 
Index: trunk/zoo-project/zoo-kernel/service_internal_python.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_python.c	(revision 534)
+++ trunk/zoo-project/zoo-kernel/service_internal_python.c	(revision 539)
@@ -212,5 +212,4 @@
     else{
       pName = PyString_FromString(tmp->value);
-      fprintf(stderr,"%s %d",tmp->value,__LINE__);
     }
   }
Index: trunk/zoo-project/zoo-kernel/ulinet.c
===================================================================
--- trunk/zoo-project/zoo-kernel/ulinet.c	(revision 534)
+++ trunk/zoo-project/zoo-kernel/ulinet.c	(revision 539)
@@ -299,5 +299,6 @@
     char *tmp;
     curl_easy_getinfo(hInternet->ihandle[i].handle,CURLINFO_CONTENT_TYPE,&tmp);
-    hInternet->ihandle[i].mimeType=strdup(tmp);
+    if(tmp!=NULL)
+      hInternet->ihandle[i].mimeType=strdup(tmp);
     curl_multi_remove_handle(hInternet->handle, hInternet->ihandle[i].handle);
     curl_easy_cleanup(hInternet->ihandle[i].handle);
Index: trunk/zoo-project/zoo-kernel/zoo_service_loader.c
===================================================================
--- trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 534)
+++ trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 539)
@@ -256,6 +256,8 @@
 	fprintf(stderr,"#################\n%s\n#################\n",tmps1);
 #endif
-	t=readServiceFile(m,tmps1,&s1,dp->d_name);
-
+	char *tmpsn=zStrdup(dp->d_name);
+	tmpsn[strlen(tmpsn)-5]=0;
+	t=readServiceFile(m,tmps1,&s1,tmpsn);
+	free(tmpsn);
 	if(t<0){
 	  map* tmp00=getMapFromMaps(m,"lenv","message");
@@ -994,7 +996,8 @@
 	    if(tmpMap!=NULL)
 	      addToMap(request_inputs,"metapath",tmpMap->value);
+	    map* tmpMapI=getMapFromMaps(m,"lenv","Identifier");
 
 	    s1=(service*)malloc(SERVICE_SIZE);
-	    t=readServiceFile(m,buff1,&s1,corig);
+	    t=readServiceFile(m,buff1,&s1,tmpMapI->value);
 	    if(t<0){
 	      map* tmp00=getMapFromMaps(m,"lenv","message");
@@ -1165,6 +1168,10 @@
       addToMap(request_inputs,"metapath",tmpMap->value);
     free(identifier);
-  }else
+  }else{
     setMapInMaps(m,"lenv","Identifier",r_inputs->value);
+    setMapInMaps(m,"lenv","oIdentifier",r_inputs->value);
+  }
+
+  r_inputs=getMapFromMaps(m,"lenv","Identifier");
   int saved_stdout = dup(fileno(stdout));
   dup2(fileno(stderr),fileno(stdout));
