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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:29:51+00:00 2026-05-21T22:29:51+00:00

Hi all I am having a little problem using ksoap2. I used ksoap to

  • 0

Hi all I am having a little problem using ksoap2.

I used ksoap to communicate with the web service, but it gave me the following error please help friends.. as I am new to Android. The code and exception log cat are below. It gives me that exception on the first line of the try block in my code.
Please take a look and help

CODE IS…

/***********************************************
/PRIVATE DATA MEMBERS
/***********************************************/
 private static EditText userName;
 private static EditText password;
 private static Button submit;
 private static TextView tv;

 private  final String SOAP_ACTION = "action";
 private  final String METHOD_NAME = "login";
 private  final String NAMESPACE = "namspace";
 private  final String URL =  "url";

 private Object resultRequestSOAP = null;



/***********************************************
/OVERRIDDEN METHODS
/***********************************************/

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    userName = (EditText) findViewById(R.id.user);
    password = (EditText) findViewById(R.id.pass);

    tv = (TextView) findViewById(R.id.result);
    submit = (Button)  findViewById(R.id.submit);
    submit.setOnClickListener(this);
    //SoapObject abc = new SoapObject();

}


public void onClick(View v) {
    // TODO Auto-generated method stub
    switch(v.getId())
    {
    case R.id.submit:
        System.out.println("At start");
         SoapObject userRequest=new SoapObject(NAMESPACE, METHOD_NAME);
         String email = userName.getText().toString();
         String pass = password.getText().toString();


         userRequest.addProperty("email", email); // login-account
         userRequest.addProperty("password", pass); // login-password

         SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
         request.addProperty("UserLogin", userRequest); // login-account

        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
         envelope.bodyOut = request;


         AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL);

         try {


            Object result=envelope.getResponse();


            SoapObject resp=(SoapObject) result;

            System.out.println(resp.getProperty("result"));

            String[] results = (String[])  resultRequestSOAP;

            System.out.println("***********"+results[0]);

            tv.setText( results[0]);


         } catch (Exception aE) {
             System.out.println("in catch");
             aE.printStackTrace();
           }

        System.out.println("M At END");
        break;
    }

}

ERROR LOG CAT IS..

05-10 16:16:22.861: WARN/System.err(312): java.lang.NullPointerException

05-10 16:16:22.881: WARN/System.err(312):     at org.ksoap2.serialization.SoapSerializationEnvelope.getResponse(SoapSerializationEnvelope.java:513)

05-10 16:16:22.881: WARN/System.err(312):     at org.test.FiNear.myFiNear.onClick(myFiNear.java:82)

05-10 16:16:22.891: WARN/System.err(312):     at android.view.View.performClick(View.java:2408)

05-10 16:16:22.891: WARN/System.err(312):     at android.view.View$PerformClick.run(View.java:8816)

05-10 16:16:22.903: WARN/System.err(312):     at android.os.Handler.handleCallback(Handler.java:587)

05-10 16:16:22.903: WARN/System.err(312):     at android.os.Handler.dispatchMessage(Handler.java:92)

05-10 16:16:22.911: WARN/System.err(312):     at android.os.Looper.loop(Looper.java:123)

05-10 16:16:22.911: WARN/System.err(312):     at android.app.ActivityThread.main(ActivityThread.java:4627)

05-10 16:16:22.921: WARN/System.err(312):     at java.lang.reflect.Method.invokeNative(Native Method)

05-10 16:16:22.951: WARN/System.err(312):     at java.lang.reflect.Method.invoke(Method.java:521)

05-10 16:16:22.951: WARN/System.err(312):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)

05-10 16:16:22.951: WARN/System.err(312):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)

05-10 16:16:22.951: WARN/System.err(312):     at dalvik.system.NativeStart.main(Native Method)
**
  • 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-21T22:29:52+00:00Added an answer on May 21, 2026 at 10:29 pm
    SoapObject userRequest=new SoapObject(NAMESPACE, METHOD_NAME);
         String email = userName.getText().toString();
         String pass = password.getText().toString();
    
    
         userRequest.addProperty("email", email); // login-account
         userRequest.addProperty("password", pass); // login-password
         request.addProperty("UserLogin", userRequest); // login-account
    

    you are making two requests ???? is one or if your and to you need to make two calls

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

Sidebar

Related Questions

I'm having a little problem with vim. I'm using Debian testing and --version gives
I'm having a little problem using Navigation properties and inheritance on ADO.NET. This is
I've having the opposite problem of many Python users--my program is using too little
I'm trying to wrap div with specific html code but I'm having problem using
Hey all! Having a little trouble with my stack. Im trying to print each
Hi All I am currently having an issue calling a WCF service from a
There is probably a simple solution to this problem I've been having all night.
I'm having some problem using multiple selectBooleanCheckBox in multiple DataTables in ui:repeat. Something like
iphone http://sharingdream.com/phone.jpg Dear all, I'm having a strange problem with an application I'm building
I'm having an interesting but difficult problem with my JavaScript code. Basically, I'm trying

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.