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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:29:38+00:00 2026-05-30T01:29:38+00:00

Last few days I searched all over the internet to solve this problem but

  • 0

Last few days I searched all over the internet to solve this problem but I couldn’t solve this yet. The problem is this.I have a simple web service implemented in Eclipse Indigo as follow

package com.testvtfour.ws;

public class Customer {

private String name;

public void setName(String name) {
    this.name = name;
}

public String getName() {
    return name;
}
}

Web service part is perfect. I used Axis2 as soap engine & Tomcat 7 as the server. Problem occurs when I’m trying to consume this web service. I created web service client in eclipse & Axis2 Automatically generats “CusstomerCallBackHandler” & “CustomerStub”. Following is the implemented client

package com.testvtfour.ws;
import java.rmi.RemoteException;

import com.testvtfour.ws.CustomerStub.SetName;
import com.testvtfour.ws.CustomerStub.GetNameResponse;
public class TestClient {
public static void main(String[] args)throws RemoteException{
    CustomerStub stub = new CustomerStub();
    com.testvtfour.ws.CustomerStub.SetName obj = new 
        com.testvtfour.ws.CustomerStub.SetName();
    obj.setName("Grant");
    stub.setName(obj);

    com.testvtfour.ws.CustomerStub.GetNameResponse res = stub.getName();
    System.out.println(res.get_return());
}
}

But always this prints “null”. Why is that? How can I solve this? & I want to know that the updated value by this kind of client can be showed in an Android application. Because It is second part of my project. Please help me.
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-05-30T01:29:39+00:00Added an answer on May 30, 2026 at 1:29 am

    An Axis2 web service is typically stateless. This means that the getName() is called on a different instance than the setName() was called on, hence name is null when you try to retrieve it.

    • See Axis2 Session Management on how to deal with sessions.
    • See this SO question and its answers: Axis2 Session Managment
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been having this problem for the last few days and I can't
Hello All at StackOverflow, over the last few days I have had some problems
Over the last few days I have noted a few web sites that demonstrated
I've been scratching my head over this for the last few days and neither
in the last few days I've been thinking about this problem without finding an
thanks for all the help the last few days. I'm hoping someone knows this
I have been reading over the last few days about assembly language, and the
I've seen a couple of questions over the last few days that have used
I searched for Java based web application frameworks the last few days. I have
I have spent the last few days trying to parse a SOAP response but

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.