How to Use Mobile Service in HTML/JavaScript Application

The Windows Azure Mobile Service is a back end tool for mobile applications. It supports various platforms, such as Windows Store, Windows Phone 8, iOS and Android. The Windows Azure
Mobile service can also support HTML/JavaScript. This article helps you to get a basic idea of how to use the Windows Azure Mobile Service in HTML/JavaScript applications.
Let us start with a Quick startup project provided by Microsoft. A Quick startup is a simple demo project that can help us to understand how to use the Windows Azure Mobile Service with HTML/JavaScript. So let's start from the Quick startup project.
Login into in the Windows Azure portal and use the following procedure.
This article assumes you already have a Windows Azure account and the mobile service is enabled in your account.
1. Create a new Windows Azure Mobile Service
Click on the +New button from the left corner and select Compute -> Mobile Service and then click on the "Create" button.
The Windows Azure portal popup creates a mobile service wizard when you click the Create button. Windows Azure asks you to enter the mobile service name as shown in the following image:
Select the database options and region for your mobile service and click on the "Next" button.
Once your mobile service is successfully created, the portal will show all your mobile services as shown in the following images.
Ok! We have created a new mobile service successfully. Let's move to our subsequent steps.
1. Quick startup Project 
As we all know, the Windows Azure Mobile Service can support many platforms such as Windows Store, Windows Phone 8, iOS, Android and HTML/JavaScript. This article only tells us about the new HTML/JavaScript platform that is recently added to the Windows Azure
Mobile Service.
In the image above, we are in the quick startup page where the Windows Azure Mobile Service allows the user to choose their platform. I have selected the HTML/JavaScript Platform.
In the image above, we found 3 quick steps that can allow us to run <g class="gr_ gr_74 gr-alert gr_gramm Grammar" data-gr-id="74" id="74">a HTML/JavaScript</g> sample project. 
1. Create Table: In this step the user needs to create a table that can used by the sample project, once you hit the create TodoItem Table button. The Portal will create a TodoItem table in your mobile service. You
can check this table by clicking on the data tab(menu).
2. Download and run your app: In this step the user needs to download the Quick startup project that is provided by the Windows Azure portal. Click on the "Download" button and download the project. You will
see the following files in the quick startup project.
The Server folder contains some files to setup this project locally. The user should run the file from the server folder corresponding to their OS. I am using Windows OS so I ran the <g class="gr_ gr_80 gr-alert gr_spell ContextualSpelling ins-del multiReplace"
data-gr-id="80" id="80">lanch</g>-<g class="gr_ gr_79 gr-alert gr_spell ContextualSpelling ins-del multiReplace" data-gr-id="79" id="79">windwos</g> file to setup this project locally in
IISExpress.
Press r and enter the key, you will see IISExpress started. Do not close this Windows and open your browser and request the http://localhost:8000/ page.
Enter the Item name and click on the add button. Your Item will be added to the TodoItem table.
3. Configure your host name: This step is a very important step for any HTML/JavaScript application that uses the Windows Azure Mobile Service. In this <g class="gr_ gr_83 gr-alert gr_gramm Punctuation only-ins
replaceWithoutSep" data-gr-id="83" id="83">step</g> the user must register their website name in the Cross-origin resource sharing (CORS). By default, "localhost" is added by the Windows Azure Mobile Service
so your quick startup project can run without making any CORS setting changes. The user can add their website domain name by clicking on the configure tab (menu).
The user can add as many website domain names as needed.

are you asking a question or did you just post a tutorial here? you might want to post it as a blog post or wiki entry instead.

