ZOO-Project
Macros | Functions
zoo_loader.c File Reference
#include "fcgio.h"
#include "fcgi_config.h"
#include "fcgi_stdio.h"
#include <sys/types.h>
#include <unistd.h>
#include "service_internal.h"
#include "response_print.h"
#include "cgic.h"
#include <libxml/tree.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include "request_parser.h"

Macros

#define MALLOC_CHECK_   0
 
#define MALLOC_CHECK   0
 
#define TRUE   1
 
#define FALSE   -1
 

Functions

int runRequest (map **)
 Specific includes. More...
 
int cgiInit ()
 
int cgiMain ()
 Main entry point for cgic. More...
 

Macro Definition Documentation

#define FALSE   -1
#define MALLOC_CHECK   0
#define MALLOC_CHECK_   0
#define TRUE   1

Function Documentation

int cgiInit ( )
int cgiMain ( )

Main entry point for cgic.

Returns
0 on sucess.

We'll use cgiOut as the default output (stdout) to produce plain text response.

In case that the POST method was used, then check if params came in XML format else try to use the attribute "request" which should be the only one.

Store the original XML request in xrequest map

int runRequest ( map **  inputs)

Specific includes.

Specific includes.

Parameters
inputsthe request parameters map
Returns
0 on sucess, other value on failure
See also
conf_read,recursReaddirF

Parsing service specfic configuration file

Manage our own error log file (usefull to separate standard apache debug messages from the ZOO-Kernel ones but also for IIS users to avoid wrong headers messages returned by the CGI due to wrong redirection of stderr)

Language gesture

Here we need to close stdout to ensure that unsupported chars has been found in the zcfg and then printed on stdout

Loop over Identifier list

Create the input and output maps data structure

05-007r7 WPS 1.0.0 page 57 : 'If status="true" and storeExecuteResponse is "false" then the service shall raise an exception.'

error server don't accept the process need to output a valid error response here !!!

Ensure that if error occurs when freeing memory, no signal will return an ExceptionReport document as the result was already returned to the client.