Create Custom Application in Jdeveloper
OpenJdeveloper12.1.3.0.0 or 12.2.1.1.0 -File->New->ApplicationorNew Application
SelectCustomApplication
Enter the ApplicationName
Enter ProjectName andSelect‘Java’:
Leave the Defaults:
Your Applicationwithprojectwouldlooklike below,rightclickonthe Project‘Inv_API’andselect
New->JavaClass
Enter JavaClassName and leave itasdefaultorclick onthe Main methodcheckbox andpressOk
Your Java Classwouldbe asbelow,addthe code for invokingOracle PublicAPI:
Build the code required to call the Oracle Public API
AfterAddingthe code youmightsee the errorswith‘OracleTypes’
Add Libraries to the Project
To get ridof the errors,add the requiredJARFiles. Rightclickonthe project‘Inv_API’andselect‘Project
Properties’andclickon‘LibrariesandClasspath’andthenclickon‘AddLibrary’and addfollowing
libraries
Clickon ‘AddJAR/Directory’andaddthe JARFilesfromyourlocal machine
AfteraddingrequiredJarandlibraryfiles,clickOK
Save your work
Make sure youhave no Build-Issues
Create Rest Webservice
Rightclickon ‘Rest_Java.java’file andselect‘CreateRESTful Service’,andenterthe requiredinformation
Your applicationwithcode wouldlooklike below withthe annotationsaddedautomatically
Save All
Running the Integrated Weblogic Server
RightClickon ‘Rest_Java.java’andselect‘Run’,select‘JAX-RSWebService Runner’
IntegratedWebLogicServergetskickedoff andthe followingURLwouldbe generated
Clickon the TargetURL, HTTP AnalyzerWindow opens,enterthe parameters
Checkthe Interface table forthe TransactionInterface Id
AfterRestwebservice isrunyoushouldsee the recordinthe base table
Testing Rest Webservice
Clickon ‘SendRequest’afterenteringthe parameters
You shouldsee the message if the RestWebservice issuccessful
Nowverifyinginthe backend: Interface table recordgetspickedup
Checkingthe base table

Create rest webservice for oracle public api using java class via jdeveloper