Application Builder Cloud Service 17.1.3 release allows users to expose an external web service as a business object by creating a custom business object provider (BOP). In this blog we will create a Business object leveraging the REST APIs provided by GitHub using the custom BOP template that comes out of the box.
Evaluate the REST resource
GitHub exposes a set of REST APIs to fetch information regarding the user’s account.The complete list of all resources that can be fetched and the authentication schemes available can be seen here https://developer.github.com/v3/
For the purposes of this blog I have chosen https://api.github.com/users/shraybansal/repos to fetch the repositories information for the user shraybansal, whose account consists of two public test repositories. If the user provides the Basic Auth credentials during authentication, then the REST request fetches information regarding private and public repositories associated with the authenticated user. Note that the REST API only fetches information of public repositories the user is associated with if no credentials are provided.
Even though GitHub supports Cross Origin Resource Sharing (CORS) and allows AJAX requests from all origins, an important detail to note is that in this blog we have leveraged the BOP Authenticator which implicitly takes care of the CORS request made through BOP. If BOP Authenticator is not leveraged during configuration then CORS will have to be enabled on the server to allow AJAX requests from the ABCS instance. Moreover, the REST APIs should be SSL enabled (https). Read the complete article here.
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.