ZOO-Project: response_print.c File Reference
ZOO-Project
response_print.c File Reference
#include "cpl_vsi.h"
#include "service.h"
#include "service_internal.h"
#include "server_internal.h"
#include "response_print.h"
#include <dlfcn.h>
#include "mimetypes.h"
#include "service_json.h"

Functions

void addPrefix (maps *pmsConf, map *pmLevel, service *psService)
 Add prefix to the service name. More...
 
void printHeaders (maps *pmsConf)
 Print the HTTP headers based on a map. More...
 
void printSessionHeaders (maps *pmsConf)
 Print the Set-Cookie header if necessary (conf["lenv"]["cookie"]) and save the session file. More...
 
void addLangAttr (xmlNodePtr n, maps *m)
 Add a land attribute to a XML node. More...
 
char * zCapitalize1 (char *tmp)
 Replace the first letter by its upper case version in a new char array. More...
 
char * zCapitalize (char *tmp)
 Replace all letters by their upper case version in a new char array. More...
 
int zooXmlSearchForNs (const char *name)
 Search for an existing XML namespace in usedNS. More...
 
int zooXmlAddNs (xmlNodePtr nr, const char *url, const char *name)
 Add an XML namespace to the usedNS if it was not already used. More...
 
void zooXmlCleanupNs ()
 Free allocated memory to store used XML namespace. More...
 
int zooXmlAddDoc (const char *value)
 Add a XML document to the iDocs. More...
 
void zooXmlCleanupDocs ()
 Free allocated memort to store XML documents. More...
 
xmlNodePtr soapEnvelope (maps *conf, xmlNodePtr n)
 Generate a SOAP Envelope node when required (if the isSoap key of the [main] section is set to true). More...
 
xmlNodePtr printWPSHeader (xmlDocPtr doc, maps *m, const char *req, const char *rname, const char *version, int reqId)
 Generate a WPS header. More...
 
void addLanguageNodes (maps *conf, xmlNodePtr n, xmlNsPtr ns, xmlNsPtr ns_ows)
 
xmlNodePtr printGetCapabilitiesHeader (xmlDocPtr doc, maps *m, const char *version="1.0.0")
 Generate a Capabilities header. More...
 
void printGetCapabilitiesForProcess (registry *reg, maps *m, void *doc0, void *nc0, service *serv)
 Generate a wps:Process node for a servie and add it to a given node. More...
 
void attachAttributes (xmlNodePtr n, xmlNsPtr ns, map *content, int vid, map *serviceType)
 Attach attributes to a ProcessDescription or a ProcessOffering node. More...
 
void addMetadata (map *meta, xmlDocPtr doc, xmlNodePtr nc, xmlNsPtr ns_ows, xmlNsPtr ns_xlink, int vid)
 Add a Metadata node to any existing node. More...
 
void addAdditionalParameters (map *meta, xmlDocPtr doc, xmlNodePtr nc, xmlNsPtr ns_ows, xmlNsPtr ns_xlink, int fromDb)
 Add AdditionalParameters nodes to any existing node. More...
 
void addInheritedMetadata (xmlNodePtr n, xmlNsPtr ns_ows, xmlNsPtr ns_xlink, registry *reg, maps *main_conf, service *serv)
 Add the ows:Metadata nodes relative to the profile registry. More...
 
void printDescribeProcessForProcess (registry *reg, maps *m, void *doc0, void *nc0, service *serv)
 Generate a ProcessDescription node for a servie and add it to a given node. More...
 
void printFullDescription (xmlDocPtr doc, int in, elements *elem, const char *type, xmlNsPtr ns, xmlNsPtr ns_ows, xmlNodePtr nc1, int vid, int fromDb, const map *serviceType)
 Generate the required XML tree for the detailled metadata information of inputs or outputs. More...
 
void printProcessResponse (maps *m, map *request, int pid, service *serv, const char *service, int status, maps *inputs, maps *outputs)
 Generate a wps:Execute XML document. More...
 
