Index: /trunk/zoo-kernel/service.h
===================================================================
--- /trunk/zoo-kernel/service.h	(revision 281)
+++ /trunk/zoo-kernel/service.h	(revision 282)
@@ -498,9 +498,9 @@
   }
 
-  static map* getMapOrEmpty(map* m,const char *key){
+  static map* getMapOrFill(map* m,const char *key,char* value){
     map* tmp=m;
     map* tmpMap=getMap(tmp,key);
     if(tmpMap==NULL){
-      addToMap(tmp,key,"");
+      addToMap(tmp,key,value);
       tmpMap=getMap(tmp,key);
     }
Index: /trunk/zoo-kernel/service_internal.c
===================================================================
--- /trunk/zoo-kernel/service_internal.c	(revision 281)
+++ /trunk/zoo-kernel/service_internal.c	(revision 282)
@@ -2384,9 +2384,7 @@
   int fsize;
   if(cached!=NULL){
-    fprintf(stderr,"Use cached file: %s\n",cached);
     struct stat f_status;
     int s=stat(cached, &f_status);
     if(s==0){
-      fprintf(stderr,"Use cached file: %s\n",cached);
       fcontent=(char*)malloc(sizeof(char)*(f_status.st_size+1));
       FILE* f=fopen(cached,"r");
@@ -2405,5 +2403,5 @@
     fsize=res.nDataLen;
   }
-  map* tmpMap=getMapOrEmpty(content,"value");
+  map* tmpMap=getMapOrFill(content,"value","");
   free(tmpMap->value);
   tmpMap->value=(char*)malloc((fsize+1)*sizeof(char));
Index: /trunk/zoo-kernel/zoo_service_loader.c
===================================================================
--- /trunk/zoo-kernel/zoo_service_loader.c	(revision 281)
+++ /trunk/zoo-kernel/zoo_service_loader.c	(revision 282)
@@ -452,16 +452,6 @@
   _getcwd(ntmp,1024);
 #endif
-  r_inputs=getMap(request_inputs,"metapath");
-  if(r_inputs==NULL){
-    if(request_inputs==NULL)
-      request_inputs=createMap("metapath","");
-    else
-      addToMap(request_inputs,"metapath","");
-#ifdef DEBUG
-    fprintf(stderr,"ADD METAPATH\n");
-    dumpMap(request_inputs);
-#endif
-    r_inputs=getMap(request_inputs,"metapath");
-  }
+  r_inputs=getMapOrFill(request_inputs,"metapath","");
+
   char conf_file[10240];
   snprintf(conf_file,10240,"%s/%s/main.cfg",ntmp,r_inputs->value);
@@ -1399,8 +1389,5 @@
 		 * mimeType, encoding, schema
 		 */
-		const char *coms[3];
-		coms[0]="mimeType";
-		coms[1]="encoding";
-		coms[2]="schema";
+		const char *coms[3]={"mimeType","encoding","schema"};
 		for(int l=0;l<3;l++){
 #ifdef DEBUG
@@ -1433,4 +1420,5 @@
 		xmlChar* mv=xmlNodeListGetString(doc,cur4->xmlChildrenNode,1);
 		map* ltmp=getMap(tmpmaps->content,"mimeType");
+		dumpMap(ltmp);
 		if(mv==NULL || 
 		   (xmlStrcasecmp(cur4->name, BAD_CAST "ComplexData")==0 &&
