How to invoke kony mobile fabric from angular application

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

We want to invoke the services from another angular application. Services are configured on Kony mobile fabric.

Mobile Fabric version is 7.2.0.1_GA

Please share the complete process

Hi,

You can use kony javascript sdks. Please refer this documentation to download the JS file.

http://docs.kony.com/konylibrary/konyfabric/kony_fabric_user_guide/Content/JS/Installing_JS_SDK.htm

Here is a sample js code how to invoke service in MF, I hope this will help.

<script></script>

<script>

KNYMobileFabric = new kony.sdk();

KNYMobileFabric.init("f1e37985ad94c440b44XXXXX","a01495f1fe4a9741c9a53aXXXXXX","https://1000XXXXX.auth.konycloud.com/appconfig",successCallback, errorCallback);

function successCallback(res){

serviceName = "News";

integrationObj = KNYMobileFabric.getIntegrationService(serviceName);

operationName = "GetNews";

data= {};

headers= {};

integrationObj.invokeOperation(operationName, headers, data, operationSuccessObj, operationFailureObj);

//code for success call back

}

function errorCallback(res){

alert("error");

//code for failure call back

}

function operationSuccessObj(res){

//code for success call back

alert(res);

}

function operationFailureObj(res){

//code for failure call back

alert("error "+res)

}

</script>

Thanks