Hi everybody,
I still have this open issue with Axis concerning BeanSerializers and
namespaces. Classes serialized with this serializer do not have a
namespace associated to their elements (=properties) and I don't why and
- what's even more important - how to make the BeanSerializer use the
namespace.
There is a simple class, UserInfo for example. It only consists of two
"properties", userName and userDescription that are accessible via the
standard getter/setter pairs. The parameterless default constructor is
present as well.
Since this class is so simple, I decided to serialize it using
BeanSerializer:
(call is an axis client call object)
call.registerTypeMapping(UserInfo.class,
new QName(Constants.PRS_NAMESPACE_URI, "UserInfo"),
new BeanSerializerFactory(UserInfo.class,
new QName(Constants.PRS_NAMESPACE_URI, "UserInfo")),
new BeanDeserializerFactory(UserInfo.class,
new QName(Constants.PRS_NAMESPACE_URI, "UserInfo")));
A call to the Web Service, however does not look like I expected it to
be. This is what goes over the wire (abbreviated):
<ns1:UserInfo xmlns:ns1="....">
<userName>username</username>
<userDescription>userdescription</userdescription>
</ns1:UserInfo>
The XML tag corresponding to the serialized class has its namespace, but
not the properties of the serialized tags (i.e. the tags below
<ns1:UserInfo />).
Where's my mistake? What do I miss?
Thanks in advance,
Werner
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]