Configure and test your ADF REST Resource by Jeroen Rijnboutt

image

In my previous post I showed the steps you have to take to create your first ADF REST resource. You can find it here: First steps with REST services on ADF Business Components. I will continue my exploration in the world of ADF REST.

We are now going to configure the URL and test the new service.

After you run your application, you will see the endpoint in your JDeveloper log:

The first thing you will probably notice is the structure of the URL and there is little chance you will like it. Let’s change that first. There are two parts of the URL that can be configured, the Context Root (EMP-RESTWebService-context-root) and the URL pattern (/rest/).

The Context Root can be set in the Project Properties of the RESTWebService project. Open the properties and go to the Java EE Application tab. It shows an input field for the Java EE Web Context Root and you will recognize the name from your service URL. Choose a relevant and general name. It will be used for all your services.

The URL pattern is configurable in your web.xml file. This file is part of the RESTWebService project. Open it and go to the Servlets tab. Select the only Servlet in the list and open the sub tab Servlet Mappings. Here you can choose your own URL pattern. If you don’t want any pattern, you can enter: ‘/*’. Read the complete article here.

 

Developer Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

clip_image003 Blog clip_image005 Twitter clip_image004 LinkedIn image[7][2][2][2] Facebook image Meetups

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic Community,Oracle,OPN,Jürgen Kress

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.