Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in return Collection in Websphere Webservice  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I wrote a simple web service which returns Complex user defined objects like CustomerBean/UserBean within a Hash Map.

Here is the webservice:

public class MyWebservice{

public HashMap getData(HashMap requestData) {
//goes and gets the data from business service component and
//gets business objects and it is stored into response HashMap.
//example;
HashMap responseData = new HashMap();
responseData.put("customer",new CustomerBean());
return response;
}

public class CustomerBean implements java.io.Serializable {
// has attributes and its getter and setter method...
}

Web service is deployed in IBM Websphere Application Server 6 environment.

When client calls this web service, I am getting an exception at the server:
"Serialization cannot occur for CustomerBean"

Could you please explain what i am doing wrong. How to fix this issue...

Thanks
Jey
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!