Apache

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Beanserializers and Namespaces (Axis1 1.3)

    0 answers - 3221 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hallo there,
    there is another option, I think. If I understood this thing right, you
    can add something like a descriptor for your Bean to the BeanSerializer.
    Within this descriptor, you can map properties to different names for
    XML tags and so on. And there's a property fiddling with namespaces. So
    perhaps you can manually assign the namespace to every property. But
    this solution would be very ugly as well. Why would I use a
    BeanSerializer if I have to map properties by myself, just to correct a
    (in my eyes) stupid behaviour concerning namespaces? Custom type mapping
    isn't more complex than this
    But like you said, I as well don't give up hope that Axis isn't this
    primitive. :)
    Werner
    From: Chris List [mailto:cmblist (AT) yahoo (DOT) com]
    Sent: Friday, July 07, 2006 2:44 AM
    To: axis-user (AT) ws (DOT) apache.org
    Subject: Re: Beanserializers and Namespaces (Axis1 1.3)
    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 (AT) eon-is (DOT) comwrote:
    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 (AT) ws (DOT) apache.org
    For additional commands, e-mail:
    axis-user-help (AT) ws (DOT) apache.org
    Do you Yahoo!?
    Everyone is raving about the all-new Yahoo! Mail Beta.
    <*
    andraisers>

Re: Beanserializers and Namespaces (Axis1 1.3)


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "Apache"

EMSDN.COM