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 7645933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:04:29+00:00 2026-05-31T10:04:29+00:00

I am pure beginner to [android-eclipse],here i need to consume web services from the

  • 0

I am pure beginner to [android-eclipse],here i need to consume web services from the url “http://122.248.240.105:93” through android eclipse so
please list the steps to consume the web services, if possible send me demo as any one web service from that url or some other examples.

Thanks a lot

  • 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-05-31T10:04:31+00:00Added an answer on May 31, 2026 at 10:04 am

    you can consume restful services very easily.
    and for data exchange prefer json rather than XML.
    i am attaching one sample of restful service call from android client with JSON.

      public class LoginService {
    
     loginurl="http:/yourhostname.com/Service.svc/Service/ValidateMobileUser";
    /**
     * This method is used to validate client name from wcf
     * 
     * @param 1: username
     * @param 2: password    * 
     * @return true or false as string value
     */
    public String authenticate(String userName, String passWord
            ) throws JSONException, IllegalStateException,
            IOException,NullPointerException {
        Log.d("input authenticate method", userName + passWord );
        HttpPost request = new HttpPost(loginurl);
        request.setHeader("Accept", "application/json");
        request.setHeader("Content-type", "application/json");
        JSONObject json = new JSONObject();
        json.put("UserName", userName);
        json.put("Password", passWord);     
        json.toString();
        JSONStringer str = new JSONStringer().object().key("clientEntity")
                .value(json).endObject();
        StringEntity entity = new StringEntity(str.toString());
        request.setEntity(entity);
        DefaultHttpClient httpClient = new DefaultHttpClient();
        HttpResponse response = httpClient.execute(request);
        Log.e("Status code ", "status code is " + response.getStatusLine());
        HttpEntity responseEntity = response.getEntity();
        char[] buffer = new char[(int) responseEntity.getContentLength()];
        InputStream stream = responseEntity.getContent();
        InputStreamReader reader = new InputStreamReader(stream);
        reader.read(buffer);
        stream.close();
        String response_str = new String(buffer);
        int i = response.getStatusLine().getStatusCode();
        if (i == 200) {
            Log.d("output authenticate method", response_str);
    
            return response_str;
        } else {
            response_str = Integer.toString(i);
    
            return response_str; 
        }
        }
    
        }
    

    I have used restful WCF and used Json in my code.
    you can use this as template for restful services with json.
    for restful services.

    i would prefer restful with json but if you want to read about ksoap tutorials i suggest you to read:
    http://www.devx.com/wireless/Article/39810/1954
    How to call a WCF service using ksoap2 on android?

    webservices:
    http://sochinda.wordpress.com/2011/05/27/connecting-to-net-web-service-from-android/
    http://android.vexedlogic.com/2011/04/17/android-lists-iv-accessing-and-consuming-a-soap-web-service-i/

    saxparser:

    http://www.anddev.org/parsing_xml_from_the_net_-_using_the_saxparser-t353.html

    kshop:
    http://seesharpgears.blogspot.com/2010/11/returning-array-of-primitive-types-with.html

    http://seesharpgears.blogspot.com/2010/11/basic-ksoap-android-tutorial.html

    Drawables pics: http://androiddrawableexplorer.appspot.com/

    Please accept the answer if it is helpful for you. thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the Pure CSS menu from here: http://csswizardry.com/2011/02/creating-a-pure-css-dropdown-menu/ It works fine, but I
I need a php function which produce a pure domain name from URL. So
I have a pure-SQL queryset: SELECT ft2.user_id, avg(...) figure, count(...) as figure_count FROM figures_table
I need pure javascript function that finds the current opacity of HTML element and
Aside from having a pure virtual function, is there a way to prevent an
I have a Pure AS3 app that I'm deploying to both iOS and Android.
I am a beginner with javascript ajax, and all this web stuff. I have
I have inherited a pure C project that uses GNU Pth ( http://www.gnu.org/software/pth/ )
My pure DotNET library runs as a plugin inside an unmanaged desktop application. I've
Using pure functional languages can have a lot of benefits over using impure imperatives,

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.