publishstore utility

The publishstore script allows you to publish store archives from a command line.

Syntax

publishstore Syntax Diagram

Parameter values

For IBM i OS operating systemSolarisLinuxAIX
-svr
The fully qualified TCP/IP name of your WebSphere Commerce Server. Note that if you are using a remote web server, you should use the hostname of the remote web server.
-userid
The WebSphere Commerce Site Administrator's user ID. You must have Site Administrator access to publish a store archive.
-pwd
The WebSphere Commerce Site Administrator's password.
-sar
The full path of the store archive on the host machine, for example, c:\wcs\starterstores\ConsumerDirect\Aurora.sar.
-paramfile
Optional: The full file path to your custom parameters file on the host machine, for example, c:\Aurora.properties. Create and use a parameters file if you want to override the store's default parameters. In the file, include name-value pairs to override the default parameter values, for example, STORE_DIR=AuroraB2B. If you do not specify a parameters file, the store is published with the default parameters.

Feature Pack 8If you are publishing the Aurora starter store, see the descriptions and examples in Example: parameters file for publishing the Aurora starter store.

Example

The following example shows you how to use the command to publish a store archive from the command line:

  • For IBM i OS operating systemSolarisLinuxAIX
    
    ./publishstore.sh -svr myhost -userid wcsadmin -pwd wcsadmin -sar 
    /opt/WebSphere/CommerceServer70/starterstores/ConsumerDirect/Aurora.sar
    -paramfile /Aurora.properties
    

Parameter values

Windows
svr
The fully qualified TCP/IP name of your WebSphere Commerce Server, for example, myhost. Note that if you are using a remote web server, you should use the hostname of the remote web server.
userid
The WebSphere Commerce Site Administrator's user ID, for example: wcsadmin. You must have Site Administrator access to publish a store archive.
pwd
The WebSphere Commerce Site Administrator's password, for example: wcsadmin.
sar
The full path of the store archive on the host machine, for example, c:\wcs\starterstores\ConsumerDirect\Aurora.sar.
-paramfile
Optional: The full file path to your custom parameters file on the host machine, for example, c:\Aurora.properties. Create and use a parameters file if you want to override the store's default parameters. In the file, include name-value pairs to override the default parameter values, for example, STORE_DIR=AuroraB2B. If you do not specify a parameters file, the store is published with the default parameters.

Feature Pack 8If you are publishing the Aurora starter store, see the descriptions and examples in Example: parameters file for publishing the Aurora starter store.

Example

The following example shows you how to use the command to publish a store archive from the command line:

  • Windows
    
    publishstore myhost wcsadmin wcsadmin 
    c:\wcs\starterstores\ConsumerDirect\Aurora.sar
    

Behavior

The publishstore script allows you to publish a store archive from a command line. Publish uses the default values for the parameters contained in the store archive. The publishstore script does the following:

  • Creates a session and logs on to the running WebSphere Commerce Server (svr) using the user ID (userid) and password (pwd).
  • Issues a request to publish the store archive (sar).
  • Displays the scheduled publish job number.
  • Polls the server and displays the status of the publishing job.
Note: You need to copy the following files under StoreAssetsDir to the corresponding store directory, after using the command line to publish the ConsumerDirect or B2BDirect store. For ConsumerDirect, these files need to be copied (for B2BDirect, substitute "B2BDirect" for "ConsumerDirect"):
  • WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\Stores.war\StoreAssetsDir to WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\Stores.war\ConsumerDirect
  • WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\Stores.war\WEB-INF\classes\StoreAssetsDir to WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\Stores.war\WEB-INF\classes\ConsumerDirect
  • WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\Stores.war\WEB-INF\stores\StoreAssetsDir to WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\Stores.war\WEB-INF\stores\ConsumerDirect
  • WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\Stores.war\WEB-INF\xml\tools\stores\StoreAssetsDir to WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\Stores.war\xml\tools\stores\ConsumerDirect
  • WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\Stores.war\WEB-INF\tools\stores\StoreAssetsDir to WAS_profiledir\installedApps\ cell_name\ WCServer_enterprise_archive\Stores.war\tools\stores\ConsumerDirect