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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:19:54+00:00 2026-06-08T06:19:54+00:00

Right now i am consuming a SOAP web service on android/eclipse.Well its working fine.Please

  • 0

Right now i am consuming a SOAP web service on android/eclipse.Well its working fine.Please find my service link

“http://54.251.60.177/MobileWS/Student.asmx?wsdl“

“GetStudentInformation”, this is the service i am working out with and its input value is “111105009”

If i give this value as input on the above service,its just showing the result like the below images on the emulator and also showing these things publicly.

Image_1

enter image description here

Image_2
enter image description here

But here my problem is,the above image_2 is showing all the xml tags with answers,but i need to show only the answers like what i mentioned on the image_2.How to achieve this concept?

Please find my sources below

WebMethod.java

public class GetStudentInformation 
{
public String GetStudentInformation(String sStudentCode)
{
    return sStudentCode;
}    }

Demo_tabActivity.java

public class Demo_tabActivity extends Activity 
{
private static String NAMESPACE = "http://tempuri.org/";
private static String METHOD_NAME = "GetStudentInformation";
private static String SOAP_ACTION = "http://tempuri.org/GetStudentInformation";
private static String URL = "http://54.251.60.177/MobileWS/Student.asmx?WSDL";

Button btnFar;
EditText txtFar;

   @Override
   public void onCreate(Bundle savedInstanceState)
   {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main);

       txtFar = (EditText)findViewById(R.id.editText_in);
       btnFar = (Button)findViewById(R.id.button1);
       btnFar.setOnClickListener(new View.OnClickListener()
       {
       public void onClick(View v)
       {
         String b;

         //Initialize soap request + add parameters
         SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

         //Use this to add parameters

         request.addProperty("sStudentCode",txtFar.getText().toString());

         //Declare the version of the SOAP request

         SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

         envelope.setOutputSoapObject(request);

         envelope.dotNet = true;

         try 
         {
             HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

             //this is the actual part that will call the webservice

             androidHttpTransport.call(SOAP_ACTION, envelope);

             // Get the SoapResult from the envelope body.

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


             if (result != null)
             {
              //Get the first property and change the label text

                b = result.toString();
                Intent myIntent = new Intent(Demo_tabActivity.this, Tabhost.class);

                myIntent.putExtra("result1", b);
                startActivity(myIntent);
             }
             else
             {
                Toast.makeText(getApplicationContext(), "No Response",Toast.LENGTH_SHORT).show();
             }
         }
        catch (Exception e)
        {
           e.printStackTrace();
           }
         }
       });
   }
}

Tabhost.java

public class Tabhost extends TabActivity {

@Override
public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.main1);

    String result1;

    Bundle extras = getIntent().getExtras();

    if(extras!=null)
    {
        result1 = extras.getString("result1");
    } else result1 = "Didnt work !" ;



    TabHost tabHost = getTabHost();
    TabHost.TabSpec spec;
    Intent intent;

    intent = new Intent().setClass(this, Tab_1.class);
    intent.putExtra("result1", result1);
    spec = tabHost.newTabSpec("first").setIndicator("First").setContent(intent);
    tabHost.addTab(spec);

    intent = new Intent().setClass(this, Tab_2.class);
    spec = tabHost.newTabSpec("second").setIndicator("Second").setContent(intent);
    tabHost.addTab(spec);

    tabHost.setCurrentTab(0);
 }
 }

Tab_1.java

public class Tab_1 extends Activity 
{
TextView tv1;
String result1;

/** Called when the activity is first created. */

@Override
public void onCreate(Bundle savedInstanceState) 
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main2);

Bundle extras = getIntent().getExtras();
if(extras != null)
{   
    result1 = extras.getString("result1");
} 
else result1 = "didnt work";

    tv1 = (TextView)findViewById(R.id.textView_main2);
    tv1.setText(result1);


}
}

Tab_2.java

public class Tab_2 extends Activity {


/** Called when the activity is first created. */   

@Override
public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.main3);
    }
}

Thanks for your precious help!…

  • 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-08T06:19:55+00:00Added an answer on June 8, 2026 at 6:19 am

    Your web service is returning you a response in xml format. You simply need to parse it and get the needed information out. There are many of example on the internet explaining how to do that.

    https://www.google.com/search?q=android+xml+parsing+example

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

Sidebar

Related Questions

i am self-leaner to android.Right now i am consuming web service in android eclipse
Right now i am consuming two webservices by the method SOAP on android.The way
I'm working with an application that needs to be make some time consuming SOAP
I'm developing my firs app for android right now, I am using multiple tables
Right now I have an upload field while uploads files to the server. The
Right now, I have: RewriteRule ^([^/\.]+)?$ index.php?id=$1 [L] to match any username at the
Right now when I run this it keeps clicking on the same button every
Right now, I've just some code which fetches the picture from the URL directly.
Right now I have a script that will get the last five files in
Right now, the label for my Activity has the name of the current Activity.

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.