Share this page

# Example: web_service_set_security and web_service_cancel_security

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.

     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 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: