File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes serializers and deserializers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "serializers and deserializers" Watch "serializers and deserializers" New topic

serializers and deserializers

william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
why do i need to specify the the serialisers and deserializers for a user difined class that is sent as a parameter to a rpc call using soap?
why do need so many serialzers and deserializers?
thanks in advance

Help me!Help you!!!
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13035
Soap has to know how to deal with every parameter transmitted, one way or another. For typical Java variables, the built in serializers should work.
Kyle Brown
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
You might be interested in this article and this article that describe the problem and its solution in depth.
[ April 22, 2002: Message edited by: Kyle Brown ]

Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at for other WebSphere information.
Mandan Happy
Ranch Hand

Joined: Dec 17, 2001
Posts: 65
I am developing a tool that Loads a existing java
application and converts it to a Web Service .
(using JAX-RPC)
The user may have any kind of *user Defined Types*
In this case am stuck since I cannot restritc the *return types* and *parameters* to the set of data types supported by xrpcc . Generating a *serializer* / *deserializer* for every user defined type programmatically doesnt sound easy.
How I would see the problem is "Two" End points trying to communicate with a set of "Restricted Data Types" which doesnt accomodate all the data types that the end point may have .
Any pointers on how I could solve this problem ?
Mandan Happy
Ranch Hand

Joined: Dec 17, 2001
Posts: 65
I would suggest not to use custom serializers/deserializers since these are not portable.
Roy Huang
Ranch Hand

Joined: Nov 21, 2001
Posts: 104
Mandan Happy, hi!
I have a question about how to get the self defined object from the Server side?
I want to do soem function calls after I get the transferred object from the client side, then deserialize or using its fields as parameters to call the local function in the server.
How can I implement it? When does the server know
the client has sent a new object to it?
Can U offer a simple java example?


SCJP 1.4/SCBCD/SCWCD<br />MCSE<br />IBM professional XML Developer<br />SAP certified Development Consultant (NetWeaver portal and Web JavaApplication)
Mandan Happy
Ranch Hand

Joined: Dec 17, 2001
Posts: 65
if type is
-standard java types
-Java Beans
then almost all implementations can handle them.
In case its a user defined type.Then u would have to write a custom serializer which wouldnt be portable.To avoid coding those custom serilaizers/deserialixers u may use GLUE from mindelectric which takes care of most user defined types where in u neednt write serializers/deserializers but u have to generate a map file using a java2schema tool provided by Mindlectric and edit them.But its also not without bugs for it would fail if u have a user defined types with overloaded constructors containing the same no of arguments.
Any way those guys have done a good job .
I agree. Here's the link:
subject: serializers and deserializers
It's not a secret anymore!