You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by dovle <do...@delsyne.ro> on 2002/06/06 11:25:22 UTC
Custom serializer . HELP
Hi all,
I have learned how to do a custom serializer and stuff like that but now I
hit a wall.
I want to write my own serializer that should act like this.
Class X have some attributes and a special one, PK. The attributes might
contain X objects (they can be of X type, or vectors that contains X
objects). I want the base object to be serialized completelly but the X
objects contained by the base object should be serialized in short form
(only the primarykey field).
I don't know how to achieve this.
So I need to know how can I pass a context object when serializing. For
example:
marshall( base class X, contextobj )
if( contextobj.shortForm )
// serialize the X object in short form, only PK
else
{
// fully serialize the X object
contextObj.setShort( true ) ;
for( element = all elems inside X )
{
serialize ( elements, contextObj ) ;
}
// make the contextobj as it was first
contextObj.setShort( false ) ;
}
MY QUESTION : HOW CAN I PASS THE CONTEXT OBJECT WHEN USING xjmr object.
I have seen an Object context parameter but I don't understand for what it
is used.
Please help
dovle