Changeset 640 for trunk/zoo-project/zoo-kernel/zoo_service_loader.c
- Timestamp:
- May 28, 2015, 4:25:06 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r634 r640 54 54 55 55 #include "service_internal.h" 56 #include "server_internal.h" 57 #include "response_print.h" 56 58 #include "request_parser.h" 59 #include "sqlapi.h" 57 60 58 61 #ifdef USE_PYTHON … … 1044 1047 r_inputs = getMap (request_inputs, "language"); 1045 1048 if (r_inputs == NULL) 1049 r_inputs = getMap (request_inputs, "AcceptLanguages"); 1050 if (r_inputs == NULL) 1046 1051 r_inputs = getMapFromMaps (m, "main", "language"); 1047 1052 if (r_inputs != NULL) … … 1141 1146 NULL 1142 1147 }; 1143 checkValidValue(request_inputs,&err," Request",(const char**)vvr,1);1148 checkValidValue(request_inputs,&err,"request",(const char**)vvr,1); 1144 1149 const char *vvs[]={ 1145 1150 "WPS", … … 1161 1166 } 1162 1167 checkValidValue(request_inputs,&err,"service",(const char**)vvs,1); 1168 1163 1169 const char *vvv[]={ 1164 1170 "1.0.0", 1171 "2.0.0", 1165 1172 NULL 1166 1173 }; … … 1172 1179 }else{ 1173 1180 checkValidValue(request_inputs,&err,"AcceptVersions",(const char**)vvv,-1); 1181 map* version=getMap(request_inputs,"AcceptVersions"); 1182 if(version!=NULL){ 1183 if(strstr(version->value,schemas[1][0])!=NULL) 1184 addToMap(request_inputs,"version",schemas[1][0]); 1185 else 1186 addToMap(request_inputs,"version",version->value); 1187 } 1174 1188 } 1189 map* version=getMap(request_inputs,"version"); 1190 if(version==NULL) 1191 version=getMapFromMaps(m,"main","version"); 1192 setMapInMaps(m,"main","rversion",version->value); 1175 1193 if(err!=NULL){ 1176 1194 printExceptionReportResponse (m, err); … … 1237 1255 r_inputs = NULL; 1238 1256 //r_inputs = getMap (request_inputs, "ServiceProvider"); 1239 xmlNodePtr n=printGetCapabilitiesHeader(doc,m); 1257 r_inputs = getMap (request_inputs, "version"); 1258 xmlNodePtr n=printGetCapabilitiesHeader(doc,m,(r_inputs!=NULL?r_inputs->value:"1.0.0")); 1240 1259 /** 1241 1260 * Here we need to close stdout to ensure that unsupported chars … … 1299 1318 xmlDocPtr doc = xmlNewDoc (BAD_CAST "1.0"); 1300 1319 r_inputs = NULL; 1320 r_inputs = getMap (request_inputs, "version"); 1321 map* version=getMapFromMaps(m,"main","rversion"); 1322 int vid=getVersionId(version->value); 1301 1323 xmlNodePtr n = printWPSHeader(doc,m,"DescribeProcess", 1302 "ProcessDescriptions");1324 root_nodes[vid][1],(r_inputs!=NULL?r_inputs->value:"1.0.0"),1); 1303 1325 1304 1326 r_inputs = getMap (request_inputs, "Identifier"); … … 1748 1770 * - usid : it is an unique identification number 1749 1771 * - sid : it is the process idenfitication number (OS) 1772 * - uusid : it is an universally unique identification number 1750 1773 * - status : value between 0 and 100 to express the completude of 1751 1774 * the operations of the running service … … 1777 1800 sprintf (tmpBuff, "%i", cpid); 1778 1801 addToMap (_tmpMaps->content, "sid", tmpBuff); 1802 char* tmpUuid=get_uuid(); 1803 addToMap (_tmpMaps->content, "uusid", tmpUuid); 1804 free(tmpUuid); 1779 1805 addToMap (_tmpMaps->content, "status", "0"); 1780 1806 addToMap (_tmpMaps->content, "cwd", ntmp);
Note: See TracChangeset
for help on using the changeset viewer.