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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:21:57+00:00 2026-06-07T21:21:57+00:00

I am using webservices for connecting the android app with server side using ksoap2

  • 0

I am using webservices for connecting the android app with server side using ksoap2 library. The problem is that despite of reading various related stuff, I am still confused about the terms marshaling, searlizing, desearlizing etc.
What is actually the difference between them? and why we need to do it. I just know that it is related to webserivces only and it is basically done for passing or returning values from webservices. Why we actually need them and how we actually searlize or desearlize the stuff or webserver itself gives us this functionality??? We need to write code for marshaling or searlization at client side or in webservice itself? Is there anyway that we don’t have to do this and call a webservice in such a way that no need to searlize or desearlize the stuff or alternatively any library that we can include in the project to do it automatically? Please guide

  • 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-07T21:21:58+00:00Added an answer on June 7, 2026 at 9:21 pm

    marshaling/serializing, unmarshalling/deserializing are often used interchangeably in the webservices world and basically they mean the same.

    When sending a request to a web service you need to build it in a certain way, if its a REST web service, the format of the request/response is usually in XML or JSON.

    If it is a SOAP web service the format would be XML.

    So every time you send a request you need to build it in the correct format and this is called marshalling/serializing.

    Every time you get a response you need to parse it and that is called unmarshalling/deserializing.

    I suggest you learn REST web services as they are easier and more flexible.

    EDIT:

    In order to connect to a REST service in java you should use HttpURLConnection.

    here is a sample code of how it might look:

    public static String httpPost(String urlStr) throws Exception {
    URL url = new URL(urlStr);
    HttpURLConnection conn =
    (HttpURLConnection) url.openConnection();
    conn.setRequestMethod("POST");
    conn.setDoOutput(true);
    conn.setDoInput(true);
    conn.setUseCaches(false);
    conn.setAllowUserInteraction(false);
    conn.setRequestProperty("Content-Type",
    "application/x-www-form-urlencoded");
    
    if (conn.getResponseCode() != 200) {
    throw new IOException(conn.getResponseMessage());
    }
    
    // Buffer the result into a string
    BufferedReader rd = new BufferedReader(
    new InputStreamReader(conn.getInputStream()));
    StringBuilder sb = new StringBuilder();
    String line;
    while ((line = rd.readLine()) != null) {
    sb.append(line);
    }
    rd.close();
    
    conn.disconnect();
    return sb.toString();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am using following webservices for retrieving data from server server side:.net client side:ksoap2
I have a web app, that also has an iPhone and Android app using
I'm using Ksoap2 on Android for connecting Webservice. When I add file Ksoap2.jar downloaded
I have a set of webservices that I connect to using Silverlight Client. I
I'm connecting to a webservice using WCF. I can authenticate on the server correctly,
i wish to connecting webservices in java using apache,axis2 and eclipse. here i got
i am creating an app in which i want to take xmldata using webservices.
I am currently having trouble connecting to my webservice on android. I am using
I'm connecting to a PHP webservice that returns URLs of images in JSON (using
I've been using Webservices so long. But,so far up to what I know,I haven't

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.