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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:15:27+00:00 2026-06-12T14:15:27+00:00

I got problem on how I connected to web service using ksoap2 my code

  • 0

I got problem on how I connected to web service using ksoap2
my code :

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.*;
import org.ksoap2.transport.HttpTransportSE;
import android.widget.TextView;


public class FirstScreen extends Activity {

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

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

    SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
    Request.addProperty("Celsius", "32");

    SoapSerializationEnvelope soapEnvelope =  new SoapSerializationEnvelope(SoapEnvelope.VER10);
    soapEnvelope.dotNet =true;
    soapEnvelope.setOutputSoapObject(Request);

    HttpTransportSE bah = new HttpTransportSE(URL);

    try
    {
        bah.call(SOAP_ACTION, soapEnvelope);
        SoapPrimitive resultString = (SoapPrimitive)soapEnvelope.getResponse();
        tv.setText("status: "  + resultString);

    }
    catch (Exception e)
    {
        e.printStackTrace();
    }

}

}

it says Application MyTest (process com.falafel.mytest)) has stopped unexpectedly!! 🙁

my error:

10-10 13:14:06.690: E/dalvikvm(279): Could not find class  'org.ksoap2.serialization.SoapObject', referenced from method com.falafel.mytest.FirstScreen.onCreate
10-10 13:14:06.690: W/dalvikvm(279): VFY: unable to resolve new-instance 501 (Lorg/ksoap2/serialization/SoapObject;) in Lcom/falafel/mytest/FirstScreen;
10-10 13:14:06.690: D/dalvikvm(279): VFY: replacing opcode 0x22 at 0x0012
10-10 13:14:06.690: D/dalvikvm(279): VFY: dead code 0x0014-005a in Lcom/falafel/mytest/FirstScreen;.onCreate (Landroid/os/Bundle;)V
10-10 13:14:06.870: W/Resources(279): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f070000}
10-10 13:14:06.890: D/AndroidRuntime(279): Shutting down VM
10-10 13:14:06.890: W/dalvikvm(279): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
10-10 13:14:06.920: E/AndroidRuntime(279): FATAL EXCEPTION: main
10-10 13:14:06.920: E/AndroidRuntime(279): java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapObject
10-10 13:14:06.920: E/AndroidRuntime(279):  at com.falafel.mytest.FirstScreen.onCreate(FirstScreen.java:32)
10-10 13:14:06.920: E/AndroidRuntime(279):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
10-10 13:14:06.920: E/AndroidRuntime(279):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
10-10 13:14:06.920: E/AndroidRuntime(279):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
10-10 13:14:06.920: E/AndroidRuntime(279):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
10-10 13:14:06.920: E/AndroidRuntime(279):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
10-10 13:14:06.920: E/AndroidRuntime(279):  at android.os.Handler.dispatchMessage(Handler.java:99)
10-10 13:14:06.920: E/AndroidRuntime(279):  at android.os.Looper.loop(Looper.java:123)
10-10 13:14:06.920: E/AndroidRuntime(279):  at android.app.ActivityThread.main(ActivityThread.java:4627)
10-10 13:14:06.920: E/AndroidRuntime(279):  at java.lang.reflect.Method.invokeNative(Native Method)
10-10 13:14:06.920: E/AndroidRuntime(279):  at java.lang.reflect.Method.invoke(Method.java:521)
10-10 13:14:06.920: E/AndroidRuntime(279):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
10-10 13:14:06.920: E/AndroidRuntime(279):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
10-10 13:14:06.920: E/AndroidRuntime(279):  at dalvik.system.NativeStart.main(Native Method)
 10-10 13:14:11.240: I/Process(279): Sending signal. PID: 279 SIG: 9

Any Help would be appriciated, thank 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-06-12T14:15:28+00:00Added an answer on June 12, 2026 at 2:15 pm

    Have you done it

    Project > Properties > Java Build Path > Order and Export > and finally, checkmark your imported KSOAP2 library.

    Also, don’t consume a webservice on UI thread, consider a service or AsyncTask

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

Sidebar

Related Questions

I got problem with sending data in Android using httpPost. I found some example,
I've got a Android AppEngine Connected Project I'm trying to build using GWT2.4 RequestFactory
i got a little problem with downloading images from the web to my android
i got problem with my code and hopefully someone able to figure it out.
I want to ask about strcpy. I got problem here. Here is my code:
I've got a simple .NET web service that is supposed to return a string
I call a .Net web service from my Blackberry app. After having nothing but
I've created a web service to connect my android device to a mysql database.
I got an small problem, I always worked with Hibernate and Spring on Web
I've got a WCF service that's using file-less activation: <bindings> <basicHttpBinding> <binding transferMode=Streamed> <security

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.