How to store and display Response from REST Service

Hi,
My WADL has defined the response that my REST service returns back as below :
<object name="Get_Root">
        <property name="RequestId" type="number" />
        <property name="Name" type="string" />
        <property name="fromPlace" type="string" />
        <property name="toPlace" type="string" />
        <property name="fromDate" type="string" />
        <property name="toDate" type="string" />
</object>
I want to store this response; response is a single entry of the above type and not a collection (I am making the request on a button click) and then display it on the screen in multiple labels.
How can I do this? Will I have to use a collection and a gallery, even though I have a single response?
Thanks,
Pragya

Okay.. got it. So MyRestData has a Get function taking some n arguments and it responds back with an object of the type I had mentioned before.
From what I understood, I have to write the below code for each label
MyRestData!Get(.....)!Name
MyRestData!Get(.....)!fromPlace
MyRestData!Get(.....)!toPlace ...and so on
Wouldn't that translate to different REST calls? Is there a way to get and store the entire response object
in the app and access each of its properties/subelements locally?
Also when you wrote the below before
Text: "The name is: " &  MyRestData!Get_Root!Name
it seems that I can access the response object Get_Root using MyRestData. This is not the case for me. MyRestData only lets me access the Get function using "!", and not the response object in any way.
Thanks for your help!

