Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8285217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:24:47+00:00 2026-06-08T11:24:47+00:00

I have created a couple of web services of type .asmx (.NET) getting data

  • 0

I have created a couple of web services of type .asmx (.NET) getting data from a local MySQL database and displaying it as XML in the browser. This is already up and running.

I want to parse said XML and display it in an Android application I’m working on. As the MySQL database will only be updated a few times every month I don’t see the need to query the web service (and consequently the MySQL DB) every time I want to display the data in the Android application.

I figured it would make sense to download the XML returned by my web service and store it on the Android file system and parse it from there. Is this just incredibly backwards or is it doable?

When I access one of my local web service methods at

http://localhost/../WebService.asmx/GetLastDBUpdate

it returns a timestamp indicating when the database was last changed as XML in the browser, but I can’t figure out how to download the file raw XML file.

Can I do this, or should I do this differently?

Any suggestions are welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T11:24:48+00:00Added an answer on June 8, 2026 at 11:24 am

    One simple way to do the synchronization, is to pass the timestamp of the last update to the server. The server then either gives an empty response (no updates), or a list of objects that where updated since that timestamp. In both cases, it gives a new timestamp, so the client doesn’t have to stay in sync with the server.

    1. Request POST /WebService.asmx/GetUpdates

      <GetUpdates>
          <Timestamp>2012-07-19T13:42:13Z</Timestamp>
          <UpdateNow>True</UpdateNow>
      </GetUpdates>
      

      If there is no previous update from that client, pass an empty timestamp, or leave it out. Set UpdateNow to False, to just see if there are any updates (<Objects> will always be empty).

    2. Response

      <Updates>
          <Timestamp>2012-07-23T17:54:13Z</Timestamp>
          <Count>23</Count>
          <Objects>
              <Object>...</Object>
              <Object>...</Object>
              ...
          </Objects>
      </Updates>
      

      OR

      <Updates>
          <Timestamp>2012-07-19T13:42:13Z</Timestamp>
          <Count>0</Count>
          <Objects/>
      </Updates>
      

      The <Timestamp> could either be the time of the request, or the time of the latest update.

    3. Process: Parse the XML, and write it to an SQLite database. Save the timestamp for future updates.


    To make the actual request to the web-service, you could use kSoap2 for Android:

    public SoapObject GetUpdates(String timestamp, boolean updateNow) {
        SoapObject request = new SoapObject("http://tempuri.org/", "GetUpdates");
        request.addProperty("Timestamp", timestmap);
        request.addProperty("UpdateNow", updateNow ? "True" : "False");
    
        SoapSerializationEnvelope envelope =
                new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.setOutputSoapObject(request);
    
        HttpTransportSE transport = new HttpTransportSE(
                "http://www.example.com/WebService.asmx/GetUpdates");
        transport.call("GetUpdates", envelope);
    
        return (SoapObject) transport.bodyIn;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a couple of Web Application/Web Projects created with ASP .NET 4.0 that
I have a winform application that uses some referenced web services to get data.
I created a couple web services for my app as follows. 1. Allows a
I have created a web service which has a couple of methods developed using
I have created a couple of java working sets for a project in my
I have created 3 classes as following Ext.mine.TextParent - Inherting from Textfield Ext.mine.child.TextChildA -
I have created a custom post type named People. I have created a page
I have a web application that uses a couple of PDF forms to create
I have a couple of queries for a web site that take a long
I have a model that requires loading external data from an auxiliary source. A

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.