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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:52:57+00:00 2026-05-22T18:52:57+00:00

I called Web Service from Android: .java file: public class FirstScreen extends Activity {

  • 0

I called Web Service from Android:

.java file:

public class FirstScreen extends Activity {


        private static final String NAMESPACE = "http://tempuri.org";
        private static final String URL = "http://w3schools.com/webservices/tempconvert.asmx";  
        private static final String SOAP_ACTION = "http://tempuri.org/FahrenheitToCelsius";
        private static final String METHOD_NAME = "FahrenheitToCelsius";

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

            AutoCompleteTextView ACTV = (AutoCompleteTextView)findViewById
                            (R.id.autoCompleteTextView1);       

            SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); 
            request.addProperty("Fahrenheit", "89");

            SoapSerializationEnvelope envelope = 
                new SoapSerializationEnvelope(SoapEnvelope.VER11); 

            envelope.setOutputSoapObject(request);
            HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

            try {
                androidHttpTransport.call(SOAP_ACTION, envelope);           
                ACTV.setHint("Received :" + envelope.getResponse());
            } 
            catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

Manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.mobitour.mytest"
      android:versionCode="1"
      android:versionName="1.0">    
   <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".FirstScreen"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
     </application>    
    <uses-permission android:name="android.permission.INTERNET"></uses-permission>     
    <uses-sdk android:minSdkVersion="8" />  
</manifest>

I followed this http://www.vimeo.com/9633556 when was writing application.
However I have one problem: I receive a word “Error” instead of required string, I see “Received :Error” on my screen. I can’t understand where’s mistake!Do you?

  • 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-22T18:52:58+00:00Added an answer on May 22, 2026 at 6:52 pm

    I resolved

    Very easy, it needs

    envelope. dotNet = true;
    

    before

    envelope.setOutputSoapObject(request);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a web service whose methods will be called from a dynamic banner
Calling a .net SOAP1.1 web service from android using ksoap2 lib I met a
I am using NSURLConnection to download a zipped file from a web service. In
I noticed a new web service today called a Dead man's switch , which
Let's say I have a class in my web app called class Foo. It
From within a DLL that's being called by a C#.NET web app, how do
I am trying to retrieve information from a web service call. The following is
I am calling a WSDL web service from Python using SOAPpy . The call
I am calling a web service from a C# forms based app. ServReturnType obj
I am consuming a web service from a third party site. I have the

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.