Now that we can authenticate our users, we need an easy way to retrieve data from an existing back-end system. In many cases, the back-end system does not return the data in the exact format we want, and/or it returns more data than our app needs.
The Kony Fabric Integration Services can consume data from any back- end system. You can use our standard technology connectors for REST, JSON, or SOAP web services. You can also use our enterprise business connectors that make it easy to connect to enterprise back-end systems like Salesforce or SAP, and browse for the data objects and services you want to expose to your app.
For this example, we will use a publicly available SOAP web service for getting weather information. To get the current weather and the weather forecast for a ZIP code, we will have to call two separate services.
To call the weather services, follow these steps:
In the Choose WSDL URL, select the option to specify the WSDL URL or upload the WSDL file.
In the Client Authentication field, select an identity provider from the drop-down list. This drop-down list shows identity providers only if you have created identity providers for OAuth 2.0 in the Identity page.
Under the Web Service Authentication, select one of the following modes:
None: Select this option if you do not want to provide any authentication for the service.
Basic: Provide User ID and Password if the external Web service requires form or basic authentication.
NTLM: Your service follows the NT LAN Manager authentication process. You are required to provide the User ID, Password, NTLM Host, and NTLM Domain.
To enable the proxy, select the Use proxy from settings check box. By default, the check box is cleared.
<ns1:ZIP>?XXX?</ns1:ZIP>
in the sample request. At this point, we could hard code a value, but since we want our app to provide the zip code, we need to provide an input variable name: <ns1:ZIP>$zip</ns1:ZIP>
. We then need to define that variable under the input tab including a test value of 10036.
city //City
state //State
temp //Temperature
The result will be converted to a JSON before being sent to the device.
Note: This is a simple example, but it shows the power and flexibility the Kony Fabric Integration Service provides to retrieve data and process it before returning an optimized JSON string to the device. You can also configure additional processing under the advanced tab including deploying custom code that executes before and after the service invocation.
ID | xPath | CollectionID |
---|---|---|
ForecastList | //ForecastResult/Forecast | |
date | Forecast/Date | ForecastList |
desc | Forecast/Description | ForecastList |
low | Forecast/Temperatures/MorningLow | ForecastList |
high | Forecast/Temperatures/DaytimeHigh | ForecastList |
daypct | Forecast/ProbabilityOfPrecipiation/Daytime | ForecastList |
nightpct | Forecast/ProbabilityOfPrecipiation/Nighttime | ForecastList |
Test your service and you will see the resulting XML showing the repeating collections of forecasts.
Last updated on : 04 March, 2021 | Copyright © 2014 Kony, Inc. All rights reserved. |