web_service_set_security

Example: web_service_set_security and web_service_cancel_securityWeb Services Functions (SOAP, WEB_SERVICE, Silverlight)

Adds security tokens to subsequent soap and web service calls.

int web_service_set_security ( [const char * TtlIsSeconds ,] SECURITY_TOKEN, const char * attributes, [SECURITY_TOKEN , attributes... , SECURITY_TOKEN, attributes,] MESSAGE_SIGNATURE, const char * attributes, [MESSAGE_SIGNATURE, attributes, ..., MESSAGE_SIGNATURE, attributes,] ENCRYPTED_DATA, const char * attributes, [ENCRYPTED_DATA, attributes,... ENCRYPTED_DATA, attributes,] LAST );
TtlIsSeconds The period for which the message is valid from the time of its creation in seconds.
SECURITY_TOKEN Each section beginning with a SECURITY_TOKEN marker specifies a token. For details of the attributes, see below.
MESSAGE_SIGNATURE Each section beginning with a MESSAGE_SIGNATURE marker specifies that subsequent web service requests will be signed with the specified token. The signature can apply to the entire message, to the specified token, or to specified portions of the SOAP envelope. For details of the attributes, see below.
ENCRYPTED_DATA Each section beginning with an ENCRYPTED_DATA marker specifies that subsequent web service requests will be encrypted with the specified token. The encryption can apply to the entire message, to the specified token, or to specified portions of the SOAP envelope. For details of the attributes, see below.
WS_ADDRESSING The version of WS-addressing such as WSA1.0.
TIME_STAMP Includes or excludes the time stamp in the header. See the example for the correct syntax.
LAST A marker that indicates the end of the arguments list.

The web_service_set_security function specifies tokens to be attached at each subsequent soap_request and web_service_call invocation. The tokens remain in effect until the next web_service_set_security or web_service_cancel_security call.

At each web_service_call, security tokens are processed before attachments.

Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure. Note that in many cases, this return value indicates the technical success of the function, and not the result. For example, a function that registers a string to be found in a subsequent step returns LR_PASS to indicate that the registration was successful. This does not indicate that the string was found in the server response.

Parameterization

All attribute values of web_service_set_security can be parameterized except as noted in the descriptions of the attributes.