Monday, July 17, 2017

#585 APIP CS managing Service Bus REST APIs

Simple scenario here -
I have a BPEL process running on SOA CS. This BPEL process validates the status of a visa.
The functionality is then REST enabled, via a Service Bus process, also running on the Oracle Cloud Platform.

Defining the API in Apiary

Just to show the API Design First Approach -























Naturally, I can test the API in Apiary, via it's Mock Server.
This allows my mobile developer to go off and create her
compelling mobile app, while I concentrate on the backend business
service implementation.

The Business Service Implementation


Here is the BPEL process - not much to it, but you get the idea!



















Here is the Service Bus process -



I test this locally, using the embedded SOA Server that comes with JDeveloper.

The SOA CS Environment


I check for the IP address of the SOA Server by going to the Compute Cloud Service Console -

I have obfuscated the public and private ips in the following screenshot -

I will use this when deploying the artifacts from my local JDeveloper to SOA CS.

Deploying to SOA CS

I deploy the SOA composite to a SAR file and import it intoo SOA CS via enterprise manager.
Now to the Service Bus project -
Ok, one should script this, use a deployment plan etc. but the lazy man's way is simply
to change the references to localhost in the Service Bus project -



Again, the ip address in the screenshot has been obfuscated, but you get the drift.
Note: there are 2 occurrences of the ip address in this file - I change both of them.

I now export the Service Bus project and then import into Service Bus on SOA CS -


Networking on SOA CS


You may have noted port 9074 on the wsdl screenshot.
This is my https port, 9073 is http.
I need to ensure these are open. I do this via the Compute Cloud Service console - Networking



Here is the security application -


I have done the same for port 9074.

Test the API using Postman





Yes, I have wiped the name and surname.

So it is working fine.

Now back to API Platform CS to manage the API.

Create the API Definition in API Mgr Console


The REST endpoint is
http://mySBIP:9073/VisaChecker1SB/VisaCheckREST/visaCheck?emiratesId=12345

I create an API definition based on this. Check out my posts on API Platform CS on the atomic steps
to do this.

Here are a couple of screenshots -

















Here I create the link to the project in Apiary -
















I then deploy the API to a gateway and publish to the APIP CS developer portal -

The developer can find the API and test it out.




Great Stuff!










No comments:

Post a Comment