2

I am creating a Cross platform application using Kony Studio. We are having our backend and web services ready.

Can we consume same services with out accessing Kony middleware?

If yes, can you please help with some sample code and tutorials.

Apurv
  • 17,116
  • 8
  • 51
  • 67

3 Answers3

7

We can call consume the services without using the middleware using the HTTPRequest API

var request = new kony.net.HttpRequest();
request.onReadyStateChange = callbackHandler1;
request.open(constants.HTTP_METHOD_GET, service_url);
request.send();

You will get the result in the call. Go through the documentation for complete details.

flx
  • 14,146
  • 11
  • 55
  • 70
amrit_neo
  • 1,759
  • 4
  • 19
  • 39
6

To consume web service directly from Kony without using middleware, web service response should be in json. Otherwise, it should go through middleware.

jrh
  • 764
  • 13
  • 31
0

To consume the service otherwise you will have to go for an FFI implementation. This will lead to separate implementations for the different platforms that you are targeting. Therefore you should use the Kony middleware.

Mig82
  • 4,856
  • 4
  • 40
  • 63
sreejithkr
  • 424
  • 4
  • 6
  • this is ok, but we can consume services without using middle ware – amrit_neo Jun 12 '13 at 09:38
  • @sreejithkr Thanks. +1 for it. I will check. – Apurv Jun 12 '13 at 12:57
  • This is incorrect. Consuming an API directly from a Visualizer without implementing integration services in Fabric _is_ in fact possible using the `HttpRequest` API as suggested above by @amrit_neo. Furthermore, to propose FFI without explaining what FFI stands for nor posting some sample code on how to do it is not an optimal answer. Ergo the down-vote. – Mig82 Aug 09 '18 at 15:28
  • @Mig82 The answer posted above was long back with respect to Kony Version 5.x. I hope with respect to the Kony 5.x version, the visualiser was not available or the new apis. – sreejithkr Sep 30 '18 at 18:43