Changeset 605
- Timestamp:
- Mar 9, 2015, 4:46:24 PM (10 years ago)
- Location:
- trunk/zoo-project/zoo-kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal.c
r601 r605 1943 1943 case SERVICE_SUCCEEDED: 1944 1944 nc1 = xmlNewNode(ns, BAD_CAST "ProcessSucceeded"); 1945 sprintf(sMsg,_(" Service \"%s\" run successfully."),serv->name);1945 sprintf(sMsg,_("The service \"%s\" ran successfully."),serv->name); 1946 1946 nc3=xmlNewText(BAD_CAST sMsg); 1947 1947 xmlAddChild(nc1,nc3); … … 1951 1951 tmpStatus=getMapFromMaps(m,"lenv","status"); 1952 1952 xmlNewProp(nc1,BAD_CAST "percentCompleted",BAD_CAST tmpStatus->value); 1953 sprintf(sMsg,_(" ZOO Service \"%s\" is currently running. Please, reload this document to get the up-to-date status of the Service."),serv->name);1953 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); 1954 1954 nc3=xmlNewText(BAD_CAST sMsg); 1955 1955 xmlAddChild(nc1,nc3); … … 1957 1957 case SERVICE_ACCEPTED: 1958 1958 nc1 = xmlNewNode(ns, BAD_CAST "ProcessAccepted"); 1959 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);1959 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); 1960 1960 nc3=xmlNewText(BAD_CAST sMsg); 1961 1961 xmlAddChild(nc1,nc3); … … 2067 2067 /* If the file cannot be created return an ExceptionReport */ 2068 2068 char tmpMsg[1024]; 2069 sprintf(tmpMsg,_("Unable to create the file :\"%s\" for storing the ExecuteResponse."),stored_path);2069 sprintf(tmpMsg,_("Unable to create the file \"%s\" for storing the ExecuteResponse."),stored_path); 2070 2070 2071 2071 errorException(m,tmpMsg,"InternalError",NULL); … … 2251 2251 nc3=xmlNewNode(ns_wps, BAD_CAST tmpV->value); 2252 2252 else 2253 nc3=xmlNewNode(ns_wps, BAD_CAST "Lit teralData");2253 nc3=xmlNewNode(ns_wps, BAD_CAST "LiteralData"); 2254 2254 } 2255 2255 tmp=m->content; … … 2711 2711 if(teste==NULL){ 2712 2712 char tmpMsg[1024]; 2713 sprintf(tmpMsg,_("Unable to create the file :\"%s\" for storing the session maps."),session_file_path);2713 sprintf(tmpMsg,_("Unable to create the file \"%s\" for storing the session maps."),session_file_path); 2714 2714 errorException(m,tmpMsg,"InternalError",NULL); 2715 2715 … … 2804 2804 file_path=(char*)malloc((strlen(tmp1->value)+strlen(file_name)+2)*sizeof(char)); 2805 2805 sprintf(file_path,"%s/%s",tmp1->value,file_name); 2806 2806 2807 2807 FILE *ofile=fopen(file_path,"wb"); 2808 2808 if(ofile==NULL){ 2809 2809 char tmpMsg[1024]; 2810 sprintf(tmpMsg,_("Unable to create the file :\"%s\" for storing the %s final result."),file_name,tmpI->name);2810 sprintf(tmpMsg,_("Unable to create the file \"%s\" for storing the %s final result."),file_name,tmpI->name); 2811 2811 errorException(m,tmpMsg,"InternalError",NULL); 2812 2812 free(file_name); … … 2862 2862 #endif 2863 2863 printProcessResponse(m,request_inputs1,cpid, 2864 s,r_inputs->value,res, 2864 // s,r_inputs->value,res, 2865 s, s->name,res, // replace serviceProvider with serviceName in stored response file name 2865 2866 request_inputs, 2866 2867 request_outputs); … … 2893 2894 if(toto==NULL){ 2894 2895 char tmpMsg[1024]; 2895 sprintf(tmpMsg,_("Wrong RawDataOutput parameter , unable to fetch any result for the name your provided: \"%s\"."),tmpI->name);2896 sprintf(tmpMsg,_("Wrong RawDataOutput parameter: unable to fetch any result for the given parameter name: \"%s\"."),tmpI->name); 2896 2897 errorException(m,tmpMsg,"InvalidParameterValue","RawDataOutput"); 2897 2898 return; … … 3832 3833 free(tmp0); 3833 3834 buffer[strlen(buffer)-1]=0; 3834 if(i+1<level){ 3835 map* tmpMap=getMapFromMaps(conf,"lenv","metapath"); 3835 if(i+1<level){ 3836 #ifdef IGNORE_METAPATH 3837 map* tmpMap = createMap("metapath", ""); 3838 #else 3839 map* tmpMap=getMapFromMaps(conf,"lenv","metapath"); 3840 #endif 3836 3841 if(tmpMap==NULL || strlen(tmpMap->value)==0){ 3837 3842 char *tmp01=zStrdup(tmp00->value); … … 3982 3987 } 3983 3988 if(hasValidValue<0){ 3984 char *replace=_(" Ununderstood <%s> value, %s %s the only acceptable value.");3989 char *replace=_("The value <%s> was not recognized, %s %s the only acceptable value."); 3985 3990 nb=0; 3986 3991 char *vvalues=NULL; -
trunk/zoo-project/zoo-kernel/service_internal_php.c
r587 r605 186 186 char ntmp[1024]; 187 187 getcwd(ntmp,1024); 188 map* tmp=getMap(request,"metapath");189 188 189 map* libp = getMapFromMaps(m, "main", "libPath"); // KLa 190 190 int res=SERVICE_FAILED; 191 191 192 tmp=getMap(s->content,"serviceProvider"); 192 map* tmp=getMap(s->content,"serviceProvider"); 193 if (tmp == NULL || tmp->value == NULL) { 194 return errorException(m, "Missing serviceProvider (library file)", "NoApplicableCode", NULL); 195 } 196 193 197 map* cwd=getMapFromMaps(m,"lenv","cwd"); 194 map* mp=getMap(request,"metapath"); 198 #ifdef IGNORE_METAPATH 199 map* mp = createMap("metapath", ""); 200 #else 201 map* mp = getMap(request, "metapath"); 202 #endif 195 203 char *scriptName; 196 if(mp!=NULL && strlen(mp->value)>0){ 197 scriptName=(char*)malloc((strlen(cwd->value)+strlen(mp->value)+strlen(tmp->value)+3)*sizeof(char)); 198 sprintf(scriptName,"%s/%s/%s",cwd->value,mp->value,tmp->value); 199 }else{ 200 scriptName=(char*)malloc((strlen(cwd->value)+strlen(tmp->value)+2)*sizeof(char)); 201 sprintf(scriptName,"%s/%s",cwd->value,tmp->value); 202 } 204 205 if (libp != NULL && libp->value != NULL) { 206 scriptName = (char*) malloc((strlen(libp->value) + strlen(tmp->value) + 2)*sizeof(char)); 207 sprintf (scriptName, "%s/%s", libp->value, tmp->value); 208 } 209 else { 210 if(mp!=NULL && strlen(mp->value)>0){ 211 scriptName=(char*)malloc((strlen(cwd->value)+strlen(mp->value)+strlen(tmp->value)+3)*sizeof(char)); 212 sprintf(scriptName,"%s/%s/%s",cwd->value,mp->value,tmp->value); 213 }else{ 214 scriptName=(char*)malloc((strlen(cwd->value)+strlen(tmp->value)+2)*sizeof(char)); 215 sprintf(scriptName,"%s/%s",cwd->value,tmp->value); 216 } 217 } 203 218 zend_file_handle iscript; 204 219 iscript.type=ZEND_HANDLE_FD; -
trunk/zoo-project/zoo-kernel/zoo_loader.c
r601 r605 111 111 delete[] buffer; 112 112 if(res==NULL && (strQuery==NULL || strlen(strQuery)==0)){ 113 return errorException(NULL,"ZOO-Kernel failed to process your request cause the request was emtpty.","InternalError",NULL);113 return errorException(NULL,"ZOO-Kernel failed to process your request because the request was empty.","InternalError",NULL); 114 114 }else{ 115 115 if(strQuery==NULL || strlen(strQuery)==0) -
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r601 r605 195 195 char emsg[1024]; 196 196 sprintf (emsg, 197 _(" 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."),197 _("The maximum allowed occurrences for <%s> (%i) was exceeded."), 198 198 mi->name, atoi (testMap->value)); 199 199 errorException (m, emsg, "InternalError", NULL); … … 227 227 sprintf (emsg, 228 228 _ 229 (" 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."),229 ("The maximum allowed occurrences for <%s> is one."), 230 230 mi->name); 231 231 errorException (m, emsg, "InternalError", NULL); … … 371 371 { 372 372 #ifdef DEBUG 373 fprintf (stderr, "Signal %d after the ZOO-Kernel returned result 373 fprintf (stderr, "Signal %d after the ZOO-Kernel returned result!\n", sig); 374 374 #endif 375 375 exit (0); … … 407 407 sprintf (tmp, 408 408 _ 409 ("ZOO Kernel failed to process your request receiving signal %d = %s"),409 ("ZOO Kernel failed to process your request, receiving signal %d = %s"), 410 410 sig, ssig); 411 411 errorException (NULL, tmp, "InternalError", NULL); … … 439 439 fflush (stderr); 440 440 #endif 441 442 map* libp = getMapFromMaps(m, "main", "libPath"); 443 441 444 if (strlen (r_inputs->value) == 1 442 445 && strncasecmp (r_inputs->value, "C", 1) == 0) 443 { 444 r_inputs = getMap (request_inputs, "metapath"); 445 if (r_inputs != NULL) 446 sprintf (tmps1, "%s/%s", ntmp, r_inputs->value); 447 else 448 sprintf (tmps1, "%s/", ntmp); 449 char *altPath = zStrdup (tmps1); 450 r_inputs = getMap (s1->content, "ServiceProvider"); 451 sprintf (tmps1, "%s/%s", altPath, r_inputs->value); 452 free (altPath); 446 { 447 if (libp != NULL && libp->value != NULL) { 448 r_inputs = getMap (s1->content, "ServiceProvider"); 449 sprintf (tmps1, "%s/%s", libp->value, r_inputs->value); 450 } 451 else { 452 r_inputs = getMap (request_inputs, "metapath"); 453 if (r_inputs != NULL) 454 sprintf (tmps1, "%s/%s", ntmp, r_inputs->value); 455 else 456 sprintf (tmps1, "%s/", ntmp); 457 458 char *altPath = zStrdup (tmps1); 459 r_inputs = getMap (s1->content, "ServiceProvider"); 460 sprintf (tmps1, "%s/%s", altPath, r_inputs->value); 461 free (altPath); 462 } 453 463 #ifdef DEBUG 454 464 fprintf (stderr, "Trying to load %s\n", tmps1); … … 613 623 errstr = dlerror (); 614 624 #endif 615 sprintf (tmps, _(" C Library can't be loaded%s"), errstr);625 sprintf (tmps, _("Unable to load C Library %s"), errstr); 616 626 errorException(m,tmps,"InternalError",NULL); 617 627 *eres = -1; … … 739 749 map *r_inputs = getMapFromMaps (m, "main", "tmpPath"); 740 750 map *r_inputs1 = getMap (request_inputs, "metapath"); 751 741 752 int hasIn = -1; 742 753 if (r_inputs1 == NULL) … … 883 894 map *r_inputs = NULL; 884 895 map *request_inputs = *inputs; 896 #ifdef IGNORE_METAPATH 897 addToMap(request_inputs, "metapath", ""); 898 #endif 885 899 maps *m = NULL; 886 900 char *REQUEST = NULL; … … 901 915 #endif 902 916 r_inputs = getMapOrFill (&request_inputs, "metapath", ""); 903 904 917 905 918 char conf_file[10240]; … … 1093 1106 } 1094 1107 1095 1096 1108 maps *request_output_real_format = NULL; 1097 1109 map *tmpm = getMapFromMaps (m, "main", "serverAddress"); … … 1112 1124 r_inputs = NULL; 1113 1125 r_inputs = getMap (request_inputs, "metapath"); 1126 1114 1127 if (r_inputs != NULL) 1115 1128 snprintf (conf_dir, 1024, "%s/%s", ntmp, r_inputs->value); … … 1160 1173 if (dirp == NULL) 1161 1174 { 1162 errorException (m, _("The specified path path does n't exist."),1175 errorException (m, _("The specified path path does not exist."), 1163 1176 "InvalidParameterValue", conf_dir); 1164 1177 freeMaps (&m); … … 1375 1388 errorException (m, 1376 1389 _ 1377 (" Unenderstood <request> value. Please check that it was set to GetCapabilities, DescribeProcess orExecute."),1390 ("The <request> value was not recognized. Allowed values are GetCapabilities, DescribeProcess, and Execute."), 1378 1391 "InvalidParameterValue", "request"); 1379 1392 #ifdef DEBUG … … 1441 1454 sprintf (tmpMsg, 1442 1455 _ 1443 ("The value for <identifier> seems to be wrong (%s). Please , ensure that the process exist using theGetCapabilities request."),1456 ("The value for <identifier> seems to be wrong (%s). Please specify one of the processes in the list returned by a GetCapabilities request."), 1444 1457 r_inputs->value); 1445 1458 errorException (m, tmpMsg, "InvalidParameterValue", "identifier"); … … 2786 2799 snprintf (tmps, 1024, 2787 2800 _ 2788 ("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."),2801 ("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)."), 2789 2802 ptr->name, tmp1->value, i); 2790 2803 addToMap (tmpe, "locator", ptr->name); … … 2830 2843 snprintf (tmps, 1024, 2831 2844 _ 2832 ("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."),2845 ("The <%s> argument was not specified in DataInputs but is required according to the ZOO ServicesProvider configuration file."), 2833 2846 errp->value); 2834 2847 setMapArray (tmpe, "locator", nb , errp->value); … … 2856 2869 snprintf (tmps, 1024, 2857 2870 _ 2858 ("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."),2871 ("The <%s> argument specified as %s identifier was not recognized (not defined in the ZOO Configuration File)."), 2859 2872 errp->value, 2860 2873 ((getMap(request_inputs,"RawDataOutput")!=NULL)?"RawDataOutput":"ResponseDocument")); … … 3051 3064 errorException (m, 3052 3065 _ 3053 (" Status cannot be set to true with storeExecuteResponse to false. Please,modify your request parameters."),3066 ("The status parameter cannot be set to true if storeExecuteResponse is set to false. Please modify your request parameters."), 3054 3067 "InvalidParameterValue", "storeExecuteResponse"); 3055 3068 freeService (&s1); … … 3270 3283 int cpid = atoi (r_inputs->value); 3271 3284 r_inputs = getMapFromMaps (m, "main", "tmpPath"); 3272 map *r_inputs1 = getMap (s1->content, "ServiceProvider"); 3285 //map *r_inputs1 = getMap (s1->content, "ServiceProvider"); 3286 map* r_inputs1 = createMap("ServiceName", s1->name); 3287 3273 3288 fbkp = 3274 3289 (char *) … … 3357 3372 cpid, m, eres); 3358 3373 fflush (stdout); 3374 3359 3375 /** 3360 3376 * Ensure that if error occurs when freeing memory, no signal will return
Note: See TracChangeset
for help on using the changeset viewer.