Changeset 625 for trunk/zoo-project
- Timestamp:
- Apr 10, 2015, 11:12:37 PM (10 years ago)
- Location:
- trunk/zoo-project
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-api/js/ZOO-api.js
r502 r625 3671 3671 var outputs = node.*::ProcessOutputs.*::Output; 3672 3672 if (outputs.length() > 0) { 3673 var data = outputs[0].*::Data.*::*[0]; 3674 var builder = this.parseData[data.localName().toLowerCase()]; 3675 if (builder) 3676 return builder.apply(this,[data]); 3677 else 3678 return null; 3673 var res=[]; 3674 for(var i=0;i<outputs.length();i++){ 3675 var data = outputs[i].*::Data.*::*[0]; 3676 if(!data){ 3677 data = outputs[i].*::Reference; 3678 } 3679 var builder = this.parseData[data.localName().toLowerCase()]; 3680 if (builder) 3681 res.push(builder.apply(this,[data])); 3682 else 3683 res.push(null); 3684 } 3685 return res.length>1?res:res[0]; 3679 3686 } else 3680 3687 return null; … … 3734 3741 */ 3735 3742 'reference': function(node) { 3736 var result = {type:'reference',value:node. *::href};3743 var result = {type:'reference',value:node.@href}; 3737 3744 return result; 3738 3745 } -
trunk/zoo-project/zoo-kernel/request_parser.c
r623 r625 146 146 if (r_inputs != NULL){ 147 147 //snprintf (cursor_input, 40960, "%s", r_inputs->value); 148 cursor_input = zStrdup (r_inputs->value); 148 if(strstr(r_inputs->value,"=")==NULL) 149 cursor_input = url_decode (r_inputs->value); 150 else 151 cursor_input = zStrdup (r_inputs->value); 149 152 int j = 0; 150 153 … … 1181 1184 int xmlParseRequest(maps** main_conf,const char* post,map** request_inputs,service* s,maps** inputs,maps** outputs,HINTERNET* hInternet){ 1182 1185 xmlInitParser (); 1183 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);1184 1186 xmlDocPtr doc = xmlParseMemory (post, cgiContentLength); 1185 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);1186 1187 1187 1188 /** … … 1198 1199 } 1199 1200 xmlXPathFreeObject (tmpsptr); 1200 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);1201 1201 1202 1202 // Extract ResponseDocument / RawDataOutput from the XML Request 1203 1203 tmpsptr = 1204 1204 extractFromDoc (doc, "/*/*/*[local-name()='ResponseDocument']"); 1205 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);1206 1205 bool asRaw = false; 1207 1206 tmps = tmpsptr->nodesetval; 1208 1207 if (tmps->nodeNr == 0) 1209 1208 { 1210 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);1211 1209 xmlXPathFreeObject (tmpsptr); 1212 1210 tmpsptr = … … 1216 1214 } 1217 1215 if(tmps->nodeNr != 0){ 1218 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);1219 1216 if(xmlParseOutputs(main_conf,request_inputs,outputs,doc,tmps->nodeTab[0],asRaw)<0){ 1220 1217 xmlXPathFreeObject (tmpsptr); … … 1224 1221 } 1225 1222 } 1226 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);1227 1223 xmlXPathFreeObject (tmpsptr); 1228 1224 xmlFreeDoc (doc);
Note: See TracChangeset
for help on using the changeset viewer.