void printDocument (maps *m, xmlDocPtr doc, int pid)
 Print a XML document. More...
 
void printOutputDefinitions (xmlDocPtr doc, xmlNodePtr nc, xmlNsPtr ns_wps, xmlNsPtr ns_ows, elements *e, maps *m, const char *type)
 Print a XML document. More...
 
void printIOType (xmlDocPtr doc, xmlNodePtr nc, xmlNsPtr ns_wps, xmlNsPtr ns_ows, xmlNsPtr ns_xlink, elements *e, maps *m, const char *type, int vid)
 Generate XML nodes describing inputs or outputs metadata. More...
 
void printDescription (xmlNodePtr root, xmlNsPtr ns_ows, const char *identifier, map *amap, int vid=0)
 Create XML node with basic ows metadata information (Identifier,Title,Abstract) More...
 
const char * produceStatusString (maps *pmConf, map *pmCode)
 Produce the status string used in HTTP headers. More...
 
void _printExceptionReportResponse (maps *m, map *s)
 Print an OWS ExceptionReport Document and HTTP headers (when required) depending on the code. More...
 
void printExceptionReportResponse (maps *pmsConf, map *psService)
 Print an OWS ExceptionReport or exception.yaml Document and HTTP headers (when required) depending on the code. More...
 
xmlNodePtr createExceptionReportNode (maps *m, map *s, int use_ns)
 Create an OWS ExceptionReport Node. More...
 
int errorException (maps *m, const char *message, const char *errorcode, const char *locator)
 Print an OWS ExceptionReport. More...
 
char * produceFileUrl (service *psService, maps *pmsConf, maps *pmsOutputs, const char *pccFormat, int itn)
 Produce a copy file and the corresponding url in case it is required Please, free the returned ressource while used. More...
 
void outputResponse (service *s, maps *request_inputs, maps *request_outputs, map *request_inputs1, int cpid, maps *m, int res)
 Generate the output response (RawDataOutput or ResponseDocument) More...
 
void * printRawdataOutput (maps *conf, maps *outputs)
 Print one outputs as raw. More...
 
void printBoundingBox (xmlNsPtr ns_ows, xmlNodePtr n, map *boundingbox)
 Create required XML nodes for boundingbox and update the current XML node. More...
 
mapparseBoundingBox (const char *value)
 Parse a BoundingBox string. More...
 
void printBoundingBoxDocument (maps *m, maps *boundingbox, FILE *file)
 Print an ows:BoundingBox XML document. More...
 
void printStatusInfo (maps *conf, map *statusInfo, char *req)
 Print a StatusInfo XML document. More...
 

Function Documentation

void _printExceptionReportResponse ( maps m,
map s 
)

Print an OWS ExceptionReport Document and HTTP headers (when required) depending on the code.

Set hasPrinted value to true in the [lenv] section.

Parameters
mthe maps containing the settings of the main.cfg file
sthe map containing the text,code,locator keys (or a map array of the same keys)
void addAdditionalParameters ( map meta,
xmlDocPtr  doc,
xmlNodePtr  nc,
xmlNsPtr  ns_ows,
xmlNsPtr  ns_xlink,
int  fromDb 
)

Add AdditionalParameters nodes to any existing node.

Parameters
metathe map defining the additional parameters
docthe XML document used
nbthe node to add the additional parameters
ns_owsthe OWS namespace
ns_xlinkthe xlink namespace
fromDb1 if the metadata has been extracted from the metadb, 0 otherwise
void addInheritedMetadata ( xmlNodePtr  n,
xmlNsPtr  ns_ows,
xmlNsPtr  ns_xlink,
registry reg,
maps main_conf,
service serv 
)

Add the ows:Metadata nodes relative to the profile registry.

Parameters
nthe XML node to add the ows:Metadata
ns_owsthe ows XML namespace
ns_xlinkthe ows xlink namespace
regthe profile registry
main_confthe map containing the main configuration content
servthe service
void addLangAttr ( xmlNodePtr  n,
maps m 
)

Add a land attribute to

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