Changeset 69 for trunk


Ignore:
Timestamp:
Jan 13, 2011, 1:40:10 AM (14 years ago)
Author:
djay
Message:

Fix XML request parser for embedded XML complex data. Handle Execute requests coming from the QGIS WPS Client plugin. Fix for Python support.

Location:
trunk/zoo-kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-kernel/service_internal_python.c

    r67 r69  
    22 * Author : Gérald FENOY
    33 *
    4  * Copyright (c) 2009-2010 GeoLabs SARL
     4 * Copyright (c) 2009-2011 GeoLabs SARL
    55 *
    66 * Permission is hereby granted, free of charge, to any person obtaining a copy
     
    337337        res=createMap(PyString_AsString(key),PyString_AsString(value));
    338338    }
    339     Py_DECREF(value);
    340339    Py_DECREF(key);
    341340  }
  • trunk/zoo-kernel/zoo_loader.c

    r32 r69  
    22 * Author : Gérald FENOY
    33 *
    4  *  Copyright 2008-2009 GeoLabs SARL. All rights reserved.
     4 *  Copyright 2008-2011 GeoLabs SARL. All rights reserved.
    55 *
    66 * Permission is hereby granted, free of charge, to any person obtaining a copy
     
    109109
    110110  map* tmpMap=NULL;
    111    
     111
    112112  if(strncmp(cgiContentType,"text/xml",8)==0){
    113113    char *buffer=new char[cgiContentLength+1];
     
    144144  }
    145145
     146  if(strncasecmp(cgiRequestMethod,"post",4)==0 && getMap(tmpMap,"request")==NULL){
     147    char *tmpKey=strdup(tmpMap->name);
     148    char *tmpValue=strdup(tmpMap->value);
     149    freeMap(&tmpMap);
     150    free(tmpMap);
     151    char* tmpValueFinal=(char*) malloc((strlen(tmpKey)+strlen(tmpValue)+2)*sizeof(char));
     152    sprintf(tmpValueFinal,"%s=%s",tmpKey,tmpValue);
     153    tmpMap=createMap("request",tmpValueFinal);
     154    free(tmpValueFinal);
     155  }
    146156  /**
    147157   * In case that the POST method was used, then check if params came in XML
  • trunk/zoo-kernel/zoo_service_loader.c

    r63 r69  
    22 * Author : Gérald FENOY
    33 *
    4  *  Copyright 2008-2009 GeoLabs SARL. All rights reserved.
     4 *  Copyright 2008-2011 GeoLabs SARL. All rights reserved.
    55 *
    66 * Permission is hereby granted, free of charge, to any person obtaining a copy
     
    13431343              }
    13441344              xmlChar* mv=xmlNodeListGetString(doc,cur4->xmlChildrenNode,1);
     1345              if(mv==NULL){
     1346                xmlDocPtr doc1=xmlNewDoc(BAD_CAST "1.0");
     1347                int buffersize;
     1348                xmlDocSetRootElement(doc1,cur4->xmlChildrenNode);
     1349                xmlDocDumpFormatMemoryEnc(doc1, &mv, &buffersize, "utf-8", 1);
     1350                char size[1024];
     1351                sprintf(size,"%d",buffersize);
     1352                addToMap(tmpmaps->content,"size",size);
     1353              }
    13451354              addToMap(tmpmaps->content,"value",(char*)mv);
    13461355              xmlFree(mv);
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