Calling Web Service with Complex Parameters in ADF Mobile

Many of the SOAP based web services out there have parameters of specific object types - so not just simple String/int inputs. The ADF Web service data control makes it quite simple to interact with them. And this applies also in the case of ADF Mobile.

Since there were several thread on OTN asking about this - I thought I'll do a quick demo to refresh people memory about how you pass these "complex" parameters to your Web service methods. By the way - this video is also relevant if you are not doing mobile development, you'll basically use the exact same process for building "regular web" ADF applications that access these types of Web services.

One more thing you might want to do after you create the page is look at the binding tab to see the method call in there, and notice the parameters for it in the structure property. Go and look at their NDValue property to get the complete picture.

Comments:

Hi Shay, thank you for this informational demo. I'm trying to expose PERSONAL_DATA component from PeopleSoft as a web service and consuming that service using the ADF Mobile.
I'm successful in using the "Find" method (complex parameters) to search the database. However, when I try to use the "Get" method (Emplid as input parameter and fetching personal data), it gives me the following error (application deployed on Android emulator):
HTTP status code 500
Internal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request.

Could you please help?

Posted by Sohi on March 03, 2013 at 09:29 AM PST #

Even m facing the same below error
HTTP status code 500
Internal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request.

Any solution?

Posted by guest on July 05, 2013 at 04:30 AM PDT #

Hi Shay,
Is it possible to invoke a secured non-weblogic (NetBeans/Apache) WebService from ADF-Mobile application? I've heard that OWSM Mobile Agent only supports Basic Auth and Basic Auth over SSL and WS-Security Username Token and WS-Security Username Token over SSL policies.
So, how to configure security for NetBeans/Apache WebService, if I've to access it from ADF-Mobile? Thank you!

Posted by guest on September 25, 2013 at 08:35 AM PDT #

Guest - you should be able to define a secured app on any server that prompts for a web form login. Then point ADF Mobile to that application and you should be set.
See more about security here:
https://blogs.oracle.com/shay/entry/accessing_secure_web_services_from

Posted by shay on September 26, 2013 at 07:36 AM PDT #

I've the same scenario but i want to call it programatically please

I've adf mobile application that is built with jdeveloper 11.1.2.4 with the latest ADF mobile extension
I've consumed a webservice that takes Object credential , String employeeId and return salary
the credentials Object consist of (String username , String password) in the soap header

i want to know how to consume this webservice and pass user name , password to the soap header as i'v used this method

List paramNames = new ArrayList();
paramNames.add("user_number");
// i don't know how to add the complex parameter

List paramsValues = new ArrayList();
paramsValues.add("45454");
// i don't know how to add the complex parameter

List paramTypes = new ArrayList();
paramTypes.add(String.class);

try {
result =
(String)AdfmfJavaUtilities.invokeDataControlMethod("MYDC", null, "userInfo", paramNames,paramsValues, null);

} catch (AdfException ae) {
ae.printStackTrace();
throw new AdfException("Please check your network connection", AdfException.ERROR);
} catch (AdfInvocationException aie) {
aie.printStackTrace();
throw new AdfException("Please check your network connection", AdfException.ERROR);
}

Posted by Mohamed on November 28, 2013 at 11:38 PM PST #

I am working on a requirement where a webservice does create operation, where one of the parameter is a collection.
eg. Create (param1, param2)

param2 (Structure)
PO
PO contains ponumber,custnumber,custname
ItemDetails (repeatable) contains Itemnumber, quantity

When i drag and drop ItemDetails as ADF mobile Form, only i could see Inputtext for Itemnumber and quantity. But these controls are not repeating.

How do design a input form for repeatable Items?

Posted by guest on February 22, 2014 at 04:34 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today