Expose SOAP API Through API Gateway
Last updated
Last updated
Go to OpenShift web console, make sure you're in Administrator perspective, change Project to demo, then go to Networking -> Services menu, and then click on the service you need to expose it's API(s) through API gateway.
Copy the Hostname of the service and note the port number as well. Note that we use the Service object hostname instead of the Route's URL because:
the API gateway (APIcast) is deployed on the same cluster so it can internally access the Service in different projects/namespaces.
We need API consumers to access the API via API gateway only so the (public) Route's URL shouldn't be used and should be deleted later.
Open 3scale API Management admin web console using the URL and credential provided at the end of the installation process. Then from the main dashboard, click on Create Backend button.
Enter following details then click Create Backend button.
Name: Employee SOAP Service Backend
Private Base URL: http://employee-soap.demo.svc.cluster.local:8080/soap/service/employee
Note. System name and Description are optional fields.
A new backend should be created.
Click on dropdown list menu then select Product.
Click Human Resource Services link.
Select Integration -> Backends menu from left panel.
Click Add Backend button.
Enter following details then click Add to Product button.
Backend: Employee SOAP Service Backend
Path: /soap/employee
A new backend should be added.
Select Integration -> Mapping Rules menu from left panel, then click Create Mapping Rule button.
Enter following details then click Create Mapping Rule button.
Verb: POST
(HTTP method for a particular API)
Pattern: /soap/employee
(A particular REST API endpoint exposed via API gateway)
method or Metric to increment: Select Metric
option and Hits
from dropdown list menu.
A new Mapping Rule should be created.
Once we've configured everything in place in API Manager, we have to promote all changes to API Gateway (APIcast) to apply those changes.
Click on Integration -> Configuration menu from left panel. Then click Promote v.N to Staging APIcast button to promote changes to staging API gateway and click Promote v.N to Production APIcast button to promote changes to production API gateway.
Click on Applications -> Listing menu from left panel. Then click Test Corp HR Mobile link to open Application dashboard.
Copy User Key.
Open Postman then update user-key
variable and click Save button.
Test the APIs using 3Scale API Testing (API Key Auth) collection.