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

  • Home
  • SEARCH
  • 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 6205133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:13:04+00:00 2026-05-24T05:13:04+00:00

We have an android application that we’re trying to use for web-service communication. We

  • 0

We have an android application that we’re trying to use for web-service communication.

We can successfully send a request and get a response with the following snippet.

public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);

    TextView textView = new TextView(this);

    setContentView(textView);
    //textView.setText();

    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

    request.addProperty("foo", "bar");
    request.addProperty("foo", "bar");
    request.addProperty("foo", "bar");
    request.addProperty("foo", "bar");
    request.addProperty("foo", "bar");
    request.addProperty("foo", "bar");


    Log.w(TAG, request.toString());
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.dotNet = true;

    envelope.setOutputSoapObject(request);
    envelope.encodingStyle = "utf-8";
    envelope.implicitTypes = false;
    AndroidHttpTransport httpTransport = new AndroidHttpTransport(URL);

    try

    {
    httpTransport.call(SOAP_ACTION, envelope);

    KvmSerializable ks = (KvmSerializable)envelope.bodyIn;
    for(int i=0;i < ks.getPropertyCount();i++)
    {
        ks.getProperty(i);
        SoapObject soap = (SoapObject)ks.getProperty(i);
        String tmp = soap.getProperty(0).toString();
        textView.setText(tmp);
        Log.w(TAG2, envelope.toString());
        Log.w(TAG3, ks.getProperty(i).toString());

    }

    }
    catch (Exception exception)
    {
        textView.setText(exception.toString());
        Log.w(TAG4, exception);
    }


 }

Now, the response from the request that gets presented in the textView.setText(tmp); presents the response as follows:

anyType{foo=bar;foo=bar;foo=bar;}

Whereas we want it to come back as foo = bar, foo = bar

Any hits and pointers would be highly appreciated. Thanks in advance.

  • 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-24T05:13:05+00:00Added an answer on May 24, 2026 at 5:13 am

    Where you have these:

        SoapObject soap = (SoapObject)ks.getProperty(i);
        String tmp = soap.getProperty(0).toString();
    

    You need to use these:

        SoapObject soap = (SoapObject)ks.getProperty(i);
        SoapObject tmp = soap.getProperty(0);
        String foo = tmp.getProperty(0).toString();
    

    I see that you using complex type and you should use HttpTransportSE not AndroidHttpTransport is deprecated.

    Hope it helps

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

Sidebar

Related Questions

I have a Web Service and an Android application that uses this web service.
I have an Android application that connects to Facebook to request authorization of an
I have an Android application that is a TabHost with a WebView. I use
I have an Android application that makes use of TTS (Text to speech) API.
I have android application and service that runs in separate process. Application and service
I have a C++ Android application that I'm trying to debug with ndk-gdb. The
I have an android application that gets data from the web such as an
Here's the deal: I have an Android application that needs to call a web
I have an android application that relies heavily on Json Web Services. so I
I want to build an notepad-style application on android that will have syntax highlighting.

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.