External Services
External services solve the business logic of a transaction by invoking third-party services via a REST or SOAP communication protocol. SOAP services have a structured protocol and use an XML format, and are created in Studio by uploading a WSDL file, whereas REST services are more flexible and can exchange data in multiple formats.
From the External Services page (Global Logic > External Services) you can see all the external services created in the Studio environment, both SOAP and REST, with their basic information, such as name, description and protocol. These services are also displayed on the Services tab in the transactions editor.
From this page, you can create SOAP or REST services, and delete or edit any of the external services on the environment.
Note
You can also create external services from the Services tab in the transactions editor.
To create a service, click + New external service and then select API Rest or API Soap, depending on the communication protocol the third party uses.
Refer to Create a REST Service or Create a SOAP Service to learn how to create each of these services.
Note
You can also create a new service from the transactions editor. Open the Services tab and click add service +.
To create a service, click + New external service and then select API Rest or API Soap, depending on the communication protocol the third party uses.
Refer to Create a REST Service or Create a SOAP Service to learn how to create each of these services.
Note
You can also create a new service from the transactions editor. Open the Services tab and click add service +.
Create a REST Service
You can invoke a REST service to use HTTP communication protocols in your environment. You can use the GET method to request data from a resource, or the POST method to create or update a resource.
Follow the instructions below to create the REST service using either GET or POST method.
In the General Information tab, identify the service with a name that represents the information you want to receive, and a description that explains its functionality. You may also add tags as keywords that will help to identify the service in a search. Click Next to continue.
In the Method tab, define the HTTP method that calls the service to receive information on your end. Select the GET method and add the URL (endpoint that contains the information you need to receive) provided by the client or the service's owner.
You can invoke one or more business parameters previously created in Middleware by clicking the + icon, or by entering the business parameter's name in the Url field following the ${CODE} format.
Complete the Query Params with a parameter and its type, which is the data you are sending to the service. Select the type (string or number) from the Type drop-down menu. If you need to call more than one query, click + Add parameter. These queries will be added as inputs on your service's node when using it in the transaction. Click Next to continue.
Note
The Business Parameters list retrieves all the business parameters with a process type H and their values from your Middleware environment.
In the Settings tab, define the Body, the Headers and the Authorization settings of the method.
The method's body provides details for the server to find the information requested and to send a response. Fill in the Response field with the corresponding json.
The system generates a default header with its key and value. Click + Add header to add more headers as needed. Click Delete (trashcan icon) to delete a header.
In the Authorization tab, you can select Bearer Token as authorization setting.
Click Summary to continue.
The Summary modal window shows an overview with the information you provided to create the service. If the summary is correct, click Confirm.
Studio displays a message confirming that the REST service was successfully created. Click Close to return to the External Services page or click Create Transaction to create a transaction that invokes the service.
In the General Information tab, enter a name that represents the information you want to update or send, and a description for the service. You may also add tags as keywords that will help to identify the service in a search. Click Next to continue.
In the Method tab, define the HTTP method that calls the service to send information to be added to or updated in a database. Add the URL (endpoint where the information will be sent).
You can invoke one or more business parameters previously created in Middleware by clicking the + icon, or by entering the business parameter's name in the Url field following the ${CODE} format.
In the Query Params section, complete the key with a parameter you want to update. Select the type (string or number) from the Type drop-down menu. If you need to call more than one query, click + Add parameter. Click Next to continue.
Note
The Business Parameters list retrieves all the business parameters with a process type H and their values from your Middleware environment.
In the Settings tab, define the Body, the Headers and the Authorization settings of the method.
The method's body provides details for the server to add information to a database or to update the information already stored in it, and to send a response. Fill in the Request and Response fields with the corresponding JSON samples.
The system generates a default header with its key and value. Click + Add header to add more headers as needed. Click Delete (trashcan icon) to delete a header.
In the Authorization tab, you can select Bearer Token as authorization setting.
Click Summary to continue.
The Summary modal window shows an overview with the information you provided to create the service. If the summary is correct, click Confirm.
Studio displays a message confirming that the REST service was successfully created. Click Close to return to the External Services page or click Create Transaction to create a transaction that invokes the service.
To read a use case scenario of a login transaction with a REST service using the GET method, read Create a Configurable Transaction.
Create a SOAP Service
You can invoke a SOAP service to use XML communication protocols. The environment interprets the configuration information that comes in a WSDL file provided by the third party. This file publishes the methods and their corresponding input and output parameters in your environment.
Important
Contact your third-party service provider to obtain the WSDL file to create the SOAP service.
Follow the instructions below to create a SOAP service.
In the Service Information section, identify the service with a name that represents the information you are requesting, and a description that explains the service's functionality. By default, the service type is SOAP.
In the Technical Data section, upload the WSDL file. Click the upload icon that appears next to the WSDL field.
Once the file is loaded, the system fills out the Endpoint and Test Endpoint fields. Check the Technical Data section to view a list of the methods and their corresponding input and output parameters. Select a method to check its parameters.
Click Save service to save your service and finish.