I recently needed to help someone build a Landmark call to a custom API Gateway web service interface using OAuth 2.0 and thought I would share some tips that I found. First off, to build the new .wsi file I had to navigate to UserWebServiceInterface business class via menu search as I didn’t find any links in Config Console. Once I created the shell record, then I could edit from Config Console fine. I’m sharing a made-up example to simply things.
EmployeeSecurityRolesWSI is a WebserviceInterface
wsdlURL is ""
endpoint is ""
service is ParkerOAuth
service style is REST
authentication is OAUTH
GetSecurityRoles is a Find Action
method is "/usermgt/v2/users/<IFSID>?includeGroups=true&includeAdditionalProperties=true&includePasswordExpireDate=false"
http method is GET
Input Record namespace is ""
IFSID is Alpha size 60
element name is useridentifier
required
Output Record
Response is JSONObject
MyHTTPInfo is a HTTPInfo
To get the OAuth 2.0 call to work, you need to build a record in the OAuth business class (don’t confuse this with the OAuth2Configuration business class). The easiest way to build the OAuth record is by using the action called “Create From ION API Credentials”. That means first building and downloading your IONAPI file from API Gateway à Authorized Apps. There are several examples of how to do this documented by the Infor OS team out on the internet. In my example, the Landmark record is named “ParkerOAuth”. After created, you can see the OAuth type is “Generic 20” which means OAuth 2.0. The name of the OAuth record becomes the “service is” value and the “authentication is” value is OAUTH.
I’m using REST in my example but didn’t want to hard code the endpoint into the .wsi file, so I created a Configuration Parameter record. This gets linked by have the record defined as Component = config and the key = <WSI file name>.WSI.ENDPOINT with everything in all caps. My key became EMPLOYEESECURITYROLESWSI.WSI.ENDPOINT and for the value in my example it is https://mingle-ionapi.inforcloudsuite.com/ACME_DEV/ifsservice. You could also define a <WSI file name>.WSI.WSDL if you are using SOAP.
For the method call, if you want to pass in dynamic application parameters you put those in < > brackets as in my example of supplying the IFS GUID value. I realize this is a silly business example, so just think of it as your Hello World example.
For the Output Record, I have both the JSON response and HTTP Info listed. The HTTP Info is often not populated. For example, if the call works fine then the JSON comes back and the HTTP Info is blank. If the landmark call fails, then the HTTP Info is blank and so is the JSON. If Landmark calls the API Gateway and it complains about something, then I did get information back in the HTTP Info variable. If the JSON does come back, then using the select “$.jsonpath” Landmark syntax to parse it.
FindConfigAccess is an Instance Action
completion message is "_"
Action Rules
invoke GetSecurityRoles EmployeeSecurityRolesWSI
invoked.IFSID = "fecd69blah-blah-blah-d4f829"
WSIResponse = result.Response
MyHTTPInfo = result.MyHTTPInfo
SecurityText = WSIResponse select "$.response.userlist[0].name.givenName"
In this example, SecurityText gets set to the first name of the IFS GUID value returned in the JSON response.
I hope you found some of this helpful.