Tuesday, December 24, 2013

Deploying SOA_Composites using ANT-Script

I just wanted to share steps for deploying SOA_COMPOSITES using ant Script.

Just for Knowledge adding the steps to do it:

1)First deploy your composites as SAR

It will create a file to location as follows  :sca_ValidateBu_rev1.2.jar(My composite is validateBU)


2)Deployment Using ant-script exists in the bin directory of SOA_Home(Oracle_SOA)

3)On cmd go to this location:

My m/c location is:

D:\Oracle\Middleware\Oracle_SOA1\bin>

4)Now type this command

D:\Oracle\Middleware\Oracle_SOA1\bin>ant -f ant-sca-deploy.xml -DserverURL=http://localhost:8001 -DsarLocation=D:\sca_ValidateBu_rev1.2.jar -Doverwrite=true -Duser=weblogic -Dpassword=Welcome

@ -DforceDefault=true -Dpartition=default


Details are:

a)ant -f ant-sca-deploy.xml :It is the ant script to deploy composites.
b)DserverURL=http://localhost:8001 :It is server URL with soa default port.
c)DsarLocation=D:\sca_ValidateBu_rev1.0.jar :It is the location of jar file created in step 1.
d)Doverwrite=true:It is to overwrite any composites with same name and revision.
e)Duser=weblogic -Dpassword=Welcome:Username and pwd for the soa server.
f)Dpartition=default:Your soa server partition name where composite will be deployed.In our case it                             is default.


Now when we run ,it will ask for username and pwd again and this is output on the command prompt.

D:\Oracle\Middleware\Oracle_SOA1\bin>ant -f ant-sca-deploy.xml -DserverURL=http://localhost:8001 -DsarLocation=D:\sca_ValidateBu_rev1.2.jar -Doverwrite=true -Duser=weblogic -Dpassword=Welcome
@ -DforceDefault=true -Dpartition=default
Buildfile: ant-sca-deploy.xml
     [echo] oracle.home = D:\Oracle\Middleware\Oracle_SOA1\bin/..

deploy:
    [input] skipping input as property serverURL has already been set.
    [input] skipping input as property sarLocation has already been set.
    [input] skipping input as property password has already been set.
[deployComposite] setting user/password..., user=weblogic
[deployComposite] Processing sar=D:\sca_ValidateBu_rev1.0.jar
[deployComposite] Adding sar file - D:\sca_ValidateBu_rev1.0.jar
[deployComposite] INFO: Creating HTTP connection to host:localhost, port:8001
[deployComposite] Enter username and password for realm '' on host localhost:8001
[deployComposite] Authentication Scheme: Negotiate
[deployComposite] Username:
weblogic
[deployComposite] Password:

[deployComposite] INFO: Received HTTP response from the server, response code=200
[deployComposite] ---->Deploying composite success.

BUILD SUCCESSFUL
Total time: 28 seconds

ENJOY!!!!!!!!!!!!!!!!!!!!!!!!






No comments:

Post a Comment