You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Glen Daniels <gd...@macromedia.com> on 2001/07/26 16:42:16 UTC
Beans
I'm just musing over some ideas while I write docs...
In the spirit of making things really easy for our users, what do you think
of this:
At present, if we try to serialize a non-mapped class, we fault. What if we
change that to notice if the class is a bean, and if so, default to the
BeanSerializer with type QName "java:classname" (where
java="http://xml.apache.org/axis/javaclass" or something). Then we modify
the deserialization logic to notice that namespace, and attempt to use the
BeanSerializer itself unless there's some other explicit mapping for the
QName.
This doesn't do a whole lot for interoperability, but it would let
Axis<->Axis interactions work without any explicit typemappings for
beans....
I think that GLUE might do something like this by default as well - maybe we
could hook up with Graham and see about using the same namespace so we
interoperate?
Glen Daniels
Macromedia
http://www.macromedia.com/
Building cool stuff for web developers
Re: Beans
Posted by Aleksander Slominski <as...@watson.ibm.com>.
> I think that GLUE might do something like this by default as well - maybe
we
> could hook up with Graham and see about using the same namespace so we
> interoperate?
FYI SoapRMI is doing it by default and uses unique enough namespace URI:
"urn:soaprmi-v11:temp-java-xml-type" but having one standard would be nice
(however there is of course problem if my.List is the same as your List...
best,
alek
Re: Beans
Posted by manoj cheenath <ma...@bea.com>.
This is how weblogic binds java bean to xml:
<types>
<schema targetNamespace="java:examples.soap"
xmlns="http://www.w3.org/1999/XMLSchema" >
<complexType name="Data">
<attribute name="stringVal" type="string" />
<attribute name="intVal" type="int" />
</complexType>
</schema>
</types>
for the class:
package examples.soap;
public class Data{
private int intVal;
private String stringVal;
}
and refer it in the soap envelope as:
xsi:type=foo:Data
where:
namespace foo = "java:examples.soap"
Data is the name of the class.
It will be great if all Java implementations can use
a common convention to map java bean to xml.
-manoj
Glen Daniels wrote:
> I'm just musing over some ideas while I write docs...
>
> In the spirit of making things really easy for our users, what do you think
> of this:
>
> At present, if we try to serialize a non-mapped class, we fault. What if we
> change that to notice if the class is a bean, and if so, default to the
> BeanSerializer with type QName "java:classname" (where
> java="http://xml.apache.org/axis/javaclass" or something). Then we modify
> the deserialization logic to notice that namespace, and attempt to use the
> BeanSerializer itself unless there's some other explicit mapping for the
> QName.
>
> This doesn't do a whole lot for interoperability, but it would let
> Axis<->Axis interactions work without any explicit typemappings for
> beans....
>
> I think that GLUE might do something like this by default as well - maybe we
> could hook up with Graham and see about using the same namespace so we
> interoperate?
>
> Glen Daniels
> Macromedia
> http://www.macromedia.com/
> Building cool stuff for web developers