jasperserver/services.c File Reference

#include <stdio.h>
#include "services.h"
#include "marshaller.h"
#include "unmarshaller.h"
#include "soap/soapH.h"
#include "soap/repositorySoapBinding.nsmap"

Go to the source code of this file.

Functions

void jasperserver_store_soap_error (jasperserver_operation_result_t *response, struct soap *soap)
void jasperserver_init_soap (jasperserver_server_t *server, struct soap *soap)
void jasperserver_end_soap (struct soap *soap)
jasperserver_string_tjasperserver_get_file_parent (char *path)
jasperserver_operation_result_tjasperserver_ws_list (jasperserver_server_t *server, jasperserver_request_t *request)
 List service.
jasperserver_operation_result_tjasperserver_ws_delete (jasperserver_server_t *server, jasperserver_request_t *request)
 Delete service.
jasperserver_operation_result_tjasperserver_ws_get (jasperserver_server_t *server, jasperserver_request_t *request, char *filename)
 Get service.
jasperserver_operation_result_tjasperserver_ws_runReport (jasperserver_server_t *server, jasperserver_request_t *request, char *filename)
 RunReport service.
jasperserver_operation_result_tjasperserver_ws_put (jasperserver_server_t *server, jasperserver_request_t *request, char *filename)
 Put service.


Function Documentation

void jasperserver_end_soap ( struct soap *  soap  ) 

Definition at line 40 of file services.c.

jasperserver_string_t* jasperserver_get_file_parent ( char *  path  ) 

Definition at line 48 of file services.c.

void jasperserver_init_soap ( jasperserver_server_t server,
struct soap *  soap 
)

Definition at line 32 of file services.c.

void jasperserver_store_soap_error ( jasperserver_operation_result_t response,
struct soap *  soap 
)

Definition at line 394 of file services.c.

jasperserver_operation_result_t* jasperserver_ws_delete ( jasperserver_server_t server,
jasperserver_request_t request 
)

Delete service.

This function delete the resource pointed by the request. The URL and credentials used to connect to the server are passed using the server structure. The user is responsible to free the returned jasperserver_operation_result_t.

If a terrible error occurs, the returned jasperserver_operation_result_t can be NULL

Parameters:
server A jasperserver_server_t struct with the information to connect to the server
request The request
Returns:
a jasperserver_operation_result_t pointer or NULL if something of terrible is happen.
Warning:
Don't try to delete the root resource, since it will be removed all the content of your repository!

Definition at line 124 of file services.c.

jasperserver_operation_result_t* jasperserver_ws_get ( jasperserver_server_t server,
jasperserver_request_t request,
char *  filename 
)

Get service.

This function get a resource from the repository. The URL and credentials used to connect to the server are passed using the server structure. The user is responsible to free the returned jasperserver_operation_result_t. If the resource contains data, it can be stored in a file passed as argument.

If a terrible error occurs, the returned jasperserver_operation_result_t can be NULL

Parameters:
server A jasperserver_server_t struct with the information to connect to the server
request The request
filename optional file to store the resource content
Returns:
a jasperserver_operation_result_t pointer or NULL if something of terrible is happen.

Definition at line 166 of file services.c.

jasperserver_operation_result_t* jasperserver_ws_list ( jasperserver_server_t server,
jasperserver_request_t request 
)

List service.

This function execute the list service passing as input the request structure. The URL and credentials used to connect to the server are passed using the server structure. The user is responsible to free the returned jasperserver_operation_result_t.

If a terrible error occurs, the returned jasperserver_operation_result_t can be NULL

Parameters:
server A jasperserver_server_t struct with the information to connect to the server
request The request
Returns:
a jasperserver_operation_result_t pointer or NULL if something of terrible is happen.

Definition at line 82 of file services.c.

jasperserver_operation_result_t* jasperserver_ws_put ( jasperserver_server_t server,
jasperserver_request_t request,
char *  filename 
)

Put service.

This function is used to put or modify a resource in the repository. The URL and credentials used to connect to the server are passed using the server structure. The user is responsible to free the returned jasperserver_operation_result_t. If the resource requires data, a file can be attached to the SOAP message. The file is streammed, so don't warry about the size.

If a terrible error occurs, the returned jasperserver_operation_result_t can be NULL

Parameters:
server A jasperserver_server_t struct with the information to connect to the server
request The request
filename optional file to attach
Returns:
a jasperserver_operation_result_t pointer or NULL if something of terrible is happen.

Definition at line 336 of file services.c.

jasperserver_operation_result_t* jasperserver_ws_runReport ( jasperserver_server_t server,
jasperserver_request_t request,
char *  filename 
)

RunReport service.

This function run a report unit. The URL and credentials used to connect to the server are passed using the server structure. The user is responsible to free the returned jasperserver_operation_result_t. The returned report can be saved in a file passed as argument. If there are more than a single attachment, all the attachments with id different thatn <report> and starting with <img are stored in a directory called images created in the directory of filename.

If the report requires parameters, they must be added to the resource in the request.

If a terrible error occurs, the returned jasperserver_operation_result_t can be NULL

Parameters:
server A jasperserver_server_t struct with the information to connect to the server
request The request
filename optional file to store the generated report
Returns:
a jasperserver_operation_result_t pointer or NULL if something of terrible is happen.

Definition at line 230 of file services.c.


Generated on Wed Apr 18 16:55:54 2007 for JasperServer C webservices by  doxygen 1.5.2