Ignore:
Timestamp:
May 28, 2015, 4:25:06 PM (9 years ago)
Author:
djay
Message:

First version including zoo_service shared library

File:
1 edited

Legend:

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

    r634 r640  
    5454
    5555#include "service_internal.h"
     56#include "server_internal.h"
     57#include "response_print.h"
    5658#include "request_parser.h"
     59#include "sqlapi.h"
    5760
    5861#ifdef USE_PYTHON
     
    10441047  r_inputs = getMap (request_inputs, "language");
    10451048  if (r_inputs == NULL)
     1049    r_inputs = getMap (request_inputs, "AcceptLanguages");
     1050  if (r_inputs == NULL)
    10461051    r_inputs = getMapFromMaps (m, "main", "language");
    10471052  if (r_inputs != NULL)
     
    11411146    NULL
    11421147  };
    1143   checkValidValue(request_inputs,&err,"Request",(const char**)vvr,1);
     1148  checkValidValue(request_inputs,&err,"request",(const char**)vvr,1);
    11441149  const char *vvs[]={
    11451150    "WPS",
     
    11611166  }
    11621167  checkValidValue(request_inputs,&err,"service",(const char**)vvs,1);
     1168
    11631169  const char *vvv[]={
    11641170    "1.0.0",
     1171    "2.0.0",
    11651172    NULL
    11661173  };
     
    11721179  }else{
    11731180    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    }
    11741188  }
     1189  map* version=getMap(request_inputs,"version");
     1190  if(version==NULL)
     1191    version=getMapFromMaps(m,"main","version");
     1192  setMapInMaps(m,"main","rversion",version->value);
    11751193  if(err!=NULL){
    11761194    printExceptionReportResponse (m, err);
     
    12371255      r_inputs = NULL;
    12381256      //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"));
    12401259      /**
    12411260       * Here we need to close stdout to ensure that unsupported chars
     
    12991318          xmlDocPtr doc = xmlNewDoc (BAD_CAST "1.0");
    13001319          r_inputs = NULL;
     1320          r_inputs = getMap (request_inputs, "version");
     1321          map* version=getMapFromMaps(m,"main","rversion");
     1322          int vid=getVersionId(version->value);
    13011323          xmlNodePtr n = printWPSHeader(doc,m,"DescribeProcess",
    1302                                         "ProcessDescriptions");
     1324                                        root_nodes[vid][1],(r_inputs!=NULL?r_inputs->value:"1.0.0"),1);
    13031325
    13041326          r_inputs = getMap (request_inputs, "Identifier");
     
    17481770   *  - usid : it is an unique identification number
    17491771   *  - sid : it is the process idenfitication number (OS)
     1772   *  - uusid : it is an universally unique identification number
    17501773   *  - status : value between 0 and 100 to express the  completude of
    17511774   * the operations of the running service
     
    17771800  sprintf (tmpBuff, "%i", cpid);
    17781801  addToMap (_tmpMaps->content, "sid", tmpBuff);
     1802  char* tmpUuid=get_uuid();
     1803  addToMap (_tmpMaps->content, "uusid", tmpUuid);
     1804  free(tmpUuid);
    17791805  addToMap (_tmpMaps->content, "status", "0");
    17801806  addToMap (_tmpMaps->content, "cwd", ntmp);
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