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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:04:34+00:00 2026-06-05T14:04:34+00:00

i am self-leaner to android.Right now i am consuming web service in android eclipse

  • 0

i am self-leaner to android.Right now i am consuming web service in android eclipse by the method SOAP.So i have created two pages.The first page consists of an edittext and a button and the second page consists of only one textbox.I am creating exactly like this webservice GetBibleWordsbyKeyWord in android eclipse.

Here my need is to get the input from the user by edittext box on page one and display appropriate texts on second page’s textbox exactly what the above web service is going to invoke(display)according to the user’s input.These things must want to be happen when clicking the button from the page one.

NOTE :- I have tried it.Its getting run.But its only showing a blank pages on page two

What to do to achieve this concept?

Please find my code for reference

Webservice Backend Class [DYNAMIC PROJECT]

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

Android java class page1

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

        Button next = (Button) findViewById(R.id.btn);
        next.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                Intent myIntent = new Intent(view.getContext(), Web_concept.class);
                startActivityForResult(myIntent, 0);
            }

        });
    }
}

Android java class page2

@Override
public void onCreate(Bundle savedInstanceState) {

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

            try
            {
                SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
                EditText num1 = (EditText) findViewById(R.id.editT);
                request.addProperty("str", Integer.valueOf(num1.getText().toString()));
                SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
                envelope.dotNet = true;
                envelope.setOutputSoapObject(request);
                HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
                androidHttpTransport.call(SOAP_ACTION,envelope);
                Object result = envelope.getResponse();
                System.out.println("Result : " + result.toString());
                ((TextView) findViewById (R.id.textView1)).setText(result.toString());
                } 
            catch (Exception E) {
                    E.printStackTrace();
                }
            }
       }

Thanks for any 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-05T14:04:36+00:00Added an answer on June 5, 2026 at 2:04 pm

    First thing change your input to web service as define in web service method
    i.e change the line request.addProperty("str", Integer.valueOf(num1.getText().toString()));

    to
    request.addProperty("str", num1.getText().toString());

    as you define str as String in your webmethod

    and second thing change Object result = envelope.getResponse();

    to Object result = envelope.bodyIn;

    and please check on Internet how to access textView of second page in first page.
    I am not sure about it.may be it is not possible.

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

Sidebar

Related Questions

I am self learner to android. Right now i have five pages in an
I am self-leaner to android and java.Is there any session variables available in android
i am self_learner to android. I have two screens.The first screen contains one edittext
(self asking and self-answering because I spent hours on the web looking for this,
My self as a Front End Developer, for many years I have resolved many
self.data = sorted(self.data, key=attrgetter('word')) self.data is a list of Word objects. Word objects have
Pretty self-explanatory. I want to just have the combo box without any text outside
Pretty self explanatory. I have an input button. It has text. It has a
Pretty much self-explanatory. I have a string: 8:4,7:2,... I need to get the values
I am self- learner to android, Assume an android program is going to display

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.