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 Tom Jordahl <to...@macromedia.com> on 2002/12/02 21:29:27 UTC
RE: beanMapping or typeMapping?
There is no difference between the two.
beanMapping is just a convenience.
--
Tom Jordahl
Macromedia Server Development
-----Original Message-----
From: Mitch Gitman [mailto:mgitman@usa.net]
Sent: Tuesday, November 26, 2002 6:58 PM
To: axis-user@xml.apache.org
Subject: beanMapping or typeMapping?
I have a Java interface with bean-compliant classes I want to make into a
web service. Running Java2WSDL, I get a bunch of complexType elements for
these classes. Fine.
Next, I want to produce the deploy.wsdd and then the server-config.wsdd.
Running WSDL2Java generates a bunch of classes analogous to my original
classes. I figure, "Heck, ignore these. Stick with my own."
But WSDL2Java also generates a deploy.wsdd with a typeMapping element for
each of these auto-generated classes. Each typeMapping has serializer and
deserializer attributes.
If I'm just using my own classes on the server, I wonder if I'm better off
just using beanMapping elements sans (de)serializer attributes. Under what
circumstances is beanMapping preferable to typeMapping?
=============================================
Here's the relevant passage from docs/reference.html:
<typeMapping qname="ns:localName" classname="classname"
serializer="classname" deserializer="classname"/>
Each typeMapping maps an XML qualified name to/from a Java class, using a
specified Serializer and Deserializer.
<beanMapping qname="ns:localName" classname="classname">
A simplified type mapping, which uses pre-defined serializers/deserializers
to encode/decode JavaBeans. The class named by "classname" must follow the
JavaBean standard pattern of get/set accessors.