Similar Messages

  • How to use singleinstance service with a JWS application

    Hello,
    I have a Swing application and i am using Java web start to deploy on the user machines.
    I want to know how to implement the single instance service. so that only one instance os the application is running.
    Where should i use the singleinstance class provided by JNLP api.
    for ex:
    package test;
    import java.awt.BorderLayout;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.border.EmptyBorder;
    import java.util.Date;
    // classes of the web-start API, used in this example.
    import javax.jnlp.SingleInstanceListener;
    import javax.jnlp.SingleInstanceService;
    import javax.jnlp.ServiceManager;
    import javax.jnlp.UnavailableServiceException;
    /** A test of the SingleInstanceService using the web-start API.
    @author Andrew Thompson
    @version 2007/1/8
    public class SingleInstanceApplication
    extends JFrame
    implements SingleInstanceListener {
    /** A simple editing area. */
    JTextArea document;
    /** Assemble the GUI. */
    SingleInstanceApplication() {
    super("JNLP API single instance service");
    try {
    SingleInstanceService singleInstanceService =
    (SingleInstanceService)ServiceManager.
    lookup("javax.jnlp.SingleInstanceService");
    // add the listener to this application!
    singleInstanceService.addSingleInstanceListener(
    (SingleInstanceListener)this );
    } catch(UnavailableServiceException use) {
    use.printStackTrace();
    System.exit(-1);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    document = new JTextArea(
    "Try openning another version of this application\n");
    document.setEditable(false);
    JPanel main = new JPanel(new BorderLayout());
    main.add(new JScrollPane(document));
    main.setBorder( new EmptyBorder(8,8,8,8) );
    getContentPane().add(main);
    pack();
    setSize(400,300);
    setLocationRelativeTo(null);
    /** Specified by the SingleInstanceListener interface
    @param args The command line parameters used for this invocation */
    public void newActivation(String[] args) {
    StringBuffer sb = new StringBuffer();
    for (int ii=0; ii<args.length; ii++) {
    sb.append("'" + args[ii] + "' ");
    String message = "Got new args: " + sb.toString();
    // this usually serves to alert the user the app.
    // wants attention. On Win. it will flash the
    // apps. icon in the task bar.
    JOptionPane.showMessageDialog(this, message);
    // also add the new args and time to the document.
    document.append( new Date() + "\t" + message + "\n" );
    /** Construct the GUI and display it. If the user double clicked
    a file to start the application, begin measures to load that file. */
    public static void main(String[] args) {
    SingleInstanceApplication app =
    new SingleInstanceApplication();
    app.setVisible(true);
    in my progrma there are many clasess where should i use this.
    Pls help new bie!!
    Thanks and Regards

    To work for your project, the SIS has to be implemented on the class that is the main(). To implement the SIS for a class, it needs to declare it implements the SingleInstanceListener and define the new activation method. Also, it needs to have the SingleInstanceService added to it via. the methods addSingleInstanceListener(). It is not strictly necessary to call addSingleInstanceListener() from the main() class, but it does make a lot of sense.
    Does that answer your question?
    Edited by: AndrewThompson64 on Dec 15, 2007 1:28 AM
    Edited by: AndrewThompson64 on Dec 15, 2007 1:48 AM

  • How to call web services from HTML

    Hi All,
    Does anybody have an idea on how to call web services from HTML using axis and i am using jboss-4.0.5 as the application server.

    What did your Google search return?

  • How to use an if statement in javascript code

    Hello,
    I have a batch processing script to search for text "employee signature" on each page in a multiple page file and to then list in the console any pages that do not have the "Employee Signature" text included.
    The script is not yet functional as an if statement needs to be included.
    Can anyone please advise how to use an if statement in javascript code?
    var numpages = this.numPages;
    for (var i=0; i < numpages; i++)
    search.query("Employee Signature", "ActiveDoc");
    console.println('Pages that do not include an employee signature: ' + this.pageNum +' ');
    Any assistance will be most appreciated.

    Thank you very much for your assistance try.
    I have modified the code as suggested and the page numbers are now listing correctly, thank you, but....................,
    The console  lists every page as having an "employee signature" when there are pages in the document that do not have an employee signature.
    The code (revised as follows) is not processing the "getPageNthWord part of the statement" in the console report?
    Can you please advise where the code needs reworking?
    var ckWords; // word pair to test
    var bFound = false; // logical status of found words
    // loop through pages
    for (var i = 0; i < this.numPages; i++ ) {
       bFound = false; // set found flag to false
       numWords = this.getPageNumWords(i); // number of words on page
       // loop through the words on page
       for (var j = 0; j < numWords; j++) {
          // get word pair to test
          ckWords = this.getPageNthWord(i, j) + ' ' + this.getPageNthWord(i, j + 1); // test words
          // check to see if word pair is 'Employee' string is present
          if ( ckWord == "Employee") {
             bFound = true; // indicate found logical value
             console.println('Pages that includes an employee signature: ' + (i + 1) +' ');
             break; // no need to further test for this page
          } // end Employee Signature
       } // end word loop
       // test to see if words not found
       if(bFound == false) {
             console.println('Pages that do include an employee signature: ' + (i + 1) +' ');
        } // end not found on page  
    } // end page loop
    Thank you

  • How to use Mobile VOIP on BB9300

    Please guide me how to use mobile VOIP to make call from BB9300. Please advise

    You need to download and install the latest Ovi suite and install it on your laptop. Connect your phone to your laptop via usb or bluetooth in PC Suite mode. In Ovi suite, goto Tools > Connect to Internet. After setting your country and carrier, the suite will connect you to the internet via your phone.
    Note that this will connect you using your phone carrier's network, so you will incur data costs on your phone plan.
    If I've helped you, you can thank me by clicking the green 'kudos' star on my post. Cheers.

  • How to use Web services in BI 7?

    HI all,
    Can anyone pls let me know how to use Web services in BI
    Thanks
    Pooja

    http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/2d/64d029e74911d6b2e400508b6b8a93/content.htm

  • How to use web services in Excelsius 2008

    I am new  to this tool. I have trial version on excelsius 2008 and i would like to build a dashboard that should query our corporate database (in oracle). I think web services is a option to do it.  Any samples available?.Please help me
    Edited by: AshishDatar on Jul 27, 2009 6:29 PM

    Hi AshishDatar:
        For you question you want to get data from data base using web service connection. Here I can give you some suggestions
    1.Write a web service to retrieve data from data base, then use Xcelsius u201Cweb service connectionu201D under u201CManage Connectionu201D section to consume the service and get the data from data base to spread sheet.
    2.Xcelsius also provide you a tool to generate web service with easy way (without coding). (Suggested)
    Using flynet, you can get flynet installation file under Xcelsius installation folder u201CXcelsius\Connectivity\Flynet Webservice Generatoru201D for more information about flynet please refer to
    http://myxcelsius.com/2008/11/07/generating-web-services-for-xcelsius-using-flynet-web-service-generator/
    Here is also a demo on how to use  web service conneciton with Xcelsius + Flynet
    https://businessobjects.webex.com/ec0600l/eventcenter/enroll/register.do?siteurl=businessobjects&formId=50213992&confId=50213992&formType=1&loadFlag=1&eventType=1&accessType=
    Hope it helps with your work! And let me know if you need any further help.
    Thanks!
    Bill
    Edited by: Bill Xu on Jul 28, 2009 8:02 AM

  • How i use Enterprise Services?

    Hello @ll experts,
    i hope that is the right Forum-Category.
    I don't find any description, how is use Enterprise Services with SAP PI for my IT-Scenario.
    Actual situation:
    I import the XI-Content (there is the Service Interface to use for the ES) in the Enterprise Service Repository (SAP PI 7.1), copied the Service Interfaces and all dependence Objects in my own Software-Compoment.
    My Question:
    What i should doing to config in my sap ERP ECC 6.0 with the Enterprise Service to connect with SAP PI 7.1?
    Maybe ABAP-Proxies?
    Thanks in Advance,
    best regards
    armin

    Hello,
    Once you build Service Interface in PI, you need to generate PROXY in back end ERP system using SPROXY. After that you need to implement the Proxy Class Method by writing glue code using SE80. Now, you may setup End Point using SOAMANAGER. Please see the link for details: [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60cb2b4c-af72-2b10-a3a2-a2f718d2a565]
    Thanks,
    Venu

  • How to use web service consumer as a source to connect to Salesforce?

    I see a lot of articles and mapping xmls on how to use web service consumer but as a newbie I am not able to view the object schema from my salesforce enterprise WSDL after importing it in Informatica designer as a source. My enterprise wsdl has operations like create, retrieve, upsert, delete etc so if I want to read data from account then could someone guide me on how to use the web service consumer to view the fields after importing the wsdl.  After importing the wsdl and selecting the operation say create, the columns (ports) displayed shows different groups but it doesn't list the object fields? what am I missing here? And what is the operation to read data from Salesforce is it "retrieve" from the entripse wsdl? As a newbie on this, I appreciate any inputs on this topic.

    Magazinweg 7Taucherstraße 10Taucherstraße 10Av. Copacabana, 267Strada Provinciale 124Fauntleroy CircusAv. dos Lusíadas, 23Rua da Panificadora, 12Av. Inês de Castro, 414Avda. Azteca 123 I have the source table like this and i want to replace the character and sum up the numbers and how can i do it, I replace the character by reg_replace() function but I am not able to add the number because it is of not fixed length. My Output should be,71115705396

  • How to use Enterprises Services Bundles In PI Services Registry

    Hi All,
    i need information regarding How to use Enterprises Services Bundles In PI Services Registry.
    please provide some information. please help me..
    regards,
    jas
    Edited by: jasmines123456789 on Nov 10, 2009 2:42 PM

    Hi,
        Enterprise Services (ES) bundles are collections of enterprise services, grouped by common business scenarios, which enable customers, partners and independent software developers to extend the functionality of the SAP Business Suite.ES bundles help create composite applications using SAP NetWeaver's enterprise services development and modeling tools. In this way, SAP is promoting an evolutionary path to SOA and lowering barriers to overall SOA adoption.
    SAP providing bundles of enterprises for evry industry,if you want to use any enterprise services then you have to read teh documentation for the servcies and how this service can help you to reuse,if you want to provided any extension for the same you can.
    All enterprise services stored in Service Registry,first you have to consume the services fromService Regsitry.Service Registry is the place holders where servies available.
    refer below link how to use Enterprise Service BundleS
    https://wiki.sdn.sap.com/wiki/display/ESpackages/Opportunity+Management
    Regards,
    Raj

  • How can i make mt own radio station on iPad or iPhone.....and how to use mobile terminal ???

    How can i make mt own radio station on iPad or iPhone.....and how to use mobile terminal ???

    what do you mean radio station as in you would be transmitting fm to the airwaves?

  • How to use JavaMail 1.4 with Oracle Application Server 10g (9.0.4.0.0)

    Hi all,
    I'd like to know if it's possible and how to use JavaMail 1.4 with Oracle Application Server 10g (9.0.4.0.0), Windows version.
    With the following code, I can see that the mail.jar used by the server is the one included in the jdk installation :
    // I'm testing InternetAddress.class because I want to use commons-email-1.2.jar that requires mail.jar 1.4 (or higher) and activation.jar 1.1 (or higher)
    // and I know that inside the commons-email-1.2.jar file, I need to call the InternetAddress.validate() method that throws a java.lang.NoSuchMethodError: javax.mail.internet.InternetAddress.validate()V if it is used with mail.jar 1.2.
    Class cls = javax.mail.internet.InternetAddress.class;
    java.security.ProtectionDomain pDomain = cls.getProtectionDomain();
    java.security.CodeSource cSource = pDomain.getCodeSource();
    java.net.URL location = cSource.getLocation();
    System.out.println(location.toString());
    This code returns : file:/C:/oracle/app/jdk/jre/lib/ext/mail.jar and this mail.jar file has an implementation version number: 1.2
    - I've tried to include my own mail.jar (1.4.2) and activation.jar (1.1.1) files in the war file that I deploy, but it doesn't work (the server still uses the same mail.jar 1.2)
    - I've tried to put the mail.jar (1.4.2) and activation.jar (1.1.1) files in the applib directory of my OC4J instance, but it doesn't work (the server still uses the same mail.jar 1.2)
    - I know that a patch exists : I've read the following document: How to Make Libraries such as mail.jar and activation.jar Swappable ? [ID 552432.1]
    This article talks about the Patch 6514136, but this patch only applies to : Oracle Containers for J2EE - Version: 10.1.3.3.0
    Can you please help me ?
    Thanks in advance for your answers,
    Laurent

    I strongly suggest to upgrade to AS 10.1.3 to get this.
    Think of future support of AS 9.0.4. You will get not critical patch updates anymore.
    --olaf                                                                                                                                                                                                                                                                                                               

  • How to use debug my jdevloper devloped jsp applications using tomcat 4.0?

    hello,
    how to use debug my jdevloper devloped jsp applications using tomcat 4.0?
    how to run with using tomcat path with browser?
    can any one help?
    thanks
    pullareddy

    Hi Pullareddy,
    Charles' answer will work for Servlets in Tomcat, but debugging JSPs is a bit more complicated than debugging Servlets.
    Here's what you need to do:
    (I don't have Tomcat, so I don't know the details of Tomcat configuration files and I can't guarentee that Tomcat provides the flexibility so that you can configure it for debugging JSPs. Each application server is configured a bit differently. Hopefully you can adjust the following instructions to Tomcat.)
    1. You need to replace Tomcat's JSP engine with OJSP and you need to setup debugging parameters for OJSP.
    This is not specifically in the JDev documentation, but you may be able to apply the information found in the topic "Remote Debugging in OC4J".
    Here are some tips:
    A. You'll probably need to specify the following jars in some Tomcat config file: ojsp.jar, ojsputil.jar, xmlparserv2.jar, ojc.jar, and jdev-rt.jar.
    B. The OJSP class name is oracle.jsp.runtimev2.JspServlet.
    C. The debug parameters are:
    debug_mode = true
    developer_mode = true
    encode_to_java = true
    emit_debuginfo = true
    jspjavacompiler = oracle.jdevimpl.jsp.JspOjcCompiler
    2. You need to make Tomcat start the Java command with debugging options. (This is what Charles was talking about. One of the debug options is -XXdebug). This is in the JDev documentation in the topic "Starting a Java Process in Debug Mode". Please read that documentation help topic.
    3. You need to delete any old .java or .class files which were created in the past for your JSP. If you leave old .java or .class files around, then the debugger may not be able to stop at breakpoints in your JSPs. So, be sure to clean up old files.
    4. Set your project settings for remote debugging. This is on the Debugger - Remote panel in the Project Settings dialog box. You probably want either Attach to OJVM or Attach to JPDA. Which radio button you choose depends on what command line options you specified in step 2.
    -Liz

  • How to create and use Data Vault with HTML/JavaScript (SAPUI5) for Mobile Apps?

    Hello,
    I am creating a demo Enterprise Mobile App, for cross platform and I want to use the Data Vault.
    I am not able to figure out how to implement the Data Vault with HTML/JavaScript i.e. SAPUI5 for cross platform mobile apps I have a tutorial, but it is for Android based apps. Where as I want it for iOS as well. I guess, in this case, implementing the Data Vault using SAPUI5 over HTML and JavaScript would be  better.
    If anyone has any links or sample code to implement Data vault in HTML/JavaScript (SAPUI5) or specific for iOS apps, it would be great.
    Thank you.

    Hi,
    This is the "SAP Mobile Documents" community, so this seems to be the wrong place for asking your question related to Data Vault / SAPUI5.
    Maybe you should post your question here: http://scn.sap.com/community/developer-center/front-end.
    best regards,
    Ingo

  • How to delete a file in blod storage using mobile service

    This
    link shows how to add a file using windows phone 8 mobile service. I would like to know how I can delete the file once it is stored in the blob storage. I have typed following codes by using existing resource name and image url after the file has been successfully
    uploaded and although I do not receive any errors, the file does not get deleted in the storage either:
    CloudBlockBlob blobFromSASCredential =container.GetBlockBlobReference(todoItem.ResourceName);
                    await blobFromSASCredential.DeleteAsync();
    Can anyone help? I am using 3.0.2.0 Thank you.

    Hi,
    If use above code to delete other blob file, does it success? see more:
    how to delete azure blob storage , please consider this factor, Storage Emulator 2.2 is currently incompatible with Storage Client Library 3.0.0.0. This has been mentioned in Storage Team Blob as well:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2013/11/27/windows-azure-storage-release-introducing-cors-json-minute-metrics-and-more.aspx (Please read "Storage Emulator Guidance" section towards the end of the post). and there is a
    beta version of the next storage emulator available that does work with v3 of the storage API dlls: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/01/27/windows-azure-storage-emulator-2-2-1-preview-release-with-support-for-2013-08-15-version.aspx .
    If I misunderstand, please feel free to let me know.
    Hope this helps
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for