I can't figure out data binding from a web service.

Hi,
I've been trying to figure out how to connect a TreeTable control with data from a non-SAP web server. Here's what I have so far;
    I have a sample program that uses json in a variable called oData.
    I have a TreeTable control named oTable.
    I create a model;
        var oModel = new sap.ui.model.json.JSONModel();
    I feed the oData variable into it;
        oModel.setData(oData);
    Finally, I feed the oModel to the oTable;
        oTable.setModel(oModel);
That all makes sense. What I want to do is get the data from a web service. The only examples I've been able to find show how to configure an SAP data service and then connect to that. They don't give any details of the format that the SAP data service is sending. I don't have access to an SAP system so I can't set one up to reverse-engineer the data. I'm going to be writting my own oData service for this so I need a couple of things;
    1. An example of json or xml data as it's sent from a web server.
    2. An example of how you pull that data from the web service to an SAP ui model.
I could really use some help. I haven't been able to find any examples that make sense to me.

Hi Joe
Here is an small example. Maybe it is useful to you.
In this example, I  bind the tree to /root and you can see that we have 0: 1: elements under each element recursively.
Thanks
-D

Similar Messages

  • Can't figure out which upgrade (from 7 Pro) is smartest: 9 Pro? or X Pro?

    Can't figure out which upgrade (from 7 Pro) is smartest: 9 Pro? or X Pro?
    Should I just ignore the nay-sayers and go ahead with X Pro?
    Thanks in advance for anyone willing to bring me up to speed.
    Dharmamitra
    Kalavinka Press
    Optional & Extraneous background data:
    I've taken a break from book design, layout, and publishing since finishing 10 books 2 years ago (Kalavinkapress.org). But now I'm back into the thick of it with a another flock of long-doc books in my lap.
    Result, I'm now faced with upgrading my IDCS3 & Acrobat 7 Pro. (I'm still OK with my P-shop & Illustrator versions), but am utterly clueless about the advisability of Acro X Pro over the still-available Acro 9 Pro. (I've seen some fairly loud squeaking about X Pro problems.)

    It depends a bit on what you're going to use it for. I do mostly forms work and have both versions, but do most of my work with Acrobat 9, and even use Acrobat 7 for some things. There are some initial bugs with Acrobat 10 that need to be worked out, but I'd probably recommend it for most folks.

  • Hii . , any method can help resotore my data back from the sync service ?!

    hii ,
    I have set up a Firefox Sync account . and, I backed up my laptop but forgot to back up the sync key or the recovery key ! .so Now, I can't set up the Firefox Sync service anymore, as my email address has already registered but i don't have a sync key to access.
    I would like to have the sync key back wthout losing any of my data !! only what i want is my data !!
    so what do i have to do ? can u help me ? or can u send me the recovery sync key ? how can i have my data back from the service ? can u tell any method that can help me or can restore my data plzz ; (
    i have realy important data !! = (
    my email : (Email removed by mod)

    You can try to run a recovery program (recuva, or the like) but that is a slim chance. Otherwise, you can't get that data back after deleting it.

  • Best option to save data populated from a web service?

    I have manage to made a windows form that uses a web service to populate the data into a DataGridView. Then I have a column for adding comments next to each row. So a user could add some comments about this data for each row. Also I have a drop down list
    to select some options for each row.
    Actually everytime when connecting to this web service there are 7 DataGridViews that are populated with data, one for each TabPage added to a TabControl. So 7 tabs then.
    If I close this form and reopen it then it's all gone.
    What is the simpliest way if I want to store the settings (comments and selected option in drop down list). The idea is that I want to store this as a project under a name like "Project1", "Project2" etc. So every project would
    have their own settings. Then when starting the application all over again, instead of populate it from the webservice, I then load it from wherever it's stored. So I can pick the particular project I want for example "Project1".
    So what is the easiest options here? Would it be best to store it in a database or could it be stored in different datasets (one for each project)? Also if I use a dataset every TabPage with it's own unique DataGrid would then be represented as DataTable
    I suppose. But then I don't know if the data in a dataset would still be there the next time - if it only stores temporarily?
    As for now my only intention is to build this for myself, so I don't need to have any end user in mind. 

    Hello,
    Here is one idea which may  be implemented in several ways.
    The data stored locally that is not available in the web service (let's look at the web service as read-only) could be stored in a xml file then read into your project via DataSet.ReadXml and DataSetWriteXml to save changes.
    For this to work you need to utilize primary keys to identify data coming from the service to match up with locally saved data.
    That is the concept which as stated above can be implemented in many ways. I would suggest using a class dedicated to the above and not place the bulk of the code into your forms.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • I can't figure out why my "Save for Web" is grey.

    My pic is 450px by 450px at 73 ppi in RGB. I have always been able to save as a png or gif for my website work on my other older version of protools. What could this be caused by???

    One reason could be that your image mode is 32-bit. ??
    If so, Image > Mode > 8-bits.

  • Some data is missing while returning complex datatype from a web service

    Hi
    I am returning a complex data type from a web service. complex data type has a super class and some(not all) values from this super class are not being returned to the client. Strange part is that it giving some fields from super class and some values are not returned.
    I saw the soap response also it does not show any tag for those fields. but while creating a response i am setting some string values to those fields but i am not getting at client side.
    all the serailiastion and deseialization classes where created using ANT tasks and i have checked that all the cedec classes have been created.

    for what it's worth, the same problem was reported by one of our developers, although the string size was considerably smaller (probably less then 1 MB). According to him, soap clients generated from apache tools could connect fine and process the XML records. JDev hung. We simply changed our use case to return smaller results sets, but perhaps you could also generate your clients with WSDL2Java rather then JDev (if it is a truly a bug in JDev SOAP)? Can you add record parameters to the payload, in order to limit the results and scroll between remaining rows?

  • How to create XML data source/ and load data from a web service to BI

    All,
    I m trying to find a 'how to' document (or any document) that shows how to create an XML data source to load data directly from a web service or from an XML file.
    I appreciate any help.

    Hi Mike,
    Two more for you:----
    /thread/111488 [original link is broken]
    http://help.sap.com/saphelp_nw70/helpdata/en/e6/1dd53bb90cbb1ae10000000a11402f/content.htm
    Regards,
    Suman

  • Base data block on a web service

    Hy,
    I need to integrate an oracle forms application with data provided from other applications (via web services), like countries, cities, users ecc.
    there is a way to base a data block (in forms web 6/10 with Java Importer) on a data returned from a web service?
    Can i base block on a PL/SQL variable, returned from java, that contains data from web service?
    Thanks at all.
    Davide

    here is a snippet:
    PROCEDURE BT_Poll IS
    || Name      : BT_Poll
    ||
    || Aufgabe   : Hier werden Bücher bestellt
    ||
    || Autor     : 05.03.2006, VOL
    || Updates   :
      R_App  SPU_Type.T_App := Init_App ('BT_Poll');
      v_list             ORA_JAVA.JARRAY;
      R_String           Const_lokal.T_CSV_Datensatz;
      E_kein_Webservice  EXCEPTION;
      PRAGMA EXCEPTION_INIT (E_kein_Webservice, -105100);
      v_Akt_Record       NUMBER;
    BEGIN
      Go_block ('Workitems');
      v_Akt_Record := Akt.Record;
      Clear_Block;
    -- user, pw, server
      v_list := BpelWorkflowClient.getAllWorkItems (
        a0    => Const_lokal.usr_Buchbesteller,
        a1    => Const_lokal.pwd_Buchbesteller,
        a2    => Const_lokal.srv_Default);
    --  v_list_laenge := ORA_JAVA.get_array_length (v_list);
      :PARAMETER.PA_ANZ_POLLS := ORA_JAVA.get_array_length (v_list);
      FOR i in 0 .. :PARAMETER.PA_ANZ_POLLS - 1
      LOOP
        :WORKITEMS.ALL := ORA_JAVA.get_String_array_element (v_list, i);
        Get_CSV_Daten (:WORKITEMS.ALL, ';', R_String);
        :WORKITEMS.Task_Titel     := R_String.Wert_01;
        :WORKITEMS.Task_ID        := R_String.Wert_02;
        :WORKITEMS.ISBN           := R_String.Wert_03;
        :WORKITEMS.Buch_Titel     := R_String.Wert_04;
        :WORKITEMS.Autoren        := R_String.Wert_05;
        :WORKITEMS.Preis          := R_String.Wert_06;
        :WORKITEMS.Bestellername  := R_String.Wert_07;
        create_record;
      END LOOP;
      Go_Record (v_Akt_Record);
      IF :PARAMETER.PA_ANZ_POLLS = 0 THEN
        go_block ('BUECHER');
      END IF;
    EXCEPTION
      WHEN E_kein_Webservice THEN
      WHEN OTHERS THEN
    END;
      FUNCTION getAllWorkItems(
        a0    VARCHAR2,
        a1    VARCHAR2,
        a2    VARCHAR2) RETURN ORA_JAVA.JARRAY IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(3);
        JNI.ADD_STRING_ARG(args, a0);
        JNI.ADD_STRING_ARG(args, a1);
        JNI.ADD_STRING_ARG(args, a2);
        RETURN JNI.CALL_OBJECT_METHOD(TRUE, NULL, 'de/opitzconsulting/bpel/wf/client/BpelWorkflowClient', 'getAllWorkItems', '(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;', args);
      END;
    [/pre]
    the getAllWorkItems is a generated Package which wraps the workflow-webservice-method
    try it
    Gerd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • HT201250 How do I restore photos from Time Machine?  All of my photos have been imported within iPhoto and therefore are exported to Time Machine via an iPhoto file.  I can't figure out how to break individual photo files out of the iPhoto file.  Any idea

    How do I restore photos from Time Machine?  All of my photos have been imported within iPhoto and therefore are exported to Time Machine via an iPhoto file.  I can't figure out how to break individual photo files out of the iPhoto file.  Any ideas?

    You might post this query on the iPhoto forum and perhaps someone there can provide an answer.
    I tried this on my MBP and it seems that you have to restore the entire iPhoto Library.  What I did was put the current library in a separate folder on the desktop and then I restored the library from a prior date.  If you were to do that, you then could extract the desired photos and then delete the restored library.  Then place the current library back to the original location and import the desired photos.
    Not tidy but it seems it will work.
    Ciao.

  • I changed my my email from bright house to yahoo, and need to change iCloud to yahoo but can not figure out how.

    I have an iMac, iPhone and iPad, my email address has always been with Brighthouse, I dropped Brighthouse to go with Century Link.  Now the problem is
    I have Yahoo as my email account and can not figure out how to change iCloud to that email, can not find anything that lets me edit iCloud . How do I correct the email with iCloud ?
    Russelljr

    Welcome to the Apple Community.
    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")
    Providing you are simply updating your existing details and not changing to another account, when you delete your account, all the data that is synced with iCloud will also be deleted from the device (but not from iCloud), but will be synced back to your device when you login again.
    In order to change your Apple ID or password for your iCloud account on your computer, you need to sign out of the account from your computer first, then sign back in using your updated details. (System Preferences > iCloud, click the sign out button)
    In order to change your Apple ID or password for your iTunes account on your iOS device, you need to sign out from your iOS device first, then sign back in using your updated details. (Settings > iTunes & App store, scroll down and tap your ID)
    If you are using iMessages or FaceTime, you will also need to log out and into your ID there too.
    After deleting the account from your devices, change your details with Apple,  Start here, change your country if necessary and go to manage your account. You may have already done this.

  • Can you figure out from a G4 logic board serial number what it is?

    Can you figure out from a G4 logic board serial number what it is? for example if it is single or dual processor support, and the speed, i know you can check the case serial number in the apple site, but can't for the life of me figure out the logic board serial number, if any one could help identify what G4 it comes form that would be great, Can you figure out from a G4 logic board serial number what it is? KD30405K1P3UA
    many thanks

    Hi, Forrest!
    The Chipmunk site was my first thought when I read the initial post, but although it returns a manufacturing date of the fourth week (Jan) of 2003, I'm not sure that's even accurate, since Chipmunk couldn't return any more info than that.
    I wonder if an Apple Store Genius would/could look it up for him...
    Regards,
    Gary

  • I gifted a ringtone to my sister that I purchased from the iTunes store, and it is on her phone, but we can't figure out how to get it moved to her ringtones.  Can anyone help?

    I gifted a ringtone to my sister that I purchased from the iTunes store, and it is on her phone, but we can't figure out how to get it moved to her ringtones.  Can anyone help?

    Edit > Preferences.  Select the check box for Ringtones, this will add them to the listing in iTunes. 
    Not sure that really answers your question though.

  • Can't figure out how to stop my MBP from opening programs at startup, namely word and messages

    Recenty my MBPro has started opening MS Word and Messages at startup and I can't figure out how to stop it?  I've tried selecting and de-selcting the startup option from the dock but this doesn't help.  Does anyone have any suggestions?

    System Preferences has a setting for this.
    In the Users & Groups section you will fine a "Login Items" header.  This is a list of all the programs that will open automatically when you log in.  You can select any program and click the [--] button below that window to stop the program from opening automatically.

  • I have a Verizon IPhone 4 and i can't figure out how to get my ringtones from an app to my iTunes account, it doesn't have a tab for Ringtones! I have tried unplugging it and checking if would show up but it didn't, how do you enable the ringtone folder?

    I have a verizon IPhone and i can't figure out how to get my ringtones from the app to iTunes, my account doesn't have a ringtone section in the liRingtone Folder?brary, how do you enable the ringtone folder?

    Edit > Preferences.  Select the check box for Ringtones, this will add them to the listing in iTunes. 
    Not sure that really answers your question though.

  • Am getting message from MacPro that my start up disc is full - but I can't find it and can't figure out what to do to help situation. I've been making a number of imovies, which generates junk files. help?

    I am getting message from MacPro that my start up disc is full - but I can't find this "start up disc" and can't figure out what to do to help situation. I've been making a number of imovies, which generates junk files and material that I should toss in the trash, but it is not clear to me  what items I can toss and which items I can't toss. Can you help? Using the imovie "help" support the system showed me under the menu item "go" where the "start up disc" should be - but that wasn't actually available on my menu!  Thanks for your help!

    Disk Utility 
    Get Info on the icon on Desktop
    Try to move this to the MacBook Pro forum
    Your boot drive should be 30% free to really perform properly. 10% minimum
    Backup, clone, use TimeMachine, use another drive for your projects and movies, replace and upgrade the internal drive even.

Maybe you are looking for