Oracle ADF Mobile getting array of objects from webservice

hi,
i am trying to fetch a certain number of records using a webservice call and then storing in the SQLLite DB in the mobile.
i understand i can create a data control using the webservice > then?
my webservice returns an array of objects.
how can i do that?
regards,
ad

It's fairly easy.
What I have done is created a WebService Controller (plain java class) which calls the methods (from the WS) programmaticly.
Example :
public class WSController {
    private final String WSDataControllerName = "ThisIsTheNameOfMyWebserviceDataControl";
    private List pnames ,ptypes ,params;
    public WSController() {
        super();
    public List getAllActioncodesFromWS()
       //start - WS empty params
        pnames = new ArrayList();
        params = new ArrayList();
        ptypes = new ArrayList();
        pnames.add("findCriteria");
        params.add(null);
        ptypes.add(Object.class);
        pnames.add("findControl");
        params.add(null);
        ptypes.add(Object.class);
        //end - WS empty params
        List actionCodes = new ArrayList();
        try
            GenericType result = (GenericType)AdfmfJavaUtilities.invokeDataControlMethod(WSDataControllerName, null, "findActioncodesView1",pnames, params, ptypes);
            if(result!=null)
                for (int i = 0; i < result.getAttributeCount(); i++)
                    GenericType row = (GenericType)result.getAttribute(i);
                    Actioncode wd = (Actioncode)GenericTypeBeanSerializationHelper.fromGenericType(Actioncode.class, row);
                    actionCodes.add(wd);
        catch (AdfInvocationException e)
            e.getMessage();
        catch (Exception e)
            e.getMessage();
     return actionCodes;
    }I also defined a Pojo named Actioncode :
Note that the attribute names are completly the same as the VO from the web service.
public class Actioncode {
    String Actioncode,Descript1;
    public Actioncode() {
        super();
    public Actioncode(String Actioncode, String Descript1) {
        super();
        this.Actioncode = Actioncode;
        this.Descript1 = Descript1;
    public void setActioncode(String Actioncode) {
        this.Actioncode = Actioncode;
    public String getActioncode() {
        return Actioncode;
    public void setDescript1(String Descript1) {
        this.Descript1 = Descript1;
    public String getDescript1() {
        return Descript1;
}Since the WS method returns a GenericType, you can 'convert' that object to an POJO.
Read more about it here :
http://adf4beginners.blogspot.be/2013/01/adf-mobile-how-to-iterate-over-all-rows.html
I know the blog post is about iterating over rows in an iterator, but it's just to illustrate how you can work with the GenericType

Similar Messages

  • Oracle ADF mobile using elocation mapviewer can not get the tiles

    Hi,guys
    Recently,I'm using oracle adf mobile to develop a application.
    I set a amx page as a Local html page in order to display a elocation map,in this html page, 
    I use the jslib:http://elocation.oracle.com/mapviewer/jslib/v2/oraclemapsv2.js
    the mapviewer:http://elocation.oracle.com/mapviewer
    It can display the elocation map in pc browser,and also in Android default browser
    But WHen deploy it to MOTOROLA touch device,the elocation map can not display,but it can get the jslib.
    Can anybody help me?
    Thank you!

    Hi,
    To display maps, have a look at the HR sample application that comes with the ADF Mobile extension. You will see how you can use the map viewer without using JS for it. There is a map viewer component for AMX pages. The demo is in PublicSamples.zip located in <JDeveloper11124 Home>/jdeveloper/jdev/extensions/oracle.adf.mobile/Samples . Because the sample application is a bit larger than dept/emp, have a look at the tablet AMX pages.
    Frank

  • AdMob support in Oracle ADF mobile

    hi,
    i had posted this earlier but didn't get response at that time. so posting again.
    is there a way to integrate AdMob into Oracle ADF mobile application (on android)?
    regards,
    ad

    Hi,
    want to leave a final answer to someone from the mobile team but as it appears AdMob is native device code, which means it cannot be incorporated to ADF Mobile as it only supports JS, HTML 5, AMX and Java
    Frank

  • Oracle ADF Mobile Applications

    Dear Experts,
    Please tell me details of which mobile set is compatiable/suitable for Oracle ADF Mobile Applications. as I am working on Oracle ADF.
    I have to test some Oracle ADF Mobile Applications on mobile.
    Thanks in Advance.
    Shiv Naresh Gupta
    08795317510

    Excerpts from http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfmobilefaq-1866697.pdf
    Both iOS (5.x and above) and Android (2.3.x and above) devices are
    supported. Furthermore, both the tablet and smart phones running
    these mobile operating systems are supported.So basically any handset which supports this version of OS should do. Please check how to deploy etc. in the docs to get more idea.

  • Oracle ADF Mobile Client extension not found in JDeveloper 11.1..2.2?

    Hi. I was trying to install the extension for mobile development in ADF but unfortunately I could not find the extension.
    I went to Help -> Check for Updates -> Official Oracle Extensions and Updates. Yet i did not find the "Oracle ADF Mobile Client extension" there.
    I am running Jdeveloper 11.1.2.2.
    Is the Oracle ADF Mobile Client framework compatible for 11.1.2.2? Or is it no available anymore? Can someone please enlighten me? Thanks!

    Re: How to get the ADF Mobile Client extension

  • Using oracle adf mobile

    It also comes with PhoneGap. which allows you to use any feature your phone offers, like sensors and camera. It's probably the most complete solution for mobile development out there, simply because with Oracle ADF Mobile, you can write Native, Hybrid or Web applications for your smartphone and tablet.
    Do you want to take a quick look on what can be done with it? Check out this video!
    Now, to start with Oracle ADF Mobile, here are the first steps you will have to go through.
    1.     Download Oracle JDeveloper
    Go to this link and download the install file for your environment (Windows, Linux-32bit or Generic)
    2.     Install JDeveloper (of course)
    If you need help on this, look at the documentation (if you've downloaded 11gR2, click here)
    3.     Download Oracle ADF Mobile Bundle
    This is the download page for Oracle ADF Mobile. Accept the license as usual at the top, and follow with the Download button. It will take you to another page, where you will see a table containing a download link. Click on it and it will start downloading a ZIP file.
    4.     Start JDeveloper
    Start Oracle JDev. It may self update. Restart the IDE if you are asked to.
    5.     Go to Help > Check for updates
    6.     Click Next and make sure you are at the "Source" tab
    7.     Select "Install From Local File"
    8.     Select the Oracle ADF Mobile ZIP you downloaded on step 3
    9.     Finish the process
    Now you have JDeveloper with Oracle ADF Mobile sucessfully installed!

    Hey,
    this is not a blog!
    Frank

  • How get java Object from webservice

    Hai
    i gave ArrayList<bean> , i can't get this ArrayList<bean> from webservice. How can i get ? via for each or iterator or any ?????
    Note: i iterated  but only one element was come from bean property  using next() of iterator .
    I need all property. any one please help.
    thanks
    Mr...Javan

    Try to return an Array instead of an ArrayList?
    Have a look at http://forums.sun.com/thread.jspa?forumID=331&threadID=5289022.

  • How to reduce Oracle ADF Mobile deployed file

    Hi
    I'm creating simple demos with Oracle ADF Mobile and the deployed file is more than 50mb. Is there a way to reduce this size? Maybe remove some unused features llike SQLLite?

    My simple demo IPA files have been around 20MB with the default splashscreens and such, the only time it was bigger was when some files mistakenly got included. You could always load resources on-demand the first time over http and cache them in the app documents. This way you could only download the graphics for the current platform (so if it's a phone, you don't download iPad banners and graphics that your app needs)

  • Quick answer needed----Does Oracle ADF Mobile support Canvas in HML5?

    I am interested in Oracle ADF Mobile and want to develop a native mobile product on ipad maybe other tablet devices with CAD functionality. But I can't find a way to create HTML5 with Canvas on it. I wonder if Oracle ADF Mobile can do it. If so, how?
    Thanks
    Ling
    Edited by: 973623 on Nov 28, 2012 8:51 AM

    Hi,
    ADF Mobile comes with a rich set of Data Visualization Components (charts/graphs/etc) that's based on HTML5 Canvas. You would not need to develop your own set of HTML5 components. This is applicable to the new on-device version of ADF Mobile. You would need to create an ADF Mobile app, and create your user interface using AMX components. The graphics component set is call DVT Mobile AMX.
    If you decide to create your own HTML5-based pages with HTML5 canvas-based graphics component, you can still host your own HTML5 page inside ADF Mobile. However, you would need to create your own HTML5 page.
    Thanks,
    Joe Huang

  • Difference between Oracle ADF Mobile and Oracle ADF Mobile Client.

    Hi Experts,
    I am new ADF Mobile app development. I found docs for Oracle ADF Mobile here as [http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/toc.htm]. I was following it sequentially.
    But when i searched for achieving offline data , data synchronization and using database for Mobile apps, i got another docs link [http://docs.oracle.com/cd/E23549_01/doc.1111/e14826/toc.htm] which is for Oracle® Fusion Middleware ADF Mobile Client .
    So I got confused which one to prefer over the other..? Both support on device mobile apps.
    do they have any difference over other or data sync & db features are not available for Oracle ADF Mobile..? & available only for Oracle ADF Mobile Client..?
    It would be much helpful if someone could provide clear difference between these two technologies.
    Thanks,
    Praveen S K

    I made a topic and the 'same' question popuped up.
    ( ADF Mobile: Data synchronization )
    In Mobile Client iOS is not supported, in ADF Mobile it is. That's the main difference (in my opinion).

  • Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile

    Where can I find "Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile"?
    Thanks a lot for your time.

    Hi, this is referring to the JavaDocs for Java methods/classes supported by ADF Mobile. You can typically right (or ctrl) click on any ADF Mobile specific Java method and select "JavaDoc". You can open up a sample app that contains any Java class - for example the HR sample app, and find any method with name "adfmf*". You should be able to see the Java doc for the ADF Mobile related methods/classes.
    Thanks,
    Joe Huang

  • Prerequisites for oracle adf mobile

    Hi,
    I need to learn oracle adf mobile technology. I know little bit of java. Means I understand java syntax. I have absolutely no experience in web technologies like jsp,jsf etc.. even css I do not know.
    What should be the learning path for me before I actually start reading oracle adf mobile tutorial? I do not even know javascript. What are all the basic stuffs I should know before starting with adf mobile
    Thanks
    Vadiraj

    I'm not sure if your background is sufficient for developing any application. ADF requires you to have at least a good understanding of java. 'A little bit' might not be enough.
    Well, you'll find this out yourself pretty fast.
    the Oracle ADF Mobile homepage Oracle ADF Mobile has three links on the page showing a demo, an overview (which would be my starting point) and a link to the ADF Academy. This last link is designed to help users developing ADF Mobile applications.
    After watching the other videos you can start there. If you don't understand what is going on there you have to deepen your knowledge in this aera first.
    Timo

  • Record Management: get logical document object from physical doc. object

    Hello,
    I'd like to get logical document from physical document (sdok object - stricture containing class and objid).
    There is BAPI for "opposite direction": SDOK_LOIO_PHYSICAL_OBJECT_GET. By this FM I can get physical document's sdok object from logical document's sdok object.
    Can anybody tell me BAPI's name for it?
    I tried SDOK_PHIO_LOGICAL_OBJECT_GET, but this BAPI doesn't exist.
    Best regards,
    Josef Motl

    Josef,
    There are I don't believe there are any bapi's for this. You probably have to do this via ABAP OO. Create an object of the type CL_SRM_DOCUMENT. This is your logical (LOIO) object of your document. You have to enter the documentclass and the objectid of the document. This class has a method get_variant. This variant is your fysical (PHIO) object of the document. Use version and variant 0 so you will get the latest version object of your document.
    If this isn't the answer, can you please explain where do you get the fysical object from if you haven't got the logical first?
    Regards,
    Tjalling-Jan

  • Creating an arrays of objects from a class

    I was wondering does any one know how to create an array of objects from a class?
    I am trying to create an array of objects of a class.
    class name ---> Class objectArray[100] = new Class;
    I cant seem to make a single class but i need to figure out how to create an array of objects.
    I can make a normal class with Class object = new Class

    There are four lines of code in your for-loop that actually do something:
    for(index = 0; index < rooms.length; index++) {
    /*1*/  assignWidth.setWidth(Double.parseDouble(in.readLine()));
    /*2*/  rooms[index] = assignWidth;
    /*3*/  assignLength.setWidth(Double.parseDouble(in.readLine());
    /*4*/  rooms[index] = assignLength;
    }1.) Sets the width of an object, that has been instantiated outside the loop.
    2.) assigns that object to the current position in the array
    3.) Sets the width of a second object that has been instantiated outside the loop
    4.) assigns that other object to the current position in the array
    btw.: I bet you meant "assignLength.setLength(Double.parseDouble(in.readLine());" in line 3 ;)
    Since each position in an array can only hold one value, the first assignment (line 2) is overwritten by the second assignment (line 4)
    When I said "construct a new room-object and assign it to rooms[index]" I meant something like this:
    for(index = 0; index < rooms.length; index++) {
        Room aNewRoom = new Room();
        aNewRoom.setWidth(Double.parseDouble(in.readLine()));
        aNewRoom.setLength(Double.parseDouble(in.readLine());
        rooms[index] = aNewRoom;
    }1.) Constructs a new Object in every iteration of the for-loop. (btw: I don't know what kind of objects you're using, so this needs most likely modification!!)
    2.) set the width of the newly created object
    3.) set the length of the newly created object
    4.) assign the newly created object to the current position in the array
    -T-
    btw. this would do the same:
    for(index = 0; index < rooms.length; index++) {
        rooms[index] = new Room();
        rooms[index].setWidth(Double.parseDouble(in.readLine()));
        rooms[index].setLength(Double.parseDouble(in.readLine());
    }but be sure you understand it. Your teacher most likely wants you to explain it ;)

  • Can i return an Array of Objects from c++ to java ??

    hello all,
    Can i return an Array of Objects from c++ to java ??
    If so how is it possible ??
    regards,
    gautam

    I suggest you look into the JNI, Java Native Interface. The answer is yes.

Maybe you are looking for