facebook

How consume .net web service in mobione

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #331352 Reply

    nayana.kn
    Member

    I M trying to develop a iphone app using mobione. According to requirement I should be able to fetch and retrieve data from client DB.
    So I am using webservice in .net but I am struck in how to call this webservice in mobione app.Can u pls hepl in doing that

    #331394 Reply

    Hi,

    Could you share us more information about your webservice? How do you usually consume it? Does it return a results in xml or json format?

    #331413 Reply

    nayana.kn
    Member

    1. We have our business logics in .net web service.
    2. We need to connect the .net web service from mobi one. As we know .net web service output will be in xml it should be feasible to connect it in any platform.
    3. We found in this blog <http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=3706&gt;, that we can connect a .net web service using the code in this.
    4. But this code is not getting executed for us and we are getting the error on web service connection.
    5. FYI, right now We are using the trail version of mobi one only.
    6. What is the assitance right now we need to some sample application/code which will communicate with a .net web service and fetch the data from it to the controls in mobi one.

    #332995 Reply

    nayana.kn
    Member

    I want buy mobione but facing problem with above issues if get help how to communicate with the client db for storing and fetching data then will be really helpful for me to proceed i m waiting for the reply from long time but have not got any reply till now so please do reply for this soon so that it will be really helpful are at least let me know if it is able to do the above task or not

    #333030 Reply

    support-michael
    Keymaster

    hi,

    > how to communicate with the client db for storing and fetching data

    Do you mean using the webdb (native sqldb on the device) or interacting with the .net webservice you requested help with recently?

    #333034 Reply

    nayana.kn
    Member

    The data returned from web service will in XML format and i want help in either using this web service or in connecting client db(native sql database) directly from mobile application guidance any one of the above will help me to take forward.

    #333165 Reply

    nayana.kn
    Member

    We are in real need of solution for above question as soon as possible so hope will get help as main aim of our app is to communicate with database so if get help on that then it will be really good for us to proceed to buy this SDK so expecting your help can someone tell how to communicate with the remote database are how to use .net web service in mobione

    #333223 Reply

    support-michael
    Keymaster

    Hi,

    Apologies in advance for not having a good dev guide but here is a rough flow of a form example. Before I share the data are you working REST or SOAP web services?

    There are 2 mechanisms for interfacing with a REST web services from MobiOne:
    1- for a basic form processing api use the MobiOne Visual Designer to configure a screen to serve as a Form that can be submitted to your service using std HTTP GET or POST.
    2 – for a non-http form api implement custom JavaScript ajax call with your app data/parameters (jquery example: $.ajax())

    For #1 (HTTP form), do the following:
    1) layout your UI including widgets to capture the data you wish to submit

    2) configure the screen as a Form
    – Form: enabled/checked
    – Form action type: URL
    – Form action URL: <url to webservice>
    – Form result type: <data format> select the type of result returned by your web services, e.g., JSON, XML, Text, …

    3) add a button or other control who’s behavior is intended to initiate the submission, e.g., a button with OnClick(Submit Form) action
    See attachment form-ss-1.png

    4) Generate html5 application code using either the Run in Test Center action or the Project menu>Generate Application Files. Note you should open your startup screen in the designer and then click it to make it the active screen before generating code.. The code generator will create a directory with the naming pattern <yourstartupscreenname>_www/ In this directory is a javascript file named <yourstartupscreenname>_custom.js that includes 2 key functions related to your form’s processing life-cycle:

    preSubmitForm_<startupscreenname>()  // called before the forum is dispatched to server, can veto submission
    postSubmitForm_<startupscreenname>(isSuccess, data) // called when server returns or on network failure
    

    5) in postSubmitForm_<startupscreenname>(isSuccess,data) process the result using javascript. In the example above I am expecting a JSON result. Based on the result either I stay on the login screen or transition to a main menu screen and kick off the real app use-cases.

    /**
     * Perform custom actions upon return from form submission.
     * 
     * @param {boolean} isSuccess true if all OK; otherwise false
     * @param {Object} data results of form processing; error message if isSuccess == false
     * @return {boolean} true if OK; otherwise false
     */
    phoneui.postSubmitForm_m1_login = function(isSuccess, data) {
      
      clearLoginFields();
      
      if (isSuccess) {
        // process data
    
        var result = data;
        if (result.status == 0) {//login error
          showLoginErrorMsg(result.errorMsg);
          return false;
        }
        
        //process result.data; a user profile
        sessionProfile = result.data;
        phoneui.gotoPage('m1-main');
    
        return true;
      } 

    I can go into more details as needed.

    Attachments:
    You must be logged in to view attached files.
    #333232 Reply

    nayana.kn
    Member

    Thanks a lot for your help hope this will work for me and i would like to tell you that we will be working with SOAP

    #348933 Reply

    Muralidharan
    Member

    I M trying to develop a iphone app using mobione. According to requirement I should be able to fetch and retrieve data from client DB.
    So I am using webservice in java but I am struck in how to call this webservice in mobione app.Can u pls hepl in doing that

    #348953 Reply

    Hi Muralidharan,

    Michaael has followed up with you in your other topic: http://www.genuitec.com/support-genuitec/viewtopic.php?p=25692#p25692

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: How consume .net web service in mobione

You must be logged in to post in the forum log in