			SOA Demo Community Seeding Utility 
                        ----------------------------------


    SOATestDemoApp is a utility application, which can seed/remove demo 
community for testing. It can seed either default demo community or 
custom community. 



A. To seed just the default demo community:
-------------------------------------------

ant seedDemoUsers -Dbea.home=<BEAHOME>
                  -Doracle.home=<ORACLEHOME> 
		  -Ddomain.home=<BEAHOME>/user_projects/domains/<Domain Name>
		  -Dtarget=<Managed Server Name> 
		  -Dadmin.url=t3://<HOST>:<Admin Server Port> 
		  -Dserver.url=http://<HOST>:<Managed Server Port> 
		  -Dadmin.name=<Admin Name> -Dadmin.pwd=<Admin Password>

Where <BEAHOME> is the absolute path of installation home directory.
      <ORACLEHOME> is the absolute path of Oracle Home (OH) provided during installation.

Example:
ant seedDemoUsers -Dbea.home=/scratch/wls/as11wls/lt20 
                  -Doracle.home=/scratch/wls/as11wls/lt20/AS11gR1SOA 
		  -Ddomain.home=/scratch/wls/as11wls/lt20/user_projects/domains/domain1
		  -Dtarget=soa_server1
		  -Dadmin.url=t3://wlserver.oracle.com:7001
		  -Dserver.url=http:///wlserver.oracle.com:8001
		  -Dadmin.name=weblogic -Dadmin.pwd=weblogic



This command would seed default demo community and also grant permissions to
demo appRoles. 
Ensure that PATH contains the java that is shipped with SOA.



B. To seed/remove default/custom demo community, Interactively :
----------------------------------------------------------------

i. From weblogic console deploy SOATestDemoApp.ear: 
   This step (B.i) can be skipped if step (A) has been completed.
    . Login to weblogic console as administrator (i.e. weblogic). 
    . Click on Deployments. Click on Install. 
    . Navigate to the directory containing SOATestDemoApp.ear and select it.  Click Next. 
    . Choose "Install this deployment as an application", Click Next. 
    . Choose to deploy the application on Managed server.
    . Retain the name as "SOATestDemoApp".  Finish Deployment.

ii. From browser invoke the seeding Servlet:
    Open following URL:
    http://<HOST>:<Managed Server Port>/integration/SOADemoCommunity/DemoCommunitySeedServlet


    To seed/Remove community use "Seed Community"/"Remove Community" options. 
    To seed/remove default demo community use "default-demo-community.xml" as 
    Input file path.
    To seed/Remove custom demo community, create input xml file conforming to
    DemoUserCommunity.xsd schema. Ensure that the input file is available on the
    server where SOA is running. Provide full path of custom input xml file 
    as input file path. 

    Note :
    . The pop-up window would display the User/Groups that were created/removed
      by the application. 
    . Invoking the application multiple times for seeding would remove and recreate
      users/groups.    
    . Invoking the application multiple times for removing would have no
      effect after first invocation.


C. To seed/remove custom demo community using command line:
-----------------------------------------------------------
   Create input xml file conforming to DemoUserCommunity.xsd schema. Ensure 
   that the input file is available on the server where SOA is running. Provide 
   full path of custom input xml file.

   Pass following 2 additional arguments to "ant seedDemoUsers" described in
   section A. 
                  -Dinput.file=<Path to Input xml file>
                  -Daction=<SEED_COMMUNITY | REMOVE_COMMUNITY>


D. To seed/remove demo community partially after seeding:
--------------------------------------------------------
   Create the input xml file with partial set of users/groups.
   
   ant seedDemoCommunity -Dserver.url=http://HOST:<Managed Server Port>
                         -Dinput.file=<Path to Input xml file>
                         -Daction=<SEED_COMMUNITY | REMOVE_COMMUNITY>
   
   This would add/remove only users/groups specified in input file. 
   
