Creating a REST API for SOA Service
Key Points
- The tutorial walks through creating a new REST API in IBM API Connect by logging into the management portal, navigating to Drafts, and adding a new API with a custom title.
- It configures the API to use HTTPS, consume and produce JSON (instead of the backend’s XML), retains the default security requiring an IBM client ID, and changes the default GET method to a POST to match the SOA service.
- By uploading the WSDL (WISLE) file, API Connect automatically parses the available backend services and generates corresponding operations, such as “account inquiry” and “check request.”
- The guide then shows how to manually build request and response definitions by adding each JSON property to the inbound “check request” and outbound “check response” models, ensuring the API translates between JSON payloads and the backend’s XML format while hiding the real backend URL from callers.
Sections
Full Transcript
# Creating a REST API for SOA Service **Source:** [https://www.youtube.com/watch?v=exZ1YP0jjug](https://www.youtube.com/watch?v=exZ1YP0jjug) **Duration:** 00:09:32 ## Summary - The tutorial walks through creating a new REST API in IBM API Connect by logging into the management portal, navigating to Drafts, and adding a new API with a custom title. - It configures the API to use HTTPS, consume and produce JSON (instead of the backend’s XML), retains the default security requiring an IBM client ID, and changes the default GET method to a POST to match the SOA service. - By uploading the WSDL (WISLE) file, API Connect automatically parses the available backend services and generates corresponding operations, such as “account inquiry” and “check request.” - The guide then shows how to manually build request and response definitions by adding each JSON property to the inbound “check request” and outbound “check response” models, ensuring the API translates between JSON payloads and the backend’s XML format while hiding the real backend URL from callers. ## Sections - [00:00:00](https://www.youtube.com/watch?v=exZ1YP0jjug&t=0s) **Untitled Section** - ## Full Transcript
API connect video
series this presentation will show you
how to create a rest API to a SOA
service begin this construction by
logging into the
dashboard of your API
connect management
portal click the menu icon and then
click Direct
drafts once you arrive at the drafts
screen click on
apis click plus to add a new
API in the ensuing dialogue box enter a
title for the new
API and then click add this brings you
to the design screen for the new
API going down the screen we come to
schemes which we must use
https if we are going to use this on Blu
miix or any public
Cloud this will consume application Json
and produce application Json as opposed
to the XML that the backend SOA is is
expecting we leave the security
definitions in place this will require
any application to provide an IBM client
ID under paths which is the path that
the user of the API will invoke we will
change that to something that we will
then publish to the users of this new
rest API they will never see the real
URL of the actual back
end this currently is set up by default
as a get however because this is a SOA
back end we do want a post rather than a
get and we will not use the get so we
delete it
we now must create a set of
services that actually represent the
back
end we do this by uploading a wisle
file here we look at the actual wisd
file and we see under the wisd
definitions the name space of the
backend SOA resource and a a check
request xsd and a check response
xsd for now however all we need to do is
upload the
wisle and the wisle is pared
automatically and shows you the services
that are available we pick the one
service that we want to use here this
automatically creates two Services an
account inquiry and a check request
which which are defined in the
wisle now we go create the definitions
that are based on the inbound Json
payload we begin to create the name of
the definition which in this particular
case will be the Json check
request and now we must populate the
name of this object with the various
properties
so we start by defining the first of the
properties here we see the inbound Json
payload for
reference you will need to create all of
these properties in the definition that
we are creating for the API
connect so here we create pay account
name now I'm not going to show you how
we do all of these you can understand
how you make those when you're all done
it'll look something like this notice
that this continues to add new
properties to the top of the list rather
than the bottom of the
list we'll now create the definition for
the
response just as before we see an
example of what the Json check response
is that we want to send to the original
caller of the AP
I so we have a check
response and once again we walk through
the elements that are in the outbound
Json
payload one by one and create these
properties and we won't walk through all
of those particular steps once you're
done you have these two definitions
check response and check request and we
have these two services that came from
the wisd
now we assemble our API logic click
assemble and then on the assemble screen
click data
power then remove the invoke that we
will not
use once you create a service you can
now simply drag the service up onto the
assembly line and because it knows that
you created this service from a wisel
that represents a backend service it
automatically creates the two maps the
maps translate or map the Json elements
that come from the
request to the XML elements that the
backend Sea Service is
expecting and here you can see that
there's quite a a list of these possible
objects that again came from the wisle
but we want the one that we
created here we are now at the input map
you'll notice on the left is the
definition we created and on the right
is the XML definition that came out of
the whsle now we simply drag and connect
the various elements together
we have to repeat this process in order
to do the back end or in order to deal
with the response coming from the back
end once the SOA back end has
responded so we proceed the same way we
create the Maps using the drag androp
capabilities of the user interface
once this is
complete we can now go and arrange
to set up the actual invocation which is
in between the two maps it's a good idea
to save it first so that the invocation
can show you any warnings that happen to
be
there the target URL is coming directly
out of the
wisle you may need to change this URL
depending
on how you built your back end or where
you placed your back
end and examination of the remaining in
inputs to the invoke show that we are
only using the
defaults click all apis in the upper
leftand corner to return to the list of
all available
apis your new rest to SOA API is now
available to publish in any product that
you
choose for