Changeset 718


Ignore:
Timestamp:
Jul 1, 2015, 12:25:29 AM (4 years ago)
Author:
djay
Message:

Fix parsing issue with GetResult?, GetStatus? and Dismiss POST requests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/zoo_loader.c

    r682 r718  
    250250        xmlFree(tval);
    251251      }
    252       const char* requests[3]={"GetCapabilities","DescribeProcess","Execute"};
    253       for(int j=0;j<3;j++){
     252      const char* requests[6]={"GetCapabilities","DescribeProcess","Execute","GetStatus","GetResult","Dismiss"};
     253      for(int j=0;j<6;j++){
    254254        char tt[128];
    255255        sprintf(tt,"/*[local-name()='%s']",requests[j]);
     
    264264              free(t1->value);
    265265            t1->value=zStrdup(requests[j]);
    266             j=2;
     266            j=5;
    267267          }
    268268          xmlXPathFreeObject(reqptr);
     
    320320            }
    321321            xmlXPathFreeObject(idptr);
    322             addToMap(tmpMap,"Identifier",identifiers);
     322            if(identifiers[0]!=0)
     323              addToMap(tmpMap,"Identifier",identifiers);
    323324            free(identifiers);
    324325          }
    325         }else{
     326        }
     327        if(getMap(tmpMap,"Identifier")==NULL){
    326328          idptr=extractFromDoc(doc,"/*/*[local-name()='JobID']");
    327329          if(idptr!=NULL){
     
    332334              identifiers[0]=0;
    333335              for(int k=0;k<id->nodeNr;k++){
    334                 xmlChar* content=xmlNodeListGetString(doc, id->nodeTab[k]->xmlChildrenNode,1);
    335                 if(strlen(identifiers)>0){
    336                   char *tmp=zStrdup(identifiers);
    337                   snprintf(identifiers,strlen(tmp)+xmlStrlen(content)+2,"%s,%s",tmp,content);
    338                   free(tmp);
    339                 }
    340                 else{
    341                   snprintf(identifiers,xmlStrlen(content)+1,"%s",content);
    342                 }
    343                 xmlFree(content);
     336                  xmlChar* content=xmlNodeListGetString(doc, id->nodeTab[k]->xmlChildrenNode,1);
     337                  if(strlen(identifiers)>0){
     338                    char *tmp=zStrdup(identifiers);
     339                    snprintf(identifiers,strlen(tmp)+xmlStrlen(content)+2,"%s,%s",tmp,content);
     340                    free(tmp);
     341                  }
     342                  else{
     343                    snprintf(identifiers,xmlStrlen(content)+1,"%s",content);
     344                  }
     345                  xmlFree(content);
    344346              }
    345347              xmlXPathFreeObject(idptr);
    346               addToMap(tmpMap,"JobID",identifiers);
     348              if(identifiers[0]!=0)
     349                addToMap(tmpMap,"JobID",identifiers);
    347350              free(identifiers);
    348351            }
    349         }
     352          }
    350353        }
    351354      }
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png