In an effort to simplify the population of existing composites on a server into FlexDeploy projects, we have provided a utility to extract composites from a SOA server into a comma delimited file. This file can then be the basis for a spreadsheet that can be loaded directly into FlexDeploy, through the use of templates, and all of the composite projects can be created in seconds. I will talk about templates in another blog post.
The composite extraction from a SOA server can be done with the attached zip file (extractComposites). There are three components in the zip file:
- Property file that contains the userName, password, hostName and hostPort for the targeted SOA server
#Weblogic server username and password server.user=weblogic server.password=welcome1 #server.host= server.host=soalt06.flexagon #server.port= server.port=8001
- CompositeMgmt.jar that contains the code that interrogates the targeted server
- ExtractComposites.sh that contains the script that manages the jvm and classpath
JAVA_DIR=/u01/oracle/products/java/bin FMW_DIR=/u01/oracle/products/fmw ${JAVA_DIR}/java -cp ${FMW_DIR}/soa/soa/modules/commons-cli-1.1.jar:${FMW_DIR}/soa/../wlserver/server/lib/weblogic.jar:${FMW_DIR}/soa/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:${FMW_DIR}/soa/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:./CompositeMgmt.jar compositemgmt.CompositeData ${1}
Once you have the zip file downloaded,
- Extract the contents on a SOA server (needs several of the install jars)
- Edit the ExtractComposite shell script and change the values in the first two lines, JAVA_DIR and FMW_DIR. Samples are in the script.
- Edit the property file (DEV_properties.txt,), name it whatever you want but change the following:
- server.user (eg, weblogic)
- server.password (eg, weblogic password)
- server.host (eg, SOA managed server host)
- server.port (eg, SOA managed server port)
- Execute the script (may have to make the script executable, chmod +x ExtractComposites.sh)
- ./ExtractComposites.sh DEV_properties.txt > output.file
The output file will contain each compositeName and the partition that it currently resides.
Composite1,default Composite2,default Composite3,order Composite4,shipment
This will provide a jump start that can then be utilized with FlexDeploy templates.