Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to pass custom objects to web service methods as parameters ?  RSS feed

 
kish kumar
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to pass custom objects to web service methods as parameters &return please explain. if possible give reference to good source
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Passing custom objects in a request is contrary to the basic idea of web services as being universal and independent of programming language.

Why do you think you need to?

If you absolutely have to, you can pass a serialized Java object as an attachment to a SOAP message (look for SAAJ) or as a byte[] in the body of a HTTP request to a RESTful service.

Bill
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!