Exporting policy sets to client or server environments using the wsadmin tool

Use the wsadmin tool, which supports the Jython and Jacl scripting languages, to export and import application or system policy sets for Web services. The exportPolicySet command creates an archive file based on the policy set configuration, and the importPolicySet command imports the policy set archive file into a new environment.

Before you begin

Create and configure an application or system policy set to export to an archive file. Determine the directory where you want to create the archive file.

About this task

You can use the exportPolicySet and importPolicySet commands to exchange system or application policy sets between servers or between a client and a provider. To reuse a policy set on a new server or client, export the policy set to an archive file, then import the archive file on the destination server or client.

Procedure

  1. Export the application or system policy set to an archive file.
    Use the exportPolicySet command to create an archive file for the policy set of interest. For example, the following Jython command creates the customSC.zip archive file in the C:\IBM\WebSphere\AppServer\PolicySets\ directory for the customSecureConversation policy set:
    AdminTask.exportPolicySet('[-policySet customSecureConversation 
    -pathName C:/IBM/WebSphere/AppServer/PolicySets/customSC.zip]')
  2. Move the policy set archive file to the destination environment.

    If you are exporting the policy set to a client environment, then place the archive file on the classpath of the client.

  3. Import the archive file containing the policy set.
    Use the importPolicySet command to import the archive file containing the policy set configuration of interest to the destination environment.
    Note: You cannot import a policy set onto a server or client environment if the policy set already exists in the destination environment.
    For example, the following Jython command creates a customSecureConversation policy set from the customSC.zip archive file:
    AdminTask.importPolicySet('[-importFile C:/IBM/WebSphere/AppServer/bin/customSC.zip]')
  4. Save the configuration changes.
    Enter the following command to save your changes:
    AdminConfig.save()

What to do next

Attach the imported policy set to Web service applications in the destination environment.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 1:23:07 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-dist&topic=txml_wsfpimpexp
File name: txml_wsfpimpexp.html