Hi Developers,
Before proceeding with this tutorial, have a look(detailed look) over the below mentioned tutorial :
http://oracle-maf-nakul.blogspot.in/2015/02/oracle-mafadf-mobile-hello-world-using.html
Also, complete the tutorial mentioned in the link till Step 8(Part 2) : After completion of wizard your data control should look as shown below :

Now we are ready to implement our programmatic implementation of hello world WSDL Solution.
Step 1 : Create a JAVA class and name it as HelloWorldDC.java. Paste the following code :
-----------------------------------------------------------------------------------------------------------------
package com.oracle.mobile.hello;
import java.util.ArrayList;
import java.util.List;
import oracle.adfmf.framework.api.AdfmfJavaUtilities;
import oracle.adfmf.framework.exception.AdfInvocationException;
import oracle.adfmf.util.GenericType;
public class HelloWorldDC {
public HelloWorldDC() {
super();
}
public String callHelloWSDL(String input) {
List pnames = new ArrayList();
List pvals = new ArrayList();
List ptypes = new ArrayList();
GenericType result;
String response = null;
pnames.add("arg0");
ptypes.add(String.class);
pvals.add(input);
try {
response = (String) AdfmfJavaUtilities.invokeDataControlMethod("Hello_WS", null, "sayHello", pnames, pvals, ptypes);
} catch (AdfInvocationException e) {
}
return response;
}
}
-----------------------------------------------------------------------------------------------------------------
Follow below mentioned link to get in depth knowledge of the invokeDataControlMethod :
http://docs.oracle.com/cd/E35521_01/apirefs.111230/e27204/oracle/adfmf/framework/api/AdfmfJavaUtilities.html#invokeDataControlMethod_java_lang_String__java_lang_String__java_lang_String__java_util_List__java_util_List__java_util_List_
Parameters explanation :
Step 2 : Create a data control :
Right click the HelloWorldDC.java and select Create Data Control. Once the wizard is ready you can see data control section modified as shown below :
NOTE : It is fine if you do not have "HelloWorld_WS" in your list.
Step 3 : Drag the callHelloWSDL(String) on to a page and perform the same steps mentioned from Step 9 as in : http://oracle-maf-nakul.blogspot.in/2015/02/oracle-mafadf-mobile-hello-world-using.html
Step 4 : Deploy and test result :
Before proceeding with this tutorial, have a look(detailed look) over the below mentioned tutorial :
http://oracle-maf-nakul.blogspot.in/2015/02/oracle-mafadf-mobile-hello-world-using.html
Also, complete the tutorial mentioned in the link till Step 8(Part 2) : After completion of wizard your data control should look as shown below :
Now we are ready to implement our programmatic implementation of hello world WSDL Solution.
Step 1 : Create a JAVA class and name it as HelloWorldDC.java. Paste the following code :
-----------------------------------------------------------------------------------------------------------------
package com.oracle.mobile.hello;
import java.util.ArrayList;
import java.util.List;
import oracle.adfmf.framework.api.AdfmfJavaUtilities;
import oracle.adfmf.framework.exception.AdfInvocationException;
import oracle.adfmf.util.GenericType;
public class HelloWorldDC {
public HelloWorldDC() {
super();
}
public String callHelloWSDL(String input) {
List pnames = new ArrayList();
List pvals = new ArrayList();
List ptypes = new ArrayList();
GenericType result;
String response = null;
pnames.add("arg0");
ptypes.add(String.class);
pvals.add(input);
try {
response = (String) AdfmfJavaUtilities.invokeDataControlMethod("Hello_WS", null, "sayHello", pnames, pvals, ptypes);
} catch (AdfInvocationException e) {
}
return response;
}
}
-----------------------------------------------------------------------------------------------------------------
Follow below mentioned link to get in depth knowledge of the invokeDataControlMethod :
http://docs.oracle.com/cd/E35521_01/apirefs.111230/e27204/oracle/adfmf/framework/api/AdfmfJavaUtilities.html#invokeDataControlMethod_java_lang_String__java_lang_String__java_lang_String__java_util_List__java_util_List__java_util_List_
Parameters explanation :
dcName(The Data control we created) - The name of the DataControl on which the method (or the nested object that declares the method) is declared.instanceName - The name of the nested object on the DataControl that declares the method (can be null if the method is on the root DC).methodName(In our case sayHello is the method/operation) - The name of the method to invoke.parameterNames - The names of any named parameters. Required, elements must be of type java.lang.String.parameters - The parameter values. Elements can be of any type. parameterTypes - The parameter types. Elements must be of type java.lang.Class. Can be null if the data control implementation does not require parameter types for invocation. Step 2 : Create a data control :
Right click the HelloWorldDC.java and select Create Data Control. Once the wizard is ready you can see data control section modified as shown below :
NOTE : It is fine if you do not have "HelloWorld_WS" in your list.
Step 3 : Drag the callHelloWSDL(String) on to a page and perform the same steps mentioned from Step 9 as in : http://oracle-maf-nakul.blogspot.in/2015/02/oracle-mafadf-mobile-hello-world-using.html
Step 4 : Deploy and test result :