SOAP Operation Providers

Operation providers are functions which implement a WSDL operation. More...

Data Structures

Defines

Typedefs

Functions


Detailed Description

Operation providers are functions which implement a WSDL operation.

These providers may be implemented as part of a service, or as a separate module which multiple service implementations may use.


Define Documentation

#define GLOBUS_OPERATION_PROVIDER_MODULE

The Globus Operation Provider API uses standard Globus module activation and deactivation.

Before any functions in this module are called, the following function should be called:

      globus_module_activate(GLOBUS_OPERATION_PROVIDER_MODULE)

This function returns GLOBUS_SUCCESS if this module was successfully initialized, and you are therefore allowed to subsequently call functions from this module. Otherwise, an error code is returned, and functions should not subsequently be called. Activation may be called multiple times.

To deactivate this module, the following function should be called, once for each activation call:

    globus_module_deactivate(GLOBUS_OPERATION_PROVIDER_MODULE)

#define GLOBUS_OPERATION_PROVIDER_REGISTRY   (&globus_operation_provider_registry)

Registry of operation providers

The operation provider registry contains a mapping of operation provider QName values to globus_operation_provider_descriptor_t values.

Operation providers must add themselves to this registry to be able to be used by service implentations by calling globus_extension_registry_add().


Typedef Documentation

typedef globus_result_t(* globus_operation_init_resource_func_t)(const struct wsa_EndpointReferenceType_s *epr)

Resource initialization function signature

Operation providers may define a function matching this signature to handle any resource-specific initialization to be done when a new resource is created.

Parameters:
epr EndpointReferenceType containing contact information for this resource.
Returns:
Providers which implement this function should return GLOBUS_SUCCESS if provider-specific resource initialization has completed successfully; otherwise, the error will be propagated to the service which attempted to create the resource so that it can deal with the problem.

typedef struct globus_l_operation_table_s* globus_operation_table_t

Operation table.


Function Documentation

globus_result_t globus_operation_table_init ( globus_operation_table_t table,
const char *  Namespace 
)

Initialize a new operation provider table

Creates a new operation provider table.

The caller is responsible for destroying the table after it is no longer needed by calling globus_operation_table_destroy().

Parameters:
table New table to initialize.
Namespace Ignored
Return values:
GLOBUS_SUCCESS Operation provider table successfully initialized.
GLOBUS_SOAP_MESSAGE_ERROR_TYPE_NULL_PARAM The table parameter is NULL.
GLOBUS_OPERATION_PROVIDER_ERROR_TyPE_OUT_OF_MEMORY Insufficient memory to create a new operation provider table.
GLOBUS_OPERATION_PROVIDER_ERROR_TYPE_FAILED_INIT Error initializing some internal part of the operation provider table.

globus_result_t globus_operation_table_get_operation ( globus_operation_table_t  table,
const char *  operation_id,
void **  operation 
)

Look up an operation in an operation provider table

Look up an operation name in an operation table and return the provider function for that operation.

Parameters:
table Operation provider table to query.
operation_id Name of the operation to look up.
operation Pointer to be set to the value of the operation provider which will process this operation.
Return values:
GLOBUS_SUCCESS Operation lookup successful.
GLOBUS_SOAP_MESSAGE_ERROR_TYPE_NULL_PARAM One of table, operation_id or operation is NULL.
GLOBUS_OPERATION_PROVIDER_ERROR_TYPE_OP_NOT_FOUND The operation table does not contain a provider to handle the operation named by operation_id.

globus_result_t globus_operation_table_add_default_provider ( globus_operation_table_t  table,
xsd_QName operation_name,
globus_operation_provider_descriptor_t op_desc 
)

Add an operation to the operation provider table and set the provider which will handle it

Defines an entry for a new operation in the provider table.

The op_desc parameter contains information about how the operation is implemented so that the service engine can dispatch this operation.

Parameters:
table Operation provider table to query.
operation_name Name of the operation to add the provider for. The id field in the op_desc structure will be used as the operation name in the operation_table.
op_desc Description of the operation implementation.
Return values:
GLOBUS_SUCCESS Operation added successfully.
GLOBUS_SOAP_MESSAGE_ERROR_TYPE_NULL_PARAM One of table, operation_id or operation is NULL.
GLOBUS_OPERATION_PROVIDER_ERROR_TYPE_FAILED_TABLE_INSERT The operation could not be added to the operation table.

globus_result_t globus_operation_table_add_provider ( globus_operation_table_t  table,
xsd_QName operation_name 
)

Add an operation to the operation provider table and set the provider which will handle it

Looks up the operation_name in the operation provider registry and add its to an operation provider table.

This function is equivalent to looking up the operation_name in the operation provider table and then calling globus_operation_table_add_default_provider().

Parameters:
table Operation provider table to query.
operation_name Name of the operation to add the provider for. The operation_name is looked up in the global operation provider registry and then added to the table.
Return values:
GLOBUS_SUCCESS Operation added successfully.
GLOBUS_SOAP_MESSAGE_ERROR_TYPE_NULL_PARAM One of table, operation_id or operation is NULL.
GLOBUS_OPERATION_PROVIDER_ERROR_TYPE_FAILED_TABLE_INSERT The operation could not be added to the operation table.

void globus_operation_table_destroy ( globus_operation_table_t  table  ) 

Destroy an operation table

Destroy an operation able and free all memory associated with it.

Parameters:
table Operation provider table to destroy.

globus_result_t globus_operation_table_init_resource ( globus_operation_table_t  table,
const struct wsa_EndpointReferenceType_s *  epr 
)

Call all operation provider resource initialization functions for a new resource

Calls the init_resource function for each operation provider associated with a service.

Parameters:
table Operation provider table associated with the service which is creating the resouce.
epr Endpoint reference of the resource which is be constructed.
Return values:
GLOBUS_SUCCESS All operation providers successfully initialized.
GLOBUS_SOAP_MESSAGE_ERROR_TYPE_NULL_PARAM One of table or epr is NULL.
GLOBUS_OPERATION_PROVIDER_ERROR_TYPE_FAILED_RESOURCE_INIT One of the operation providers failed to initialize the resource.


about globus | grid research | globus toolkit | software development

Comments? webmaster@globus.org