X

Shay Shmeltzer's Oracle Development Tools Tips

Calling Web Service with Complex Parameters in ADF Mobile

Shay Shmeltzer
Director of Product Management - Oracle

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.

Join the discussion

Comments ( 8 )
  • Sohi Sunday, March 3, 2013

    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?


  • guest Friday, July 5, 2013

    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?


  • guest Wednesday, September 25, 2013

    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!


  • shay Thursday, September 26, 2013

    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


  • Mohamed Friday, November 29, 2013

    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);

    }


  • guest Saturday, February 22, 2014

    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?


  • guest Thursday, May 8, 2014

    Hi I have followed your tutorial except that my WSDL comes from peoplesoft system. My app deploys to the android emulator correctly but when i run it I get the following errors. Can you help me out?

    HTTP status code 500

    Internal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request.

    Unable to get value for the property due to invalid binding iterator.

    Unable to get value for the property due to invalid binding iterator.


  • guest Tuesday, July 15, 2014

    Hi shay,

    I want to pass the two parameters to Webservice method

    public void rejectTaskList (List taskIds, String userName )

    {

    CustomWorklistClient workFlowClient = new CustomWorklistClient( userName ) ;

    try

    {

    workFlowClient.rejectTaskList( taskIds ) ;

    }

    catch ( Exception e )

    {

    e.printStackTrace() ;

    }

    }

    I want to pass List of taskIds as a one parameter and userName is another parameter But I don't Know how to pass the List of taskIds

    could you please help me how to pass the list of taskIds as a parameter.

    Regards,

    Shankar.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha