AppMachine Help Center

How can we help you?

Follow

Import your data via a web service

This guide will help you integrating your own web service into your AppMachine app using our "Web service" building block.

Please make sure you have read the general web service article before getting started.

The goal of this guide is to help you integrate your web service that will retrieve data. If you are looking for guides regarding creating, updating or deleting data via a web service please check out the related articles section.

Prerequisites

You will need the URL of the web service you want to integrate in your app.

How to

If you are running into any issues please check the frequently asked questions about web services.

  1. Go to http://design.appmachine.com and open your app;
  2. Go to the "content" section of your app;
    2content.png
  3. Click Add block.
    3addblovk.png
  4. Select the Pro tab.
    4Pro.png
  5. Select the Web service block and click Add block.
    5Webservice.png

  6. Select Custom web service.
    6Custom.png
  7. In this step you will need the URL of your web service, so in our case this is going to be http://www.arminvanbuuren.com/feed/json/ 
    Enter this url in the text field next to the Go button.
    7URL.png
    This guide does not include the use of parameters in your web service. Please check out the next guide to get to know more about this topic.
  8. Click  GO.
    We will call your web service to get a result so when know what to expect, this can take a few seconds.
  9. You see the result of your web service.  It is important to know what kind of data we are dealing with. So in the Armin van Buuren sample we get the following result:
    9Result.png
    You see the result of the web service call we made when you clicked the "GO" button. We did make that call to detect the fields that are present in your web service result.

    - What is the name of the field
    - What type of data will be inside this field

    So we already made a suggestion to the name and the type of data inside the field, but if you think we made a mistake, please adjust the name and the type by clicking in the left column.
    If you need to know more about working with data types please take a look here.
  1. If you have your data in place,click Next.
  2. Give your webservice a name. We already gave it a name for you but feel free to adjust it.
  3. Another important thing we need to know is whether or not the device should call your web service or if our servers should call your web service and distribute the result to the users of your app. 
    12Mobilefetcdata.png
    If you check the box, the devices call your web service. If your data will frequently change make sure to leave the checkbox checked.

    Uncheck if you want to let our servers call your web service and distribute the result. After creating the block you can set the interval our servers will refresh your data. To alter the interval select you web service block and click on the three dots.
    Screenshot_027.png
  4. Click Next.
  5. Name your new block, so just pick a name and click "Finish"; 

Allright that's it, you have just integrated your first web service into your app!

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Remco Boerma

    Thank you for this feature! 

    Can you give a working example of a custom auth server since i can't find any documentation about that. Prefered are an example of the custom one and a working example of the custom oauth2 server so i know what the reqs are for the server part. 

    Will there be support for CAS2? http://en.wikipedia.org/wiki/Central_Authentication_Service 

    But first and foremost, can you give an example of an app in which the user enters credentials once and the app uses these to validate on the soap server, requesting the to reenter with expired credentials and so fort?

     

    The usecase:

    I have to offer students their grades. So i need to validate them once, check their password or exchanged secret periodically and send it with every soap request. 

    Regards

     

  • Avatar
    Remco Boerma

    Note: the link to the general article redirects me to the datatypes article. 

  • Avatar
  • Avatar
    Matthijs Koopman

    Hi Remco,

    I will post an article on how to setup authentication with your web service soon. Once the article is available I will also update this article and refer to the documentation.

    Thanks for your input!

  • Avatar
    Beej

    If I leave the "Let the mobile device fetch the data..." checkbox checked, the web service shows an empty page. If I use exactly the same setup and uncheck that checkbox, the data shows just fine.

  • Avatar
    Hans Groeneveld

    How can I pass a search field text, entered by the user, to a input parameter?
    https://myurl.com/mywebservice?as_search=inputfromuser

  • Avatar
    Fernando Sérgio

    @Hans, if you put a <screen> block as a parent of your <webservice> block, it will be pre-filled with the parameters of your <webservice> as textFields along with a submit button. Just don't forget to set your queryStrings params (at <webservice> block) before that.

  • Avatar
    Jm Seigneur

    @Fernando the button on the parent cannot be clicked and does not run the Web service.