axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris List <cmbl...@yahoo.com>
Subject Re: Beanserializers and Namespaces (Axis1 1.3)
Date Fri, 07 Jul 2006 00:44:05 GMT
I'd like the answer to this one as well.  So far I have come up with two options that I don't
like so much.  I am hoping Axis isn't this primitive...

1) Tweak the WSDL so all complex types use the default namespace.
2) Cut and paste the Axis generated client side bean code into your server side value object.

I don't like either but that is how I solved it until someone has a better answer.

Jansen Werner <Werner.Jansen@eon-is.com> wrote: 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):


    username
    userdescription


The XML tag corresponding to the serialized class has its namespace, but
not the properties of the serialized tags (i.e. the tags below
). 

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



 		
---------------------------------
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail Beta.
Mime
View raw message