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:[EMAIL PROTECTED]
> Sent: Donnerstag, 6. Januar 2005 07:22
> To: [EMAIL PROTECTED]
> 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/
>
>
> .
>
.