Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android 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
 
I'm so happy! And I wish to make this tiny ad happy too:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!