This Blog entry describes the Azure Integration approach to connect OnPremise Webservices using OnPremise Data Gateway, Azure Integration Logic Apps and Logic App Custom Connector. It also describes an approach to read files from OnPremise using Azure Integration.
UseCase : Azure Integration for OnPremise
Consuming OnPremise webservice in Azure integration service. There will be a number of cases where enterprises want to connect their OnPremise environments to the cloud and expose data via webservice. This blog describes a method to consume the on premise web service in Azure Logic Apps and also reading the files from the on premise file system.
The components used are:
- Custom webservice on onPrem
- OnPremise Data Gateway
- Logic Apps custom connector
- Logic Apps
The onPremise webservice could be a REST or a WCF webservice. The communication between Ompremise and cloud happens using the OnPremise data gateway. Steps to configure and install a Data gateway has been described here.
Export Webservice collection using Postman for Azure Integration
We need to create a PostMan collection of our webservices for creating a custom Logic App connector. Detailed steps and additional information can be found here
- In Postman, on the Builder tab, select the HTTP method, enter the request URL for the API endpoint, and select an authorization protocol, if any.
- Enter key-value pairs for the request header. For common HTTP headers, you can select from the dropdown list.
- Enter content that you want to send in the request body. To check that the request works by getting a response back, choose Send.
- Choose Save.
- Under Save Request, provide a request name and a request description. The custom connector uses these values for the API operation summary and description.
- Choose + Create Collection and provide a collection name. The custom connector uses this value when you call the API.
- Above the response window, choose Save Response.
- At the top of the app, provide a name for your example response, and choose Save Example.
- Under Headers, hover over each header, and choose the X next to the header to remove it. Choose Save to save the collection again.
- Choose the ellipsis (. . . .) next to the collection, then choose Export.
- Choose the Collection v1 export format, choose Export, then browse to the location where you want to save the JSON file.
Detailed steps and additional information can be found here
Create an Azure Integration Custom Logic App Connector
- Log on to https://portal.azure.com/ with the account used for Gateway registration
- Select the correct Subscription and search for Logic Apps Custom Connector
3. Click on the Logic Apps Custom Connector and Click on ADD
4. Then fill in the following information: Correct Subscription, Resource group, Custom Connector name and location
5. Click Review + Create and then Click on Create
6. Once it is created, then Go to the Resource and click on Edit
The fill in the following information
API End Point: REST ( SOAP based on your service type)
Select Postman collection V1 and import the file downloaded from Postman.
This will fill in the information such as description, scheme, hostname and base Url . Ensure the information is correct. If not edit them.
Ensure to select “Connect via on premise data gateway” and optionally upload an image
7. Click on Security, then select then correct authentication scheme and click on the definition
8. Validate the definition and click on “Update connector”
Interact with an on-premise webservice in Azure Integration Logic App
- Create A new Logic App with a start condition either with a scheduler or an HTTP trigger
- Add an action and search for the custom connector, which would appear in the custom section
- Select one of the actions from the custom connector. Each method in the webservice would appear as the actions here.
- While selecting the action, this would bring up a dialog to create an API Connection required to communicate with the webservice. Then fill in the information such as
Connection Name: A name to identify the API connection,
Authentication Type : Auth type used by the web service
Subscription: The subscription where Gateway is present
Connection Gateway: Choose your on-premise gateway which you would want to use to connect to on-premise web service
Then click on Create
- Enter the values required to call the web method.
Interact with an on-premise file system from Azure integration Logic Apps
- Click on a new Action on the Logic app, search for “File System” and select any of the following action
- This would bring up a dialog to create an API connection to connect to the file system and Click on Create
- Click on save and then run it and the run should show the results from OnPremise webservice and the file system
- Azure Integration: Generate a Flat file with ANSI encoding using Logic App
- Azure Integration: Dynamics 365 UO DMF Data Export using Logic Apps
- Dynamics 365 UO Integration Design Patterns
- Azure Integration: Setting null value in Logic App Action to Dynamics 365
- Dynamics 365 UO: Integration using oData/REST API