Saturday, August 12, 2017

Enabling Oracle Commerce ATG11.3 OOTB JAX-RS REST Web Services

Oracle Commerce ATG11.3 OOTB JAX-RS REST Web Services Enabling OOTB JAX-RS REST Web Services involves the following steps. 1.Creat... thumbnail 1 summary

Oracle Commerce ATG11.3 OOTB JAX-RS REST Web Services



Enabling OOTB JAX-RS REST Web Services involves the following steps.


1.Create a new ATG Module say ROUTE.REST [or you can just modify the existing modules ]
2.Edit the MANIFEST.MF file and all the ATG-Required modules as below,
ATG-Required: ROUTE.Commerce REST REST.JAXRSPublic REST.JAXRSPublic.Version1
3.Assemble your EAR file with this new module by adding to your build modules.
4.Make sure your new modules are included in the EAR file ,check your build logs for the new modules and OOTB JAX-RS Modules
Creating application.xml...
    [exec] ....
....
[exec]  Importing classes for module ROUTE.REST
...
...
...
[exec]  Importing classes for module REST
[exec]  Importing classes for module REST.Actor
[exec]  Importing classes for module REST.JAXRSPublic.Version1
[exec]  Importing classes for module REST.JAXRSPublic
[exec]  Importing classes for module REST.base
[exec]  Importing classes for module PublishingAgent
[exec]  
...
...
...
Assembly took 20.240 seconds.
...standalone\deployments\ATGProduction\ATGProduction.ear\META-INF
...
...
BUILD SUCCESSFUL
Total time: 1 minute 53 seconds  

5. View the EAR file to understand the structure.
You can see few new war files got added to the ear file. When you check the web.xml file from the path \ATGProduction.ear\atg-jaxrspublic-version1.war\WEB-INF\web.xml, you can see the context-root of the OOTB service.




6.Once you deploy the EAR into app server you can able to see the OOTB JAX-RS REST Web services.


7.Viewing the Services
All available services are listed in  RestResourceRegistry component in dyn/admin.


Path: /atg/dynamo/service/jaxrs/RestResourceRegistry



8. Hit the url via postman app.
  

1 comment

  1. Good one, helped a lot to understand the basics. Thank you.

    ReplyDelete