axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jansen Werner" <Werner.Jan...@eon-is.com>
Subject Beanserializers and Namespaces (Axis1 1.3)
Date Wed, 05 Jul 2006 10:56:26 GMT
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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message