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 Andras Balogh <ab...@gmail.com> on 2005/12/21 14:08:46 UTC

Axis 1.3 problem with BeanDeserializer and bean properties

    Hello all,

    Here is my case, I have used the wsdl2java t o generate the classes 
to talk
to a remote web service.
All is fine in the first step but in the second step i get this error:
org.xml.sax.SAXException: Invalid element in com.mypackage.Component - qty
    at 
org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:261)
    at 
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
    at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
.....
    As You see i have a bean called Component and has a property qty 
(and others).
I have started investigating what happens and I found the problem to be 
the propertyMap built in the
BeanDeserializer class. I have added some System.out.printlns in the 
Axis classes (i.e. BeanDeserializer )
and to my surpise the following properties were found for my Component 
class:
focusable, enabled,  visible, background, name ,font.
These are not properties of com.mypackage.Component  BUT properties of 
java.awt.Component!
    Why the bean introspector (or whatever) works with java.awt.Component?
This is a web application so i don't even import or refer ever to the 
awt class.
This is an Axis error or somewhere in beanutils package?
What can i do to prevent this?

Thanks for any input.

Best regards,
Andras.