1

I have created one Custom API in Oracle MCS for login authentication and I have an Application built in MAF. My doubt is how to call this Custom API from Oracle MAF application?

Arj 1411
  • 1,395
  • 3
  • 14
  • 36

2 Answers2

1

If you are using OEPE (Oracle Enterprise Pack for Eclipse), you can use this tutorial for consuming any REST service API,

For MCS-MAF support, the following YouTube should help,

Wanna Coffee
  • 2,742
  • 7
  • 40
  • 66
Raghu
  • 56
  • 1
0

Check out the MAF MCS Utility app (should be in your public examples folder) especially the source code.

More info can also be found in this link.

Short code example:

MBEConfiguration mbeConfiguration = 
    new MBEConfiguration(
          <mbe rest connection>,<mobileBackendId>,
          <anonymous key string>,<application key string>, 
          MBEConfiguration.AuthenticationType.BASIC_AUTH);
 mbeConfiguration.setEnableAnalytics(true);
 mbeConfiguration.setLoggingEnabled(false)
 mbeConfiguration.setMobileDeviceId(
         DeviceManagerFactory.getDeviceManager().getName());
 MBE mobileBackend = MBEManager.getManager().
         createOrRenewMobileBackend(<mobile backend Id>, mbeConfiguration);

CustomAPI customApiProxy = mbe.getServiceProxyCustomApi();
UserInfo userInfo = mobileBackend.getServiceProxyUserInfo();
Analytics analyticsProxy = mobileBackend.getServiceProxyAnalytics();
Storage storageProxy = mobileBackend.getServiceProxyStorage();
Wanna Coffee
  • 2,742
  • 7
  • 40
  • 66
User404
  • 2,152
  • 2
  • 27
  • 35