Similar Messages

  • What do I do to close eform on screen and display response of web service in another screen.?

    Hi,
    I am trying to build following functionality.
    I want to submit form to a web service through SOAP request on click of a button.
    I want to display response of web service like “form has been submitted successfully” on screen.
    What has been achieved.
    I am able to submit form to an adobe web service passing base64 string to adobe process.(see the script in image#1).
    When I receive base64 string in adobe process, I am able to re-generate document (using getDocFromBase64(/process_data/@inputStr) ).
    After that I am returning a message string to as response “Form submitted successfully”.
    When I get the response I populate response to a text field variable (Out Str). See image#2
    Problem/Desirable functionality.
    I want to close this eform and display the message “form has been submitted successfully” on another page in browser so that it depicts to end user that form has been submitted successfully with confirmation.
    What do I do to close eform on screen and display response of web service in another screen.?
    Image#1
    Image#2

    Method1: This method only works in same PDF window.
    On the click of the submit button, based on the webservice result we can close the PDF. As you already having in the "Out Str", this variable having detailed message kind of thing, so it would be easier if you have one more output variable to know if this submission is success or failure or can use the "Out Str", it self to compare and close the PDF.
    Here i am using "strResult" to hold webservice success or failure using true/ false values.
    Get the "strResult" value from binded field of webservice response and compare and close or display messages based on requirement.
    var strResult = YourFieldname.rawValue;
                        if(strResult != "" && strResult != null){
                                  if(strResult.toUpperCase() == "TRUE"){
                                            xfa.host.messageBox("Successfully Saved the Data.", "Submit Confirmation", 3,0);
                                            //Close the PDF
                                            app.execMenuItem("Close");
                        else{
                                  xfa.host.messageBox("Failed to Save the Data.", "Submit Confirmation", 3,0);
    If the result need to show in separate window and having LiveCycle process connected to PDF via. webservice or REST:
    Method2. If the PDF inside the browser
    Type1 - You can set the process output is document variable, this PDF may contain your static/dynamic message and this PDF. But with this method result PDF opens in same window, host pdf will be disappeared.
    Type2 - You can set the process output is string variable, this STRING may contain your static/dynamic message. In this method the string will be appered in the same PDF window, host pdf will be disappeared.
    Method3. If the PDF is stand alone (not opend in any browser)
    Type1 - You can set the process output is document variable, this PDF may contain your static/dynamic message and this PDF. But with this method result PDF opens in new window, host pdf will be also stayed and may make readonly after submission success.
    Type2 - If the process output is string, it cannot handle this situation, may get the content type exception while receiving the result string, because.
    Used all of the above methods in various situations and it worked without any issues.
    -Raghu.

  • Help, how to open and display blobs from tables

    Dear all,
    I am trying to store ms-word files on a table using a blob column.
    Does anyone how to open the files and display them from a form using 9iAS?
    Thank you.
    Carlos.

    And there may be, but you won't likely find that here. Do some time searching Google and maybe you'll find code that someone was nice enough to make freely available, although I wouldn't count on it. Were i a programmer and took the time to read those docs and write the code, I'd want to be paid for my time. But there are a lot of programmers who swear by freeware! You may get lucky.

  • Store and Display Image from Database

    Now that MySQL is working (woo hoo!) with JSC, I have a couple of questions for any experts out there...
    1. How would I perform an image or other file upload from a browser?
    2. How would I retrieve and display an image from a db on a jsp page?
    Thanks for any help.

    Craig, I think I have a simpler way to load an image on the page, although for the time being I'm not retrieving from a database, but from the file system. The problem is that I'm not getting the pages to load continuously with new images. At some point it apears that the session gets clogges and can not load new pictures. I'll try to include the page bean code just below. This time I'm not adding the "code" tags because I haven't being successful with that. If you have problems , please, contact me at [email protected].
    The core of the code is in a couple of button_action methods.
    If you need, I can give access to the http server where this is running.
    Luiz
    package untitled;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import com.sun.jsfcl.std.*;
    import javax.faces.component.*;
    import javax.swing.filechooser.*;
    import javax.swing.*;
    import java.io.*;
    * Creator-managed class.
    * Your code should be placed at the end.
    public class Page1 extends AbstractPageBean {
    private HtmlForm form1 = new HtmlForm();
    private FileSystemView filesystem = FileSystemView.getFileSystemView();
    private File path = new File("C:/Documents and Settings/Luiz Costa/My Documents/Creator/Projects/PictureAlbum/build/images/Isadora\'s Wedding");
    private File[] fileslist = filesystem.getFiles(path, false);
    private int counter = 1;
    private int iw = 0;
    private int ih = 0;
    private Integer aiw = new Integer("1");
    private float aar = 0;
    private float ar = 0;
    private ImageIcon ii = null;
    public HtmlForm getForm1() {
    return form1;
    public void setForm1(HtmlForm hf) {
    this.form1 = hf;
    private HtmlGraphicImage image1 = new HtmlGraphicImage();
    public HtmlGraphicImage getImage1() {
    return image1;
    public void setImage1(HtmlGraphicImage hgi) {
    this.image1 = hgi;
    private HtmlCommandButton button1 = new HtmlCommandButton();
    public HtmlCommandButton getButton1() {
    return button1;
    public void setButton1(HtmlCommandButton hcb) {
    this.button1 = hcb;
    private HtmlCommandButton button2 = new HtmlCommandButton();
    public HtmlCommandButton getButton2() {
    return button2;
    public void setButton2(HtmlCommandButton hcb) {
    this.button2 = hcb;
    private HtmlGraphicImage image2 = new HtmlGraphicImage();
    public HtmlGraphicImage getImage2() {
    return image2;
    public void setImage2(HtmlGraphicImage hgi) {
    this.image2 = hgi;
    private HtmlOutputText outputText1 = new HtmlOutputText();
    public HtmlOutputText getOutputText1() {
    return outputText1;
    public void setOutputText1(HtmlOutputText hot) {
    this.outputText1 = hot;
    * This constructor contains Creator-managed initialization code.
    * Your initialization code can be placed at the end,
    * but, this code will be invoked only the first time the page is rendered,
    * and any properties set in the .jsp file will override settings here.
    public Page1() {
    // Creator-managed initialization code
    try {
    catch ( Exception e) {
    log("Page1 Initialization Failure", e);
    throw new FacesException(e);
    // User provided initialization code
    public String button1_action() {
    // Add your event code here...
    outputText1.setValue(fileslist[counter].getAbsoluteFile().getPath()+fileslist.length+"left"+counter);
    ii = new ImageIcon("images/Isadora\'s Wedding/"+fileslist[counter].getName());
    ar = (float)ii.getIconHeight()/(float)ii.getIconWidth();
    // aiw = new Integer(image1.getWidth());
    aiw = new Integer(ii.getIconHeight());
    aar = ar*aiw.intValue();
    image1.setHeight(""+(int)aar);
    outputText1.setValue(image1.getHeight());
    image1.setUrl("images/Isadora\'s Wedding/"+fileslist[counter].getName());
    ii = new ImageIcon("images/Isadora\'s Wedding/"+fileslist[(counter + 1 + fileslist.length) % fileslist.length].getName());
    ar = (float)ii.getIconHeight()/(float)ii.getIconWidth();
    // aiw = new Integer(image2.getWidth());
    aiw = new Integer(ii.getIconHeight());
    aar = ar*aiw.intValue();
    image2.setHeight(""+(int)aar);
    outputText1.setValue(image2.getHeight());
    image2.setUrl("images/Isadora\'s Wedding/"+fileslist[(counter + 1 + fileslist.length) % fileslist.length].getName());
    counter = (counter-1+fileslist.length) % fileslist.length;
    return null;
    public String button2_action() {
    // Add your event code here...
    outputText1.setValue(fileslist[counter].getAbsoluteFile().getPath()+fileslist.length+"right"+counter);
    ii = new ImageIcon("images/Isadora\'s Wedding/"+fileslist[counter].getName());
    ar = (float)ii.getIconHeight()/(float)ii.getIconWidth();
    // aiw = new Integer(image1.getWidth());
    aiw = new Integer(ii.getIconHeight());
    aar = ar*aiw.intValue();
    image1.setHeight(""+(int)aar);
    outputText1.setValue(image1.getHeight());
    image1.setUrl("images/Isadora\'s Wedding/"+fileslist[counter].getName());
    ii = new ImageIcon("images/Isadora\'s Wedding/"+fileslist[(counter + 1 + fileslist.length) % fileslist.length].getName());
    ar = (float)ii.getIconHeight()/(float)ii.getIconWidth();
    // aiw = new Integer(image2.getWidth());
    aiw = new Integer(ii.getIconHeight());
    aar = ar*aiw.intValue();
    image2.setHeight(""+(int)aar);
    outputText1.setValue(image2.getHeight());
    image2.setUrl("images/Isadora\'s Wedding/"+fileslist[(counter + 1 + fileslist.length) % fileslist.length].getName());
    counter = (counter+1+fileslist.length) % fileslist.length;
    return null;
    }

  • How can we retrieve list and library data from rest services

    Hi Everybody,
    How can we get the list or library data from sharepoint 2010 rest services.
    Here is the URL I am trying: https://siteurl/_vti_bin/listdata.svc
    Can anybody please provide sample c# code to pull the info.
    Thanks in advance,
    Krishna
    Krishnasandeep

    Here is reference material:
    http://msdn.microsoft.com/en-us/library/ff798339.aspx
    And an example:
    http://www.c-sharpcorner.com/uploadfile/anavijai/rest-api-in-sharepoint-2010-for-listdata-svc-part-2/
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to acquire and display data from labview to excel simultaneo​usly

    hello,
    I am using the NI-DAQ to measure the falling edges of a clock and display them into a table. What I need is to display these data in a table in excel while the program is running. In addition, when I receive a pulse from an external clock, for which I have created a digital channell, the data must be logged in a different column. In other words, every time I receive a pulse the data must be stored in the adjacent column in excel.

    Hello Evangelos,
    As far as I know and have experienced, it is not possible to access a spreadsheet file (or any file, for that matter) by two programs at the same time, you will get an error.
    Also, a couple of observations on your code:
    A constant wired to a case selector of a case structure makes no sense as the false case will never be executed.
    Move the DAQmx Read from your Digital Input task into the while loop, as the DAQmx Read will only read once and the wire won’t get information in or out of a while loop as long as the while loop is iterating.
    Regards,
    Daniel REDS
    RF Systems Engineer
    Help us grow.
    If a post solves your question, mark it as The Solution.
    If a post helps, give Kudos to it.

  • How to decode and display jpeg from a bytes stream ?

    Hello.
    I am new to Flex and got stuck on something that I assume has an easy solution.
    I have an RIA application in which I want to display a jpeg image. this image was
    sent on a Web Service message,  as an array of bytes (I just read the jpeg file as
    is and send it to the web application).
    I couldn't figure out a way to decode and display this image at the RIA, using an apropriate component. (Image ?)
    I have seen a few examples where a jpg is loaded from a web server using a url in
    which it's avaliable, but I don't think this is much help to me...
    Your help/example apreciated.

    Thanks.
    I assume you mean passing the bytesArray to Image.load() ?
    Anyway, that's what I did and it worked fine.
    Now I am facing the same issue with playing sounds, which are available on bytesArray.
    I tried to pass the mp3 bytes to the Sound.load(), but it doesn't work, becuase it tries
    to cast it to a URL. do you know by any chance  whether I can achieve that somehow ?
    (I could use prety much any other sound format, if it makes a difference)
    Thanks again.

  • How to store and retrieve images from database...

    Hi All
    Anubody tell me plz how to store images in database using jsp.
    and how to retrieve tme.
    Plz reply...
    Anurag

    Exactly
    try the links below may be those might help u in store and retrieval any kind of file.
    http://www.mysqltalk.org/insert-blob-example-vt112861.html
    https://java.sun.com/j2se/1.5.0/docs/guide/jdbc/blob.html
    http://javaalmanac.com/egs/java.sql/GetBlob.html
    http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.jdbc.doc/jdbc142.htm
    and a dearly advice friend please query google b4 you post any query out here.

  • How to retrieve and display image from database in a web page

    Hi all;
    I have been trying this for some time now. I have found some tutorials so far but none of them addresses my concern. Here it is:
    I have built a web application that can connect to an Oracle DB.
    I have a table called "employee", where I record any employee details, among which the employee picture. I stored the pictures and the finger prints using "Oracle sql developper" as blob type.
    How can i retrieve and view all these information when i run the application?
    I can easily retrieve all other types of value, but the image(BLOB type) has been a nightmare for me.
    HELP PLEASE.

    morgalr wrote:
    I believe your Binary Large Obejct will come back as an array of int, and you'll need to use BufferedImage it's associated API to get it to a viewable image configuration.I don't think BufferedImage immediately solves the problem -- this is a web app, so I assume the image will be displayed using the HTML IMG tag.
    Solution: google. There are many example of how to do this. For example, any book on servlets will have an example of dishing up a dynamic image.

  • How to control and display video from IP camera using ActiveX control over Internet.

    Hello,
    I need to control my IP cameras over the internet. I need to log into the cameras and then display the video.  There's an ActiveX control registered on the computer and works fine with IE to access and control the cameras. Controlling the cameras using IE works fairly well, but there are some quirks that I'd like to eliminate by using my own custom code.
    Has anyone created a vi that controls a Foscam FI8905W over the Internet? I’ve attempted, but I keep getting a catastrophic failure when I try to call ManagementConnect Method in the DVM_IPCam2 ActiveX Control Module V1.0. I'm not sure whether I need to establish an IP connection with the cameras first, or allow the ActiveX control to establish it for me.
    Some example code would be greatly appreciated. Running LabVIEW 2011 on a Win7 32bit.  Even some code used to control a similar device using ActiveX over Internet would be helpful.

    I have an example vi for interfacing to the foscam activex.
    I plan on using mouse click events within the activex window to trigger the PT function.
    I only have the basic up/down/right/left directions and not the down-right/down-left/up-right/up-left in the enum.  You can load the camera's web page and view the source to see the Java script code that uses the activex control.  There are definitions for the other directions.
    I had to mark the control as "Disabled" to keep click events from going to the activex control.  If I double click the control, it goes full screen.  If I then click on it to get out of full screen mode the video never returns or returns to the wrong spot in the VI.
    Attachments:
    Foscam Demo.vi ‏24 KB

  • Skype blocked and no response from customer servic...

    Hi all,
    I'm using Skype for more than 10 years and never had to sign in ever since that was done at startup automatically.
    Now 2 days ago my wife had trouble on her laptop so I logged in on her laptop as admin to sort the problem and skype popped up there (while it was already active on my PC). I've cancelled it on the laptop, sorted the problem, logged off and returned to my PC to see the sign in screen of Skupe there.
    As I said, I never had to sign in for more than 10 years and so I forgot the password. After several attempts the account was blocked. Now even worse, and that one is on me, the initial email address I've onced used to create the Skype account is no longer available (for many years) and I never set a new or alternative (I think).
    The only method I've found to unblock and retrive my password is the support page where you have to complete a questionnaire. I've completed it to my best knowledge although some details might have been wrong because most of those details I've simply forgot because it was just too long ago that I've wrote these initially.  Upon completion the message was that I will be contacted soon (was it 24 hrs?). Anyway, I'm checking my email every day several times but no response.
    I'm not blaming the support team. I do understand that they are very busy and that my partially false submission was probably filtered out and most likely never reached a person.
    Now I've created a new Skype account (otherwise I could not post here) and wonder if there is any way to import my original contact list which is very important to me. I never made a backup of the contact list but all my original Skype account details are still on my PC. 
    Appreciate every help either on how to retrive my original account or how to get my original contacts into this new account.
    Cheers Euclid

    euclidalexander wrote:
    For example the year I've created the account: the earliest I can select is 2004 but I've cre completed to my best knowledge? Please advise.
    Hello
    Yes. Please resubmit. Skype didn't exist until 2003.
    TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
    I recommend that you always run the latest Skype version: Windows & Mac
    If my advice helped to fix your issue please mark it as a solution to help others.
    Please note that I generally don't respond to unsolicited Private Messages. Thank you.

  • How the store and retrieval in ServletContext will happen??

    Hello Sir,
    I am developing a chat application thats in Swing & servlets Now I am able to authenticate user and I am using ArrayList to maintain the names of the user globally my storing it in ServletContext
    How to store and retrieve ArrayList from Servletcontext
    And another thing is that we are having personal chat(1-to-1) also. But how to use the thread model is not known to us as we have not faced such a situation before
    So if you could suggest some example code or snippets ot certain links then it would be of great help to us
    Thanks
    Regards
    Monarch

    Hello
    thanks for your reply. Actually we are doing the same thing that u have mentioned in your reply.
    The thing we are trying to do is that when a user is logged in the particular servlet which is responsible for the authentiacation of the user will authenticate the user an then calls method in the Chatter class which is outside the servlet
    The Chatter class declares two mwthods addChatter() and getChatter()
    I am managing the currently logged users in Arraylist using this two mehtods above
    When the first user logs in his entry gets stored at the first position in the arraylist but when other user logs in then his entry overrites the entry of the first user instead of getting stored in the next position.
    The arraylist gets initialized when second user logs in. to overcome this problem i want to store the arraylist into the ServletContext so it will be unique for the whole application and will not get initialized
    So I want to know the process of storing and retrieving the arraylist fro the context
    Hope ull understand me and reply me
    Thanks
    Regards
    Monarch

  • HT3743 How do i restore my iphone from "no Service". I tried to update my iphone 3G TO iOS 6.0. But it got stuck and now my itunes is displaying Error message: "there is no sim card installed in the iphone you are attempting to activate" Kindly suggest

    How do i restore my iphone from "no Service". I tried to update my iphone 3G TO iOS 6.0. But it got stuck and now my itunes is displaying Error message: "there is no sim card installed in the iphone you are attempting to activate" and my iphone is without service. While i am trying to activate my ihone on wifi also it doesnt saying servers are temporary unavailable try after sometime. Kindly suggest

    It sounds a lot like your phone was hacked or jailbroken to unlock it prior to your trying to update it.
    If that is the case, it is nowpermanently bricked.

  • TS3694 How do i restore my iphone from "no Service". I tried to update my iphone 3G TO iOS 6.0. But it got stuck and now my itunes is displaying Error message: "there is no sim card installed in the iphone you are attempting to activate" Kindly suggest

    How do i restore my iphone from "no Service". I tried to update my iphone 3G TO iOS 6.0. But it got stuck and now my itunes is displaying Error message: "there is no sim card installed in the iphone you are attempting to activate" and my iphone is without service. While i am trying to activate my ihone on wifi also it doesnt saying servers are temporary unavailable try after sometime. Kindly suggest

    tariqrehmani wrote:
    How do i restore my iphone from "no Service". I tried to update my iphone 3G TO iOS 6.0. ...
    The iPhone 3G is Not Compatible with iOS 6...
    It also appears that your phone may have been Hacked and / or Jailbroken...
    If this is the case... you are out of luck... Because...
    The discussion of Jailbroken Devices is against the Terms of Use of this Forum.
    Why Jailbreak is Not Supported  >  http://support.apple.com/kb/HT3743

  • HT4061 I am living in Pakistan, Lahore. I have purchased an Apple Iphone 5S online from apple store. I am facing water damage problem and there is no apple store here in Pakistan, How can I repair my phone from apple service center? Please help me

    I am living in Pakistan, Lahore. I have purchased an Apple Iphone 5S online from apple store. I am facing water damage problem and there is no apple store here in Pakistan, How can I repair my phone from apple service center? Please help me

    Take it to an authorized service center or Apple Store in the country where the phone originated.  Apple does not sell iPhones in Pakistan, nor will they ship them to Pakistan.

Maybe you are looking for

  • Someone is trying to hack into my Apple account

    I just wanted to make mention of some forum questions I saw similar from earlier, like in June and July. It is now mid-October. In the past couple weeks, on at least 3 occassions, I have received similar messages from apple, probably 3 each occassion

  • Load Order in a mapping

    any one has done a SINGLE MAPPING WITH multiple SOURCE TO multiple target like      source a TO target a      source b TO target b      source c TO target c in an order, which is first a should be feeded, THEN b and so ON... we have load order in Par

  • How to add more PDF file in to a designed form

    Hi, I have already designed a form and now want to add 2 more pdf file in to the form, how can I do that. Rgds Anver

  • Summarizing entries of the Internal table--Urgent..plz help

    Hi All!! I have an internal table containing fields f1, f2 ,f3 ..f8. I want to summarize the entries based on three fields of table f1,f2 and f3.These fields are numeric fields.The other fields have numeric and non numeric fields.One of the field f4

  • Trying to Add New Entity/Child/Location in FDM for HFM 9.3.1

    How should I create a child or in this case a retail location for a Parent in FDM. When I go to Locations I can see all the parents and siblings but I can not see any of the children/retail locations. How do I add them. This client does not have the