WL.Client.makeRequest() the function is deprecated in MFP 8.0. What are the uses of the function? If any document you have please share with me.
What is the correct solution for this In MFP 8.0
After Run migration command mfpmigrate scan. I am getting like this
Create a custom adapter that provides the same functionality
Please given any document related the function and what the alternative solution in MFP 8.0
Thanks,
Karthik S.
WL.Client.makeRequest() API allowed making outbound calls to endpoints.
In MFP 8.0, you should use WLResourceRequest API instead. API documentation here.
WL.Client.makeRequest() the function is deprecated in MFP 8.0
In IBM MobileFirst Foundation 8.0, You have to install mfpdev-cli & cordova-plugin-mfp then use WLResourceRequest. see the sample:
var resourceRequest = new WLResourceRequest(
"/adapters/JavaAdapter/users",
WLResourceRequest.GET
);
var formParams = {"param1": "value1", "param2": "value2"};
resourceRequest.sendFormParameters(formParams);
resourceRequest.send().then(
onSuccess,
onFailure
)
I suggest that you will take a tour of the MobileFirst Foundation 8.0 migration from Earlier Releases . See here:
Migrating from Earlier Releases: http://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/upgrading/
Migrating existing Cordova and hybrid applications: http://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/upgrading/migrating-client-applications/cordova/#starting-the-cordova-app-migration-with-the-migration-assistance-tool
Create a custom adapter that provides the same functionality
Take a tour of how to create custom adapter in IBM MobileFirst 8.0: http://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/adapters/creating-adapters/
Related
Facing the below issue when trying to invoke java code from javascript adapters with Mobilefirst 8.0.
Sample code from the below link is used for testing.
https://github.com/MobileFirst-Platform-Developer-Center/Adapters/tree/release80
Project structure
com.ibm.mfp.server.js.adapter.internal.JavascriptManagerImpl E FWLST0904E: Exception was thrown while invoking procedure: subtractTwoIntegers in adapter: UsingJavaInJavaScriptAdapters
org.mozilla.javascript.EcmaError: TypeError: [JavaPackage com.sample.customcode.Calculator] is not a function, it is object. (UsingJavaInJavaScriptAdapters-impl.js#24)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3951)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3929)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3962)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3981)
at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:4036)
at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:4024)
at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2502)
This normally happens when your server is running a version of Java that is different from the one with which the adapter was built.For example, MFP server is running on JDK 1.7, while the adapter has been built using JDK 1.8.
Ensure your server is running the same version of Java that is used to build the adapters.
What is major difference between MFP V7.1 and V8.0.
I am trying to explore Mobilefirstplatform on Bluemix, before that I wanted to understand the enhancements of V8.0
Here is a list of what's new in MFP 80:
1) What's new
2) Discontinued/Deprecated features
Feature list comparison across versions:
MobileOS to feature mapping across versions
I tried the migration process of mobilefirst from v6.3 to v8.0. I installed the migration tool. I tried to migrate a sample program in IBM mobilefirst v6.3 to v8.0 using the command mfpmigrate as shown below. Although the input to the command is a v6.3 program, it says that No supported platforms detected.
D:\MobileFirst>mfpmigrate client --in AdapterBasedAuth\apps\DoubleStepAuth --out
MigrationDemo
Error: An error occured during execution of command.
Error: No supported platforms were detected to migrate
Could you please help me resolve the above mentioned problems.
Thanks a lot in advance!
This is expected, as the sample application AdapterBasedAuthenticationHybridProject is not coming with any platforms. You need to first add a supported platform using MobileFirst Studio - iOS, Android etc...
I'm using mobilefirst 7.1 for eclipse juno on windows 7.
I tried to call default adapter which is created by mobilefirst it is showing an error
Procedure invocation failed: ContextPath/authorization/v1/testtoken
what might be causing the problem?
MobileFirst Platform Foundation 7.1 does not support Eclipse Juno. First use either Eclipse Kepler or Mars, install the latest available 7.1 build from the Eclipse Marketplace and see if it is failing still.
If it will continue to fail, provide full reproduction steps.
We are using Worklight enterprise 6.2 with fix packs and we are planning to upgrade to 6.3 in the next month (beginning of May 2015). However, we see now that IBM is about to release MFP 7.
Can you please clarify to me those queries:
What is the impact on the project which has been developed on version 6.2 to be moved to 6.3 or 7?
What is the recommendation for us in terms of upgrading, should we go immediately to WL7 or to 6.3 first?
We are very close to the production and our concern that the WL7 "might" be unstable or contains issues that we might face in a critical time."Feedback would be appreciated"
MobileFirst Platform Foundation 7.0 is not about to be released - it is already released.
Lots of changes in both 6.3 and 7.0. Read the documentation to see what's changed...
6.3: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_6.3.0/com.ibm.worklight.getstart.doc/start/c_release_notes.html
7.0: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.getstart.doc/start/c_release_notes.html
In terms of your project structure, starting 6.3 the adapter thread pool has been removed and you are now in complete control of it. Your adapter XML will be upgraded to the new structure.
In terms of technology, starting 7.0 there is REST support together with a new authentication mechanism - OAuth. Classic authentication is as before and is still there. There are also now Java adapters in addition to JavaScript adapters, and lots more.
7.0 is indeed new, but provides you with a lot of new possibilities.
6.3 is very stable (that is not to say that 7.0 is not stable, but it's also very new).
We cannot decide for you if to upgrade or not, it sounds like you are already considering the right things to consider.
Read about the two releases.