axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <dava...@gmail.com>
Subject Re: XMLBean data
Date Thu, 06 Jan 2005 15:52:15 GMT
Jonathan,

Do you want to submit a small example as well? patch against current
axis cvs would be great! Please add the whole things as a patch in
JIRA.

thanks,
-- dims


On Thu, 6 Jan 2005 07:48:09 -0800, Jonathan Colwell <jcolwell@bea.com> wrote:
> I wrote some AXIS de/serializers for XmlBeans that I've been using
> successfully in the Beehive project.
> 
> http://svn.apache.org/repos/asf/incubator/beehive/trunk/wsm/src/runtime/
> org/apache/beehive/wsm/axis/util/encoding/
> 
> Feel free to check them out to see if they suit your needs.  One thing
> to keep in mind is that XmlBeans do not have a default constructor,
> instead they use an internal Factory to create instances.  If you are
> trying to register XmlBeans using the regular BeanSerializers you are
> out of luck but these serializers should help.
> 
> cheers,
> 
> Jonathan
> 
> -----Original Message-----
> From: Bouche Paul [mailto:Paul.Bouche@student.hpi.uni-potsdam.de]
> Sent: Thursday, January 06, 2005 5:39 AM
> To: axis-user@ws.apache.org
> Subject: RE: XMLBean data
> 
> First of you cannot automatically serialized any arbritrary java object
> with Axis (it wouldn't know how). For Axis to automatically
> serialize/deserialize your objects they need to be Java Bean compatible
> (if you don't know what that is google for java beans). One of the
> requirements for a java bean is that the class has to have a default
> constructor. Your type net.data.xml.MyDocument obviously does not have a
> default constructor or it is not public. So all you need to do, if you
> want Axis to automatically de/serialize your class, is to add default
> constructor ie.
> public MyDocument() {};
> 
> Or you have to write a schema for MyDocument, a serializer, a
> deserializer for axis and import the schema into the wsdl.
> 
> Hope this helps,
> Paul
> 
> P.S.: I cannot resist to say that all this is also mentioned in the
> documentation if one would read it ;-).
> 
> > -----Original Message-----
> > From: Hung Vu2000 [mailto:hungvu2000@hotmail.com]
> > Sent: Donnerstag, 6. Januar 2005 07:22
> > To: axis-user@ws.apache.org
> > Subject: XMLBean data
> >
> >
> > Hi,
> >      I' m developing a webservice that need a parameter of type
> > XMLBean.
> > When using Java2WSDL tool from Axis to create wsdl file I had the
> > following
> >     WARN org.apache.axis.wsdl.fromJava.Types[main] - The class
> > net.data.xml.MyDocument does not contain a default constructor, which
> > is a requirement for a bean class.  The class cannot be converted into
> 
> > an xml schema type.  An xml schema anyType will be used to define this
> 
> > class in the wsdl file.
> >     How can I resolve this problem ?
> >
> > Thanks,
> > Hung
> >
> > _________________________________________________________________
> > Express yourself instantly with MSN Messenger! Download today it's
> > FREE!
> > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >
> >
> > .
> >
> 
> .
> 
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

Mime
View raw message