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

The Archive Base Latest Questions

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

I am facing a problem calling the web service from my Android code. My

  • 0

I am facing a problem calling the web service from my Android code. My web service code returns a string with a delimiter ‘#’ in between. Now i need to make a code in Android that will call the web service , separate the delimiters such that the actual names are displayed using a check box for the user to select

Here is my Android code :

package com.app;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.widget.TextView;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;

public class TestApp extends Activity {
private static final String SOAP_ACTION = "http://tempuri.org/getData";




  private static final String METHOD_NAME = "getData";


    private static final String NAMESPACE = "http://tempuri.org/";
    private static final String URL = "http://10.0.2.2/login2/Service1.asmx";
    TextView tv;

    boolean[] bln1=null;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        tv=(TextView)findViewById(R.id.text1);

        call();

        String[] arr={""};
        boolean[] bln = {false, false, false};

       bln1 = new boolean[arr.length];


        new AlertDialog.Builder(TestApp.this)
        .setIcon(R.drawable.alert_dialog_icon)
        .setTitle("Title")
        .setMultiChoiceItems(arr,
                bln,
                new DialogInterface.OnMultiChoiceClickListener() {
                    public void onClick(DialogInterface dialog, int whichButton,
                            boolean isChecked) {


                        if(isChecked){
                            bln1[whichButton] = true;
                        }
                        else{
                            bln1[whichButton] = false;
                        }
                    }
                })
        .setPositiveButton("Ok", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {


            }
        })
        .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {


            }
        })
       .show();


    }




    public void call()
    {
        try {

            SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

            //request.addProperty("passonString", "Hello Android");



            SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
            envelope.dotNet=true;
            envelope.setOutputSoapObject(request);

            HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
            androidHttpTransport.call(SOAP_ACTION, envelope);

            Object result = (Object)envelope.getResponse();


            tv.setText(result.toString());
        } catch (Exception e) {
            tv.setText(e.getMessage());
            }
    }
}
  • 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:33:04+00:00Added an answer on May 24, 2026 at 5:33 am

    insteand of casing to object Object result = (Object)envelope.getResponse(); casting

      SoapPrimitive responsesData = (SoapPrimitive) envelopes.getResponse();
      String result = responsesData .toString();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing a problem while calling processRequest function from javascript. I need two
I'm facing a problem with IE6. I took the toggle function from this website
I am facing an interesting problem right now. I know it is not that
I am facing problem in android-ndk. When i try to call a java nan-static
I am making android app in which I am facing problem . The overview
I need to use asp:CustomValidator for a tool. The problem am facing is that
I'm facing a great problem here and i need some clarifications Here is my
I am facing problem while calling the alert box. Can I know what is
I'm always facing a problem where I can't really think of service object encapsulating
I am facing one problem in AsyncTask in my application in Android. The problem

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.