|
Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
The configuration data for a WebService. More...
#include <web_service_util.h>
Public Member Functions | |
| bool | InitWebServiceData (WebServiceData *const data_p, json_t *op_json_p) |
| Initialise a WebServiceData. More... | |
| void | ClearWebServiceData (WebServiceData *const data_p) |
| Clear a WebServiceData and free any associated memory. More... | |
| bool | CallCurlWebservice (WebServiceData *data_p) |
| Make the request to the web service uri and store the response. More... | |
| bool | AddParametersToGetWebService (WebServiceData *data_p, ParameterSet *param_set_p) |
| Add parameters to the HTTP GET request used by the given WebServiceData. More... | |
| bool | AddParametersToPostWebService (WebServiceData *data_p, ParameterSet *param_set_p) |
| Add parameters to the HTTP POST request used by the given WebServiceData. More... | |
| bool | AddParametersToBodyWebService (WebServiceData *data_p, ParameterSet *param_set_p) |
| Add parameters to an HTTP POST request with a JSON fragment in its body used by the given WebServiceData. More... | |
Data Fields | |
| ServiceData | wsd_base_data |
| The base ServiceData. More... | |
| json_t * | wsd_config_p |
| The configuration from the reference service. More... | |
| const char * | wsd_name_s |
| The name of the WebService. More... | |
| const char * | wsd_description_s |
| The description of the WebService. More... | |
| const char * | wsd_alias_s |
| The alias of the WebService. More... | |
| const char * | wsd_info_uri_s |
| The uri for more information about this WebService. More... | |
| ParameterSet * | wsd_params_p |
| The ParameterSet for this WebService. More... | |
| ByteBuffer * | wsd_buffer_p |
| This is used to store the data when building the submission uri. More... | |
| const char * | wsd_base_uri_s |
| The uri that the WebService will submit its query to. More... | |
| SubmissionMethod | wsd_method |
| The SubmissionMethod to use to submit the query. More... | |
| CurlTool * | wsd_curl_data_p |
| The CurlTool used to send the request and receive the results. More... | |
Data Fields inherited from ServiceData | |
| struct Service * | sd_service_p |
| The service that owns this data. More... | |
| json_t * | sd_config_p |
| If this service has an entry in global server config it will be stored here. More... | |
| bool | sd_config_flag |
| If this is true, then this ServiceData will decrease the reference count on sd_config_p when this ServiceData is freed. More... | |
The configuration data for a WebService.
This is used by reference services to call web services.
| bool InitWebServiceData | ( | WebServiceData *const | data_p, |
| json_t * | op_json_p | ||
| ) |
Initialise a WebServiceData.
| data_p | The WebServiceData to initialise. |
| op_json_p | The JSON fragment for the reference service which will be used to initialise the WebServiceData. |
true if successful, false otherwise. | void ClearWebServiceData | ( | WebServiceData *const | data_p | ) |
Clear a WebServiceData and free any associated memory.
| data_p | The WebServiceData to clear. |
| bool CallCurlWebservice | ( | WebServiceData * | data_p | ) |
Make the request to the web service uri and store the response.
| data_p | The WebServiceData to make the request for. |
true if successful, false otherwise. | bool AddParametersToGetWebService | ( | WebServiceData * | data_p, |
| ParameterSet * | param_set_p | ||
| ) |
Add parameters to the HTTP GET request used by the given WebServiceData.
| data_p | The WebServiceData to build the request for. |
| param_set_p | The ParameterSet to use to build the request. |
true if successful, false otherwise. | bool AddParametersToPostWebService | ( | WebServiceData * | data_p, |
| ParameterSet * | param_set_p | ||
| ) |
Add parameters to the HTTP POST request used by the given WebServiceData.
| data_p | The WebServiceData to build the request for. |
| param_set_p | The ParameterSet to use to build the request. |
true if successful, false otherwise. | bool AddParametersToBodyWebService | ( | WebServiceData * | data_p, |
| ParameterSet * | param_set_p | ||
| ) |
Add parameters to an HTTP POST request with a JSON fragment in its body used by the given WebServiceData.
| data_p | The WebServiceData to build the request for. |
| param_set_p | The ParameterSet to use to build the request. |
true if successful, false otherwise. | ServiceData wsd_base_data |
The base ServiceData.
| json_t* wsd_config_p |
The configuration from the reference service.
| const char* wsd_name_s |
The name of the WebService.
| const char* wsd_description_s |
The description of the WebService.
| const char* wsd_alias_s |
The alias of the WebService.
| const char* wsd_info_uri_s |
The uri for more information about this WebService.
| ParameterSet* wsd_params_p |
The ParameterSet for this WebService.
| ByteBuffer* wsd_buffer_p |
This is used to store the data when building the submission uri.
| const char* wsd_base_uri_s |
The uri that the WebService will submit its query to.
| SubmissionMethod wsd_method |
The SubmissionMethod to use to submit the query.