Similar to SOAP services, the administrator can use an Ant script $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml to execute the design-time activities for REST services such as deploy and undeploy services from command line.
Usage of $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml:
ant -f $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml usage
Note: Script creates log file at the script location; hence, it is suggested to copy isgDesigner.xml to some <TEMP_DIRECTORY> and then use the script present in <TEMP_DIRECTORY>.
You can use the isgDesigner.xml script in either one of the following ways:
Execute the script without arguments
For example, enter ant -f $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml
When prompted, enter the arguments.
Note: Do not enclose any input between double quotes.
Execute the script with arguments, along with the commands
ant -f $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml -Dactions=<comma separated list of operations> -DserviceType=REST -DirepNames=<interface_name[{function1:<interactionPattern>:<VerbList>}{function2...}]> -Dverbose=<ON|OFF> -Dalias=<Alias>
For example:
ant -f $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml -Dactions=deploy -DserviceType=REST -DirepNames=FND_USER_PKG[{TESTUSERNAME:SYNC:POST}] -Dverbose=ON -Dalias=FndUserPkgSvc
ant -f $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml -Dactions=deploy -DserviceType=REST -DirepNames="FND_USER_PKG[{TESTUSERNAME:SYNC:POST}],FND_MESSAGE[{GET_TEXT_NUMBER::POST}]" -Dverbose=ON -Dalias="FndUserPkgSvc,FndMessageSvc"
While passing actions and irepNames using this method, be aware of the following conditions:
If more than one actions or irepNames are passed as command line argument, enclose them between double quotes. For example,
-Dactions="method1, method2,.."
-DirepNames="FND_USER_PKG[{function1:SYNC:POST}{function2::}],HR_APPRAISALS_API"
If only one action or irepName is passed as command line argument, then there is no need to enclose between double quotes.
Execute the script by providing a descriptor file, along with the commands, as an input
ant -f $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml -Dfile=<absolute path of service descriptor file> -Dverbose=<ON|OFF>
The argument values required for executing the design-time activities are provided in the file.
See Using the Script with an Input Descriptor File for REST Services.
Argument Description
Valid arguments for isgDesigner.xml are described as follows:
actions: Comma separated list of actions to be performed. Supported operations are: deploy and undeploy.
deploy: It will generate the REST service artifacts and deploy the generated service.
undeploy: It will undeploy the deployed service and reset the service status to its initial state - 'Not Deployed'. This also deletes the service artifacts from the Oracle E-Bsuiness Suite managed server.
For example, -Dactions="deploy,undeploy"
serviceType: [SOAP|REST]: Choose the value REST.
irepNames: Comma separated list of interface names.
Use either one of the following syntax for the interface name:
interface_name
interface_name[{function1:<interactionPattern>:<VerbList>}{function2:<interactionPattern>:<VerbList>}{funcntion3...}]
Angle bracket "< >" represents an optional place value holder.
<VerbList> represents the list of verbs separated by "+". For example, interface_name[{function1:SYNC:GET+POST}].
Note: The colon ":" is mandatory in these examples.
If <VerbList> is not included, such as interface_name[{function1:SYNC:}], then the verb list will be defaulted to the supported verbs for the interface.
Please note that the supported verb for PL/SQL APIs is POST only; the supported verbs for Java Bean Services are all the annotated verbs and POST.
<interactionPattern> represents interaction pattern. For REST services, the supported interaction pattern is SYNC (synchronous) only.
If <interactionPattern> is not included, such as interface_name[{function1::POST}], then the interaction pattern will be defaulted to SYNC.
If both optional place value holders are not included, such as interface_name[{function1::}], then the interaction pattern will be defaulted to SYNC and the verb list will be defaulted to the supported verbs for the interface.
If only interface_name is mentioned, then the all the functions will be generated with SYNC interaction pattern with the supported verbs.
Passing an unsupported interaction pattern or verb will result in an error.
Multiple interfaces can be separated by comma and passed as irepName.:
For example, -DirepNames="oracle.apps.fnd.rep.ws.service.EbsRestLocator[{function1:SYNC:GET+POST}],FND_USER_PKG[{function1::POST}]"
file: Absolute path of the (service descriptor) XML file containing interfaces and actions to be performed on these interfaces.
For example, -Dfile=/u01/oracle/isg_service.xml
verbose: [ON|OFF] Default value is OFF.
For example, -Dverbose=OFF
alias: It is mandatory for REST services. If multiple services are deployed, use comma separated alias names.
For example, -Dalias="FndUserPkgSvc,FndMessageSvc"
Usage Examples
Sample command for actions (actions and interface names are being passed):
ant -f $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml -Dactions=deploy -DserviceType=REST -DirepNames=FND_USER_PKG[{TESTUSERNAME:SYNC:POST}] -Dverbose=ON -Dalias=FndUserPkgSvc
ant -f $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml -Dactions=deploy -DserviceType=REST -DirepNames="FND_USER_PKG[{TESTUSERNAME:SYNC:}],FND_MESSAGE[{GET_TEXT_NUMBER::POST}]" -Dverbose=ON -Dalias="FndUserPkgSvc,FndMessageSvc"
Sample command for performing design time actions from XML file:
ant -f $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml -Dfile=/u01/oracle/isg_service.xml
Using the Script with An Input Descriptor File for REST Services
This section describes how to use a descriptor file with the required argument values to manage the design-time activities for REST services.
Example 1 - Deploying All PL/SQL Functions and Concurrent Programs as REST Service Operations
Use the following descriptor file that provides required argument values highlighted in bold text, such as <REST_ACTIONS>, <ALIAS>USER</ALIAS>, and <ALL_FUNCTIONS/>, to deploy all functions contained in this PL/SQL API FND_USER_PKG as a REST service with POST HTTP method.
Please note by default PL/SQL APIs can be exposed as REST services only with POST HTTP method and synchronous interaction pattern. Therefore, the argument <ALL_FUNCTIONS/> works the same as the argument <ALL_FUNCTIONS pattern="SYNC"/>, <ALL_FUNCTIONS verb="POST"/>, or <ALL_FUNCTIONS pattern="SYNC" verb="POST"/> in the descriptor file.
<INTERFACE> <NAME>FND_USER_PKG</NAME> <TYPE>PLSQL</TYPE> <REST_ACTIONS> <DEPLOY> <ALIAS>USER</ALIAS> <!-- GENERATES ALL FUNCTIONS WITH DEFAULT VERB "POST" AND DEFAULT ITERACTION PATTERN "SYNC" FOR PLSQL--> <ALL_FUNCTIONS/> </DEPLOY> <UNDEPLOY/> </REST_ACTIONS> <SOAP_ACTIONS> ... </SOAP_ACTIONS> </INTERFACE>
Since PL/SQL APIs and concurrent programs can be exposed as both SOAP and REST services, the same descriptor file can include required argument values for SOAP service design-time activities as well. See: Using the Script with an Input Descriptor File for SOAP Services.
Example 2 - Deploying an Interface Type of Java Bean Services as REST Service Operations with Both POST and GET HTTP Methods
In the following example, a descriptor file is used to deploy an interface type of Java Bean Services called INTERFACE4 as a REST service with both POST and GET HTTP methods.
Specifically, the REST service alias name is provided in the argument <ALIAS>ALIAS4</ALIAS> and all service operations contained in the interface need to be deployed with both GET and POST HTTP methods which is indicated in the argument <FUNCTIONS_LIST pattern="SYNC" verb="GET,POST"/> of this descriptor file.
Please note that Java Bean Services and Application Module Services can be exposed as REST services only.
<INTERFACE> <NAME>INTERFACE4</NAME> <TYPE>JAVA</TYPE> <REST_ACTIONS> <DEPLOY> <ALIAS>ALIAS4</ALIAS> <!-- GENERATES ALL FUNCTIONS WITH VERB "GET,POST" AND ITERACTION PATTERN "SYNC" FOR POJO SERTVICES--> <ALL_FUNCTIONS pattern="SYNC" verb="GET,POST"/> </DEPLOY> <UNDEPLOY/> </REST_ACTIONS> </INTERFACE>
Other Usages
The $JAVA_TOP/oracle/apps/fnd/isg/ant/isgDesigner.xml script is a multipurpose script. You can also use it to run the diagnostic tests or download the configuration file from the instance.
To manage life cycle activities for SOAP services, see: Managing SOAP Service Life Cycle Activities Using An Ant Script.