Configuring Message-Level Security 2-47
■
Use the terminateWssc method of the WSSClientUtil class to terminate the secure context token:
WSSCClientUtil.terminateWsscstub;
2.10 Associating Policy Files at Runtime Using the Administration Console
The simple message-level configuration procedure, documented in Section 2.4,
Configuring Simple Message-Level Security , describes how to use the Policy and
Policies JWS annotations in the JWS file that implements your Web service to specify one or more policy files that are associated with your service. This of course
implies that you must already know, at the time you program your Web service, which policy files you want to associate with your Web service and its operations. This might
not always be possible, which is why you can also associate policy files at runtime, after the Web service has been deployed, using the Administration Console.
You can use no Policy or Policies JWS annotations at all in your JWS file and associate policy files only at runtime using the Administration Console, or you can
specify some policy files using the annotations and then associate additional ones at runtime.
At runtime, the Administration Console allows you to associate as many policy files as you want with a Web service and its operations, even if the policy assertions in the
files contradict each other or contradict the assertions in policy files associated with the JWS annotations. It is up to you to ensure that multiple associated policy files work
together. If any contradictions do exist, WebLogic Server returns a runtime error when a client application invokes the Web service operation.
To use the Console to associate one or more WS-Policy files to a Web service, the WS-Policy XML files must be located in either the META-INFpolicies or
WEB-INFpolicies directory of the EJB JAR file for EJB implemented Web services or WAR file for Java class implemented Web services, respectively.
See Associate a WS-Policy file with a Web Service in the Oracle WebLogic Server Administration Console Help for detailed instructions on using the Administration
Console to associate a policy file at runtime.
2.11 Using Security Assertion Markup Language SAML Tokens For Identity