ZOO-Project: response_print.h File Reference
ZOO-Project
response_print.h File Reference
#include <libintl.h>
#include <locale.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/sem.h>
#include <stdio.h>
#include <time.h>
#include <ctype.h>
#include "service.h"
#include <openssl/sha.h>
#include <openssl/md5.h>
#include <openssl/hmac.h>
#include <openssl/evp.h>
#include <openssl/bio.h>
#include <openssl/buffer.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include "cgic.h"

Go to the source code of this file.

Macros

#define DEFAULT_SERVICE_URL   "http://www.zoo-project.org/"
 The default service url (overriden by serverAddress) More...
 
#define TIME_SIZE   40
 The time size. More...
 
#define _(String)   dgettext ("zoo-kernel",String)
 ZOO-Kernel internal messages translation function. More...
 
#define _ss(String)   dgettext ("zoo-services",String)
 ZOO-Services messages translation function. More...
 
#define ZOO_LOCK_CREATE_FAILED   -4
 ZOO-Kernel was unable to create a lock. More...
 
#define ZOO_LOCK_ACQUIRE_FAILED   -5
 ZOO-Kernel was unable to acquire a lock. More...
 
#define ZOO_LOCK_RELEASE_FAILED   -6
 ZOO-Kernel was unable to release a lock. More...
 
#define ZOO_NS_MAX   10
 Maximum number of XML namespaces. More...
 
#define ZOO_DOC_MAX   20
 Maximum number of XML docs. More...
 

Functions

void addLangAttr (xmlNodePtr, maps *)
 Add a land attribute to a XML node. More...
 
void printHeaders (maps *)
 Print the HTTP headers based on a map. More...
 
void printSessionHeaders (maps *)
 Print the Set-Cookie header if necessary (conf["lenv"]["cookie"]) and save the session file. More...
 
int zooXmlSearchForNs (const char *)
 Search for an existing XML namespace in usedNS. More...
 
int zooXmlAddNs (xmlNodePtr, const char *, const char *)
 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 (xmlNodePtr, const char *, const char *)
 
void zooXmlCleanupDocs ()
 Free allocated memort to store XML documents. More...
 
const char * produceStatusString (maps *, map *)
 Produce the status string used in HTTP headers. More...
 
void printExceptionReportResponse (maps *, map *)
 Print an OWS ExceptionReport or exception.yaml Document and HTTP headers (when required) depending on the code. More...
 
xmlNodePtr createExceptionReportNode (maps *, map *, int)
 Create an OWS ExceptionReport Node. More...
 
void printProcessResponse (maps *, map *, int, service *, const char *, int, maps *, maps *)
 Generate a wps:Execute XML document. More...
 
xmlNodePtr printWPSHeader (xmlDocPtr, maps *, const char *, const char *, const char *, int)
 Generate a WPS header. More...
 
xmlNodePtr printGetCapabilitiesHeader (xmlDocPtr, maps *, const char *)
 Generate a Capabilities header. More...
 
void printGetCapabilitiesForProcess (registry *, maps *, void *, void *, service *)
 Generate a wps:Process node for a servie and add it to a given node. More...
 
void printDescribeProcessForProcess (registry *, maps *, void *, void *, service *)
 Generate a ProcessDescription node for a servie and add it to a given node. More...
 
void printFullDescription (xmlDocPtr, int, elements *, const char *, xmlNsPtr, xmlNsPtr, xmlNodePtr, int, int, const map *)
 Generate the required XML tree for the detailled metadata information of inputs or outputs. More...
 
void printDocument (maps *, xmlDocPtr, int)
 Print a XML document. More...
 
void printDescription (xmlNodePtr, xmlNsPtr, const char *, map *, int)
 Create XML node with basic ows metadata information (Identifier,Title,Abstract) More...
 
void printIOType (xmlDocPtr, xmlNodePtr, xmlNsPtr, xmlNsPtr, xmlNsPtr, elements *, maps *, const char *, int)
 Generate XML nodes describing inputs or outputs metadata. More...
 
void * printRawdataOutput (maps *, maps *)
 Print one outputs as raw. More...
 
mapparseBoundingBox (const char *)
 Parse a BoundingBox string. More...
 
