Index: trunk/zoo-project/zoo-kernel/service_internal.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal.c	(revision 601)
+++ trunk/zoo-project/zoo-kernel/service_internal.c	(revision 605)
@@ -1943,5 +1943,5 @@
   case SERVICE_SUCCEEDED:
     nc1 = xmlNewNode(ns, BAD_CAST "ProcessSucceeded");
-    sprintf(sMsg,_("Service \"%s\" run successfully."),serv->name);
+    sprintf(sMsg,_("The service \"%s\" ran successfully."),serv->name);
     nc3=xmlNewText(BAD_CAST sMsg);
     xmlAddChild(nc1,nc3);
@@ -1951,5 +1951,5 @@
     tmpStatus=getMapFromMaps(m,"lenv","status");
     xmlNewProp(nc1,BAD_CAST "percentCompleted",BAD_CAST tmpStatus->value);
-    sprintf(sMsg,_("ZOO Service \"%s\" is currently running. Please, reload this document to get the up-to-date status of the Service."),serv->name);
+    sprintf(sMsg,_("The ZOO service \"%s\" is currently running. Please reload this document to get the up-to-date status of the service."),serv->name);
     nc3=xmlNewText(BAD_CAST sMsg);
     xmlAddChild(nc1,nc3);
@@ -1957,5 +1957,5 @@
   case SERVICE_ACCEPTED:
     nc1 = xmlNewNode(ns, BAD_CAST "ProcessAccepted");
-    sprintf(sMsg,_("Service \"%s\" was accepted by the ZOO Kernel and it run as a background task. Please consult the statusLocation attribtue providen in this document to get the up-to-date document."),serv->name);
+    sprintf(sMsg,_("The service \"%s\" was accepted by the ZOO kernel and is running as a background task. Please access the URL in the statusLocation attribute provided in this document to get the up-to-date status and results."),serv->name);
     nc3=xmlNewText(BAD_CAST sMsg);
     xmlAddChild(nc1,nc3);
@@ -2067,5 +2067,5 @@
 	/* If the file cannot be created return an ExceptionReport */
 	char tmpMsg[1024];
-	sprintf(tmpMsg,_("Unable to create the file : \"%s\" for storing the ExecuteResponse."),stored_path);
+	sprintf(tmpMsg,_("Unable to create the file \"%s\" for storing the ExecuteResponse."),stored_path);
 
 	errorException(m,tmpMsg,"InternalError",NULL);
@@ -2251,5 +2251,5 @@
 	    nc3=xmlNewNode(ns_wps, BAD_CAST tmpV->value);
       else
-	    nc3=xmlNewNode(ns_wps, BAD_CAST "LitteralData");
+	    nc3=xmlNewNode(ns_wps, BAD_CAST "LiteralData");
     } 
     tmp=m->content;
