- Timestamp:
- Feb 25, 2018, 2:49:04 PM (7 years ago)
- Location:
- trunk/zoo-project/zoo-kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in
r811 r866 101 101 MONO_FILE=@MONO_FILE@ 102 102 103 CFLAGS= @RELY_ON_DB@ @DEB_DEF@ -fpic @OPENSSL_CFLAGS@ ${FCGI_CFLAGS} ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF103 CFLAGS=-Wdeclaration-after-statement @RELY_ON_DB@ @DEB_DEF@ -fpic @OPENSSL_CFLAGS@ ${FCGI_CFLAGS} ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF 104 104 LDFLAGS=-lzoo_service @DEFAULT_LIBS@ -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS} ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS} ${FCGI_LDFLAGS} @OPENSSL_LDFLAGS@ -luuid ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${MACOS_LD_NET_FLAGS} ${YAML_LDFLAGS} ${OTBLDFLAGS} ${SAGA_LDFLAGS} ${MONO_LDFLAGS} 105 105 -
trunk/zoo-project/zoo-kernel/request_parser.c
r836 r866 997 997 &buffersize, 998 998 "utf-8", 0); 999 xmlFreeDoc (doc1); 999 1000 } 1000 1001 else … … 1012 1013 addIntToMap (tmpmaps->content, "size", 1013 1014 buffersize); 1014 xmlFreeDoc (doc1);1015 1015 }else{ 1016 xmlNodePtr cur5 = cur4->children; 1017 while (cur5 != NULL 1018 && cur5->type != XML_CDATA_SECTION_NODE) 1019 cur5 = cur5->next; 1020 if (cur5 != NULL 1021 && cur5->type == XML_CDATA_SECTION_NODE){ 1022 xmlFree(mv); 1023 mv=xmlStrdup(cur5->content); 1016 if(xmlStrcasecmp 1017 (cur4->name, BAD_CAST "BoundingBoxData") == 0){ 1018 xmlDocPtr doc1 = xmlNewDoc(BAD_CAST "1.0"); 1019 int buffersize; 1020 xmlDocSetRootElement(doc1,cur4); 1021 xmlDocDumpFormatMemoryEnc(doc1,&mv, 1022 &buffersize, 1023 "utf-8",0); 1024 addIntToMap (tmpmaps->content, "size", 1025 buffersize); 1026 xmlParseBoundingBox(main_conf,&tmpmaps->content,doc1); 1027 }else{ 1028 xmlNodePtr cur5 = cur4->children; 1029 while (cur5 != NULL 1030 && cur5->type != XML_CDATA_SECTION_NODE) 1031 cur5 = cur5->next; 1032 if (cur5 != NULL 1033 && cur5->type == XML_CDATA_SECTION_NODE){ 1034 xmlFree(mv); 1035 mv=xmlStrdup(cur5->content); 1036 } 1024 1037 } 1025 1038 } … … 1092 1105 } 1093 1106 return 1; 1107 } 1108 1109 /** 1110 * Parse a BoundingBoxData node 1111 * 1112 * http://schemas.opengis.net/ows/1.1.0/owsCommon.xsd: BoundingBoxType 1113 * 1114 * A map to store boundingbox information will contain: 1115 * - LowerCorner : double double (minimum within this bounding box) 1116 * - UpperCorner : double double (maximum within this bounding box) 1117 * - crs : URI (Reference to definition of the CRS) 1118 * - dimensions : int 1119 * 1120 * @param main_conf the conf maps containing the main.cfg settings 1121 * @param request_inputs the map storing KVP raw value 1122 * @param doc the xmlDocPtr containing the BoudingoxData node 1123 * @return a map containing all the bounding box keys 1124 */ 1125 int xmlParseBoundingBox(maps** main_conf,map** current_input,xmlDocPtr doc){ 1126 xmlNode *root_element = xmlDocGetRootElement(doc); 1127 for(xmlAttrPtr attr = root_element->properties; NULL != attr; attr = attr->next){ 1128 xmlChar *val = xmlGetProp (root_element, BAD_CAST attr->name); 1129 addToMap(*current_input,(char*)attr->name,(char*)val); 1130 xmlFree(val); 1131 xmlNodePtr cur = root_element->children; 1132 while(cur!=NULL && cur->type != XML_ELEMENT_NODE) 1133 cur=cur->next; 1134 while(cur!=NULL && cur->type==XML_ELEMENT_NODE){ 1135 xmlChar *val = 1136 xmlNodeListGetString (doc, cur->xmlChildrenNode, 1); 1137 addToMap(*current_input,(char*)cur->name,(char*)val); 1138 cur=cur->next; 1139 xmlFree(val); 1140 while(cur!=NULL && cur->type != XML_ELEMENT_NODE) 1141 cur=cur->next; 1142 } 1143 } 1094 1144 } 1095 1145 -
trunk/zoo-project/zoo-kernel/request_parser.h
r767 r866 42 42 void ensureDecodedBase64(maps**); 43 43 int kvpParseInputs(maps**,service*,map*,maps**,HINTERNET*); 44 int xmlParseBoundingBox(maps**,map**,xmlDocPtr); 44 45 int kvpParseOutputs(maps**,map *,maps**); 45 46 int xmlParseInputs(maps**,service*,maps**,xmlDocPtr,xmlNodeSet*,HINTERNET*);
Note: See TracChangeset
for help on using the changeset viewer.