You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Galkovsky Michael <ga...@bah.com> on 2004/06/25 20:43:46 UTC
Transient member serializaton
Hi,
I am kind of in a bind. We are using Axis 1.2 and have a number of
beans that have some transient members that we do not want to be
serialized over the wire. I can't figure out a way to do this. Imagine
a bean that has 3 members
Person
id
name
phone
And my service, getAllPersons, should return just the name
and phone, since id is an internal data and has no relevance to the
consumer.
My Person class was generated by Wsdl2Java, in wsdl I only describe name
and phone, id is not metioned. The generated person.java did not have
any reference to id until i added it just to the java class after it was
generated.
Now the id member gets serialized along with name and phone. Even though
the typeDesc does not mention it.
Now whenever I get my person object in the web service client I get an
error because the id is serialized and naturally an error is thrown.
I traced the code as far down into axis as I could to try to figure out
why BeanSerializer was using reflection and not the typeDesc that the
Person class returned to it.
Any insight would be much appreciated. Thanks in advance.
Michael