@@ -2711,5 +2711,5 @@
     if(teste==NULL){
       char tmpMsg[1024];
-      sprintf(tmpMsg,_("Unable to create the file : \"%s\" for storing the session maps."),session_file_path);
+      sprintf(tmpMsg,_("Unable to create the file \"%s\" for storing the session maps."),session_file_path);
       errorException(m,tmpMsg,"InternalError",NULL);
 
@@ -2804,9 +2804,9 @@
 	    file_path=(char*)malloc((strlen(tmp1->value)+strlen(file_name)+2)*sizeof(char));
 	    sprintf(file_path,"%s/%s",tmp1->value,file_name);
-	    
+    
 		FILE *ofile=fopen(file_path,"wb");
 	    if(ofile==NULL){
 	      char tmpMsg[1024];
-	      sprintf(tmpMsg,_("Unable to create the file : \"%s\" for storing the %s final result."),file_name,tmpI->name);
+	      sprintf(tmpMsg,_("Unable to create the file \"%s\" for storing the %s final result."),file_name,tmpI->name);
 	      errorException(m,tmpMsg,"InternalError",NULL);
 	      free(file_name);
@@ -2862,5 +2862,6 @@
 #endif
     printProcessResponse(m,request_inputs1,cpid,
-			 s,r_inputs->value,res,
+		//	 s,r_inputs->value,res,
+			 s, s->name,res,  // replace serviceProvider with serviceName in stored response file name
 			 request_inputs,
 			 request_outputs);
@@ -2893,5 +2894,5 @@
       if(toto==NULL){
 	char tmpMsg[1024];
-	sprintf(tmpMsg,_("Wrong RawDataOutput parameter, unable to fetch any result for the name your provided : \"%s\"."),tmpI->name);
+	sprintf(tmpMsg,_("Wrong RawDataOutput parameter: unable to fetch any result for the given parameter name: \"%s\"."),tmpI->name);
 	errorException(m,tmpMsg,"InvalidParameterValue","RawDataOutput");
 	return;
@@ -3832,6 +3833,10 @@
     free(tmp0);
     buffer[strlen(buffer)-1]=0;
-    if(i+1<level){
-      map* tmpMap=getMapFromMaps(conf,"lenv","metapath");
+    if(i+1<level){ 
+      #ifdef IGNORE_METAPATH
+        map* tmpMap = createMap("metapath", "");
+      #else  
+        map* tmpMap=getMapFromMaps(conf,"lenv","metapath");
+      #endif	  
       if(tmpMap==NULL || strlen(tmpMap->value)==0){
 	char *tmp01=zStrdup(tmp00->value);
@@ -3982,5 +3987,5 @@
     }
     if(hasValidValue<0){
-      char *replace=_("Ununderstood <%s> value, %s %s the only acceptable value.");
+      char *replace=_("The value <%s> was not recognized, %s %s the only acceptable value.");
       nb=0;
       char *vvalues=NULL;
Index: trunk/zoo-project/zoo-kernel/service_internal_php.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_php.c	(revision 601)
+++ trunk/zoo-project/zoo-kernel/service_internal_php.c	(revision 605)
@@ -186,19 +186,34 @@
   char ntmp[1024];
   getcwd(ntmp,1024);
-  map* tmp=getMap(request,"metapath");
-
+    
+  map* libp = getMapFromMaps(m, "main", "libPath"); // KLa  
   int res=SERVICE_FAILED;
 
-  tmp=getMap(s->content,"serviceProvider");
+  map* tmp=getMap(s->content,"serviceProvider");
+  if (tmp == NULL || tmp->value == NULL) {
+	  return errorException(m, "Missing serviceProvider (library file)", "NoApplicableCode", NULL);
+  }
+  
   map* cwd=getMapFromMaps(m,"lenv","cwd");
-  map* mp=getMap(request,"metapath");
+#ifdef IGNORE_METAPATH
+  map* mp = createMap("metapath", "");
+#else  
+  map* mp = getMap(request, "metapath");
+#endif
   char *scriptName;
-  if(mp!=NULL && strlen(mp->value)>0){
-    scriptName=(char*)malloc((strlen(cwd->value)+strlen(mp->value)+strlen(tmp->value)+3)*sizeof(char));
-    sprintf(scriptName,"%s/%s/%s",cwd->value,mp->value,tmp->value);
-  }else{
-    scriptName=(char*)malloc((strlen(cwd->value)+strlen(tmp->value)+2)*sizeof(char));
-    sprintf(scriptName,"%s/%s",cwd->value,tmp->value);
-  }
+  
+  if (libp != NULL && libp->value != NULL) {
+	scriptName = (char*) malloc((strlen(libp->value) + strlen(tmp->value) + 2)*sizeof(char));
+    sprintf (scriptName, "%s/%s", libp->value, tmp->value);	
+  }
+  else {	
+    if(mp!=NULL && strlen(mp->value)>0){
+      scriptName=(char*)malloc((strlen(cwd->value)+strlen(mp->value)+strlen(tmp->value)+3)*sizeof(char));
+      sprintf(scriptName,"%s/%s/%s",cwd->value,mp->value,tmp->value);
+    }else{
+      scriptName=(char*)malloc((strlen(cwd->value)+strlen(tmp->value)+2)*sizeof(char));
+      sprintf(scriptName,"%s/%s",cwd->value,tmp->value);
+    }
+  } 
   zend_file_handle iscript;
   iscript.type=ZEND_HANDLE_FD;
Index: trunk/zoo-project/zoo-kernel/zoo_loader.c
===================================================================
--- trunk/zoo-project/zoo-kernel/zoo_loader.c	(revision 601)
+++ trunk/zoo-project/zoo-kernel/zoo_loader.c	(revision 605)
@@ -111,5 +111,5 @@
        delete[] buffer;
        if(res==NULL && (strQuery==NULL || strlen(strQuery)==0)){
-	 return errorException(NULL,"ZOO-Kernel failed to process your request cause the request was emtpty.","InternalError",NULL);
+	 return errorException(NULL,"ZOO-Kernel failed to process your request because the request was empty.","InternalError",NULL);
        }else{
 	 if(strQuery==NULL || strlen(strQuery)==0)
Index: trunk/zoo-project/zoo-kernel/zoo_service_loader.c
===================================================================
--- trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 601)
+++ trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 605)
@@ -195,5 +195,5 @@
               char emsg[1024];
               sprintf (emsg,
-                       _("You set maximum occurences for <%s> as %i but you tried to use it more than the limit you set. Please correct your ZCFG file or your request."),
+                       _("The maximum allowed occurrences for <%s> (%i) was exceeded."),
                        mi->name, atoi (testMap->value));
               errorException (m, emsg, "InternalError", NULL);
@@ -227,5 +227,5 @@
               sprintf (emsg,
                        _
-                       ("You set maximum occurences for <%s> to one but you tried to use it more than once. Please correct your ZCFG file or your request."),
+                       ("The maximum allowed occurrences for <%s> is one."),
                        mi->name);
               errorException (m, emsg, "InternalError", NULL);
@@ -371,5 +371,5 @@
 {
 #ifdef DEBUG
-  fprintf (stderr, "Signal %d after the ZOO-Kernel returned result !\n", sig);
+  fprintf (stderr, "Signal %d after the ZOO-Kernel returned result!\n", sig);
 #endif
   exit (0);
@@ -407,5 +407,5 @@
   sprintf (tmp,
            _
-           ("ZOO Kernel failed to process your request receiving signal %d = %s"),
+           ("ZOO Kernel failed to process your request, receiving signal %d = %s"),
            sig, ssig);
   errorException (NULL, tmp, "InternalError", NULL);
@@ -439,16 +439,26 @@
   fflush (stderr);
 #endif
+
+  map* libp = getMapFromMaps(m, "main", "libPath");
+  
   if (strlen (r_inputs->value) == 1
       && strncasecmp (r_inputs->value, "C", 1) == 0)
-    {
-      r_inputs = getMap (request_inputs, "metapath");
-      if (r_inputs != NULL)
-        sprintf (tmps1, "%s/%s", ntmp, r_inputs->value);
-      else
-        sprintf (tmps1, "%s/", ntmp);
-      char *altPath = zStrdup (tmps1);
-      r_inputs = getMap (s1->content, "ServiceProvider");
-      sprintf (tmps1, "%s/%s", altPath, r_inputs->value);
-      free (altPath);
+  {
+     if (libp != NULL && libp->value != NULL) {
+	    r_inputs = getMap (s1->content, "ServiceProvider");
+		sprintf (tmps1, "%s/%s", libp->value, r_inputs->value);
+	 }
+     else {	 
+        r_inputs = getMap (request_inputs, "metapath");
+        if (r_inputs != NULL)
+          sprintf (tmps1, "%s/%s", ntmp, r_inputs->value);
+        else
+          sprintf (tmps1, "%s/", ntmp);
+	  
+        char *altPath = zStrdup (tmps1);
+        r_inputs = getMap (s1->content, "ServiceProvider");
+        sprintf (tmps1, "%s/%s", altPath, r_inputs->value);
+        free (altPath);
+	 }
 #ifdef DEBUG
       fprintf (stderr, "Trying to load %s\n", tmps1);
@@ -613,5 +623,5 @@
 	      errstr = dlerror ();
 #endif
-          sprintf (tmps, _("C Library can't be loaded %s"), errstr);
+          sprintf (tmps, _("Unable to load C Library %s"), errstr);
 	  errorException(m,tmps,"InternalError",NULL);
           *eres = -1;
@@ -739,4 +749,5 @@
   map *r_inputs = getMapFromMaps (m, "main", "tmpPath");
   map *r_inputs1 = getMap (request_inputs, "metapath");
+  
   int hasIn = -1;
   if (r_inputs1 == NULL)
@@ -883,4 +894,7 @@
   map *r_inputs = NULL;
   map *request_inputs = *inputs;
+#ifdef IGNORE_METAPATH
+  addToMap(request_inputs, "metapath", "");
+#endif  
   maps *m = NULL;
   char *REQUEST = NULL;
@@ -901,5 +915,4 @@
 #endif
   r_inputs = getMapOrFill (&request_inputs, "metapath", "");
-
 
   char conf_file[10240];
@@ -1093,5 +1106,4 @@
     }
 
-
   maps *request_output_real_format = NULL;
   map *tmpm = getMapFromMaps (m, "main", "serverAddress");
@@ -1112,4 +1124,5 @@
   r_inputs = NULL;
   r_inputs = getMap (request_inputs, "metapath");
+  
   if (r_inputs != NULL)
     snprintf (conf_dir, 1024, "%s/%s", ntmp, r_inputs->value);
@@ -1160,5 +1173,5 @@
       if (dirp == NULL)
         {
-          errorException (m, _("The specified path path doesn't exist."),
+          errorException (m, _("The specified path path does not exist."),
                           "InvalidParameterValue", conf_dir);
           freeMaps (&m);
@@ -1375,5 +1388,5 @@
           errorException (m,
                           _
-                          ("Unenderstood <request> value. Please check that it was set to GetCapabilities, DescribeProcess or Execute."),
+                          ("The <request> value was not recognized. Allowed values are GetCapabilities, DescribeProcess, and Execute."),
                           "InvalidParameterValue", "request");
 #ifdef DEBUG
@@ -1441,5 +1454,5 @@
       sprintf (tmpMsg,
                _
-               ("The value for <identifier> seems to be wrong (%s). Please, ensure that the process exist using the GetCapabilities request."),
+               ("The value for <identifier> seems to be wrong (%s). Please specify one of the processes in the list returned by a GetCapabilities request."),
                r_inputs->value);
       errorException (m, tmpMsg, "InvalidParameterValue", "identifier");
@@ -2786,5 +2799,5 @@
               snprintf (tmps, 1024,
                         _
-                        ("The <%s> parameter has a limited size (%sMB) defined in ZOO ServicesProvider configuration file but the reference you provided exceed this limitation (%fMB), please correct your query or the ZOO Configuration file."),
+                        ("The <%s> parameter has a size limit (%s MB) defined in the ZOO ServicesProvider configuration file, but the reference you provided exceeds this limit (%f MB)."),
                         ptr->name, tmp1->value, i);
               addToMap (tmpe, "locator", ptr->name);
@@ -2830,5 +2843,5 @@
 	    snprintf (tmps, 1024,
 		      _
-		      ("The <%s> argument was not specified in DataInputs but defined as requested in ZOO ServicesProvider configuration file, please correct your query or the ZOO Configuration file."),
+		      ("The <%s> argument was not specified in DataInputs but is required according to the ZOO ServicesProvider configuration file."),
 		      errp->value);
 	    setMapArray (tmpe, "locator", nb , errp->value);
@@ -2856,5 +2869,5 @@
 	    snprintf (tmps, 1024,
 		      _
-		      ("The <%s> argument was specified as %s identifier but not defined in the ZOO Configuration File. Please, correct your query or the ZOO Configuration File."),
+		      ("The <%s> argument specified as %s identifier was not recognized (not defined in the ZOO Configuration File)."),
 		      errp->value,
 		      ((getMap(request_inputs,"RawDataOutput")!=NULL)?"RawDataOutput":"ResponseDocument"));
@@ -3051,5 +3064,5 @@
       errorException (m,
                       _
-                      ("Status cannot be set to true with storeExecuteResponse to false. Please, modify your request parameters."),
+                      ("The status parameter cannot be set to true if storeExecuteResponse is set to false. Please modify your request parameters."),
                       "InvalidParameterValue", "storeExecuteResponse");
       freeService (&s1);
@@ -3270,5 +3283,7 @@
           int cpid = atoi (r_inputs->value);
           r_inputs = getMapFromMaps (m, "main", "tmpPath");
-          map *r_inputs1 = getMap (s1->content, "ServiceProvider");
+          //map *r_inputs1 = getMap (s1->content, "ServiceProvider");
+		  map* r_inputs1 = createMap("ServiceName", s1->name);
+
           fbkp =
             (char *)
@@ -3357,4 +3372,5 @@
                     cpid, m, eres);
   fflush (stdout);
+  
   /**
    * Ensure that if error occurs when freeing memory, no signal will return
