The policies appear in order in the Policy Version History table with the active

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. Managing Web Service Policies 7-21 When you delete a policy, the active policy and all previous versions of the policy are deleted. To retain the active policy version and delete only the previous versions of the policy, see Versioning Web Service Policies on page 7-17. To delete 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. From the Web Services Policies page, select a policy from the Policies table and click Delete.

3. A dialog box appears asking you to confirm the deletion. Click OK.

Generating Client Policies Once you have created the service policy, you can use the Web service WSDL to generate an equivalent client policy with the parameters required to call that service. You must use the Oracle WSDL instead of the standard WSDL to generate the client policy. The URL for the Web service must be appended with ?orawsdl, instead of ?wsdl. Generating the policy increases the likelihood that the client policy will work with the service policy. Once a policy is generated, you can edit the policy. The policy is populated with the client assertion that is the matching pair to the service assertion. For example, if the service policy contained the assertion, wss_http_token_service_template, then the generated client policy is populated with its counterpart, wss_http_token_client_ template. However, the client security policies that are generated will not contain any configuration information. Therefore, once the policies are generated, use the client assertion template and import the configuration information into your client policy. In the example, you would import configuration information from the client assertion template, wss_http_token_client_template. After you have made the desired changes to the policy, you must save the policy. Once a policy is saved, you can access it from the Web Services Management page. You can also delete any generated policies that you do not need. For example, you may want to delete duplicates of already existing MTOM or Reliable Messaging policies. To generate a Web service client policy 1. Determine the WSDL for the Web service for which you want to generate a Web service client policy. 2. 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.

3. From the Web Services Policies page, click Generate Client Policies, as shown in

Figure 7–12 .