From the Web Services Policies page, select a policy from the Policies table and In the View Policy page, click Version History Link

Managing Web Service Policies 7-19 You can also delete any version of the policy, except the active policy, from the Policy Version History table by selecting the policy and clicking Delete. You cannot edit the policy from the Policy Version History page. You must edit a policy from the Web Services Management page. Creating a New Version of a Web Service Policy You create a new version of an existing Web service policy by making any desired changes and saving the policy. To create a new version of a Web service policy: 1. From the Edit Policy page, make a change to your policy.

2. Click Save.

In the Policy Information section of the page, the version number for the policy is incremented by 1. Restoring an Earlier Version of a Web Service Policy Follow the procedure below to return to an earlier version of a policy. To restore an earlier version of a Web service policy 1. From the View Policy page, click Version History Link, as shown in Figure 7–11 . Figure 7–11 Version History Link on Edit Policy Page

2. In the Policy History table, select a policy and click Restore or click Activate

Policy . If you click Restore, the selected policy is now the current active policy. The earlier version of the policy is retained, and the current version is incremented by 1. Note: Save does an implicit validation. If the validation fails, the policy is persisted, but the status is set to Disabled. Note: Restore saves the earlier version of the policy, and Activate Policy deletes the earlier version. 7-20 Oracle Fusion Middleware Security and Administrators Guide for Web Services If you click Activate Policy, the selected policy is now the current active policy. The earlier version of the policy is deleted, and the current version is incremented by 1. Deleting Versions of a Web Service Policy Follow the procedure below to permanently remove earlier versions of a policy. You can delete all versions except the active policy version. To delete all versions of the policy, including the active version, see Deleting Web Service Policies on page 7-20. To delete a Web service policy version 1. From the Copy Policy page or the Edit Policy Detail page, click Version History Link .

2. In the Policy History table, select the policy want to remove, and click Delete.

3. A dialog box appears with a message asking you to confirm the deletion. Click

OK . The selected policy is deleted from the Metadata Services Repository and the Policy History table. Exporting Web Service Policies You might want to export a policy to copy it from a development environment to a production environment, or to simply view the policy in another tool or application. Follow the procedure in this section to export a policy from the Oracle WSM repository. Once the policy is exported, you can import it to another policy store, attach it to Web services, make changes to it, and so forth. To export a Web service policy 1. Navigate to the Web Services Policy page, as described in Navigating to the Web Services Policies Page in Fusion Middleware Control on page 7-2. 2. Select the policy that you want to export from the list.

3. From the Web Services Policies page, click Export to File.

4. Save the policy in the filename of your choice. Use only ASCII characters in the filename. Deleting Web Service Policies Before you delete a policy, Oracle recommends that you verify that the policy is not attached to any policy subjects. You can see the policy subjects that are attached to a policy by doing a policy dependency analysis. See Analyzing Policy Usage on page 7-26 for more information. If you try to delete a policy that is attached to a subject, you will receive a warning. You will not be prevented from deleting an attached policy. However, the Web service request will fail the next time the subject to which the policy is attached is invoked. Note: You cannot prefix the name of a policy with oracle_. When you export a predefined policy file, the file is renamed from oraclepolicyname to oracle_policyname. You should change this name. Otherwise, you will receive exceptions when trying to use the policy.