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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:31:41+00:00 2026-05-26T03:31:41+00:00

hy! I call my webservice from android: HttpConnection con = new HttpConnection(XXX/login, handler); con.setParameter(username,user.getText().toString());

  • 0

hy!

I call my webservice from android:

HttpConnection con = new HttpConnection("XXX/login", handler);
con.setParameter("username",user.getText().toString());
con.setParameter("password",new MD5(pw.getText().toString()).getMD5());
con.start();

Log:

10-12 14:35:52.123: ERROR/NFF User(265): test
10-12 14:35:52.123: ERROR/NFF PW(265):   098f6bcd4621d373cade4e832627b4f6
10-12 14:35:53.443: ERROR/NFF(265): { what=0 when=3917056 obj={"Data":null,"Details":"not authorized","Status":403}
10-12 14:35:53.443: ERROR/NFF(265):  }

On Pc (login?user=test&password=098f6bcd4621d373cade4e832627b4f6):

{"Data":null,"Details":"bad request","Status":400}

Php:

<?php

if (!isset($_REQUEST['username']) || !isset($_REQUEST['password'])) 
{
die(json_encode(array("Data"=>null, "Details"=>"bad request", "Status"=>400)));
}

include "db_connect.php";

$response = array("Data"=>null, "Details"=>null, "Status"=>null);

$result = mysql_query("SELECT * FROM USER WHERE USER_NAME = '".mysql_real_escape_string($_REQUEST['username'])."' AND PASSWORD = '".mysql_real_escape_string($_REQUEST['password'])."'");
$line = mysql_fetch_assoc($result);


if ($line != null) 
{

session_destroy();

session_start();

mysql_query("UPDATE USER SET USER_SESSION = '".mysql_real_escape_string(session_id())."' WHERE USER_ID = '".mysql_real_escape_string($line['USER_ID'])."'");

$_SESSION['authenticated'] = true;
$_SESSION['USER_ID'] = $line['USER_ID'];

$response['Status'] = 200;
$response['Data']['session_id'] = session_id();
} 
else 
{
$response['Status'] = 403;
$response['Details'] = "not authorized";
}


echo json_encode($response);
?>​

Why are the words “what=0 when=3917056” from the android request included?

Please 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-05-26T03:31:41+00:00Added an answer on May 26, 2026 at 3:31 am

    I think what and when belong to the android message that is sent to a handler

    http://developer.android.com/reference/android/os/Message.html#what

    and are logged as you log the whole message.

    The structure looks something like this

    Message{
          what=0
          when=3917056
          obj=(This is your actual result)
     }
    

    So no worries 😉

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

Sidebar

Related Questions

I can call a webservice with KSOAP2 from android,now i want to know is
I am a newbie to Android platform. I want to call a webservice from
How should I call this Soap Webservice from an android <AddCar xmlns=http://abcd.com/> <clsAddCarRequest> <clsCredentials>
I am using KSOAP2 to call a .NET webservice from android application,and the response
I want to call a webservice from jQuery. How can I do that?
Can I call a remote webservice from a Stored Procedure and use the values
I'd like to call a .net webservice from another domain using only jquery. What
I'm trying to call an asp.net webservice from the same project it's in: [MethodImpl(MethodImplOptions.Synchronized)]
I am looking to return a PDF from a webservice call. (ATM, a custom
If you call a web service from Silverlight like this: MyServiceClient serviceClient = new

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.