• Post Reply Bookmark Topic Watch Topic
  • New Topic

passing custom objects to webservices

 
Eric Gauthier
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm currently workin on how passing custom objects to a webservice.
I'm using JBuilder 6 to create both the service and the client.
While importing the wsdl to create the client side of the service, I can see that an interface (named as my custom object) has been created but contains nothing. So I can't invoking myClass.setSometing... I tried to pass an HttpServletRequest object but the same thing seems to happen. I'm not really cumfortable about web services and soap (i'm pretty newbie in that).
I saw that soap defines a set of standard mappings (string, int, byte etc..)
Can I pass custom objects? How can I do that?
Thanks for any help!
Eric
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what facility JBuilder provides, but I bet you are not meeting the conditions. Is your object serializable? Do all the variables have get/set methods? are they named by JavaBean conventions?
Bill
 
Eric Gauthier
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I see... My class is not serializable, it seems to be the problem.
It's a bit like COM objets, isn't it?
I read that there's two types of serialization. One is to make my class bean like, ie having SetProperties and GetProperties or by simply having a serialization method and deserialization method.
Which method should I use?
p.s. My class is very simple, just contains members variables and some get set methods.
Thanks!
Eric
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!