- Main Page
- Data Structures
- Files

- File List
- Globals

# jasperserver/services.h File Reference

`#include "stringbuffer.h"`
`#include "repository.h"`

Go to the source code of this file.

## Functions
jasperserver_operation_result_t * | jasperserver_ws_list (jasperserver_server_t *server, jasperserver_request_t *request)
| List service.
jasperserver_operation_result_t * | jasperserver_ws_delete (jasperserver_server_t *server, jasperserver_request_t *request)
| Delete service.
jasperserver_operation_result_t * | jasperserver_ws_get (jasperserver_server_t *server, jasperserver_request_t *request, char *filename)
| Get service.
jasperserver_operation_result_t * | jasperserver_ws_runReport (jasperserver_server_t *server, jasperserver_request_t *request, char *filename)
| RunReport service.
jasperserver_operation_result_t * | jasperserver_ws_put (jasperserver_server_t *server, jasperserver_request_t *request, char *filename)
| Put service.

## Function Documentation

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.