void printBoundingBox (xmlNsPtr, xmlNodePtr, map *)
 Create required XML nodes for boundingbox and update the current XML node. More...
 
void printBoundingBoxDocument (maps *, maps *, FILE *)
 Print an ows:BoundingBox XML document. More...
 
void printOutputDefinitions (xmlDocPtr, xmlNodePtr, xmlNsPtr, xmlNsPtr, elements *, maps *, const char *)
 Print a XML document. More...
 
void printStatusInfo (maps *, map *, char *)
 Print a StatusInfo XML document. More...
 
void addAdditionalParameters (map *, xmlDocPtr, xmlNodePtr, xmlNsPtr, xmlNsPtr, int)
 Add AdditionalParameters nodes to any existing node. More...
 
void addMetadata (map *, xmlDocPtr, xmlNodePtr, xmlNsPtr, xmlNsPtr, int)
 Add a Metadata node to any existing node. More...
 
char * produceFileUrl (service *, maps *, maps *, const char *, int)
 Produce a copy file and the corresponding url in case it is required Please, free the returned ressource while used. More...
 
void outputResponse (service *, maps *, maps *, map *, int, maps *, int)
 Generate the output response (RawDataOutput or ResponseDocument) More...
 
int errorException (maps *, const char *, const char *, const char *)
 Print an OWS ExceptionReport. More...
 
xmlNodePtr soapEnvelope (maps *, xmlNodePtr)
 Generate a SOAP Envelope node when required (if the isSoap key of the [main] section is set to true). More...
 
int checkForSoapEnvelope (xmlDocPtr)
 

Variables

static char * SERVICE_URL
 Global char* to store the serverAddress value of the [main] section. More...
 
static xmlNsPtr usedNs [ZOO_NS_MAX]
 Array of xmlNsPtr storing all used XML namespace. More...
 
static char * nsName [ZOO_NS_MAX]
 Array storing names of the used XML namespace. More...
 
static int nbNs =0
 Number of XML namespaces. More...
 
static xmlDocPtr iDocs [ZOO_DOC_MAX]
 Array of xmlDocPtr storing XML docs. More...
 
static int nbDocs =0
 Number of XML docs. More...
 
static char wpsStatus [3][11]
 Definitions of acceptable final status. More...
 
static const char * schemas [2][8]
 Definitions of schemas depending on the WPS version. More...
 
static int nbSupportedRequests =7
 Definitions of support requests (depending on the WPS version) More...
 
static const char * requests [2][7]
 Definitions of requests depending on the WPS version. More...
 
static int nbReqIdentifier =2
 Definitions requests requiring identifier (depending on the WPS version) More...
 
static int nbReqJob =3
 Definitions requests requiring jobid (only for WPS version 2.0.0) More...
 
static const char * root_nodes [2][4]
 Definitions of root node for response depending on the request and the WPS version. More...
 
static const char * capabilities [2][7]
 Name and corresponding attributes depending on the WPS version. More...
 
static const char *const aapccStatusCodes [][8]
 

Macro Definition Documentation

#define _ (   String)    dgettext ("zoo-kernel",String)

ZOO-Kernel internal messages translation function.

#define _ss (   String)    dgettext ("zoo-services",String)

ZOO-Services messages translation function.

#define DEFAULT_SERVICE_URL   "http://www.zoo-project.org/"

The default service url (overriden by serverAddress)

#define TIME_SIZE   40

The time size.

#define ZOO_DOC_MAX   20

Maximum number of XML docs.

#define ZOO_LOCK_ACQUIRE_FAILED   -5

ZOO-Kernel was unable to acquire a lock.

#define ZOO_LOCK_CREATE_FAILED   -4

ZOO-Kernel was unable to create a lock.

#define ZOO_LOCK_RELEASE_FAILED   -6

ZOO-Kernel was unable to release a lock.

#define ZOO_NS_MAX   10

Maximum number of XML namespaces.

Function Documentation

void addAdditionalParameters ( map meta,
xmlDocPtr  doc,
xmlNodePtr  nc,
xmlNsPtr  ns_ows,
xmlNsPtr  ns_xlink,

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