Share this page

# web_service_cancel_security

Web Services Functions (SOAP, WEB_SERVICE, Silverlight)

Cancels the settings from the preceding call to web_service_set_security.

    int web_service_cancel_security( );

After a call to web_service_cancel_security, the tokens specified in the previous call to web_service_set_security are no longer added when soap_request and web_service_call are invoked.

## 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

Parameterization is not applicable to this function.

## Example

After the call to web_service_set_security in this example, every soap_request and web_service_call until the next web_service_set_security or web_service_cancel_security call will sent with three tokens: a Username token, a Derived token, and a binary X509 token.

All tags that correspond to the XPath statement: =//soap:Body/View will be signed using the username token.

The body of the Soap Envelope will be encrypted using the X509 token.

The Username token will be encrypted using the X509 token.

After the call to web_service_cancel_security, the tokens are no longer sent.

Copy code

    web_service_set_security("30",

      SECURITY_TOKEN,
        "TokenName=MyUserNameToken",
        "Type=Username",
        "UserName=admin", "Password=test",
        "PasswordOptions=SendPlainText",
        "IDType=SubjectName",

      MESSAGE_SIGNATURE,
        "UseToken=MyUserNameToken",
        "TargetPath=//soap:Body/View",
        "SignatureOptions=IncludeBody|IncludeAddressing|IncludeTimestamp",
        "TransformAlgorithm=http://www.w3.org/2001/10/xml-exc-c14n#",
        "CanonicalizationAlgorithm= http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/#WithComments",

      ENCRYPTED_DATA ,
        "EncryptionType=Content",
        "KeyAlgorithm=RSA15",
        "SessionAlgorithm=TripleDES",

      WS_ADDRESSING,
        "Version=WSA1.0",

      TIME_STAMP,
        "Exclude=True/False",

      LAST);
    ...

    web_service_cancel_security( );

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: