Hi,
I'm using axis 1.3 and jdk 1.5, and I'm trying to send a tree
constructed using the composite design pattern. So I have an abstract
class and a set of instantiating classes. I've then constructed the WSDL
to describe these classes and using WSDL2Java constructed the bean
serialisers etc. I've added the beanMappings to the wsdd file and it is
being added to the server-config.wsdd file correctly.
The abstract class contains no data. If I send an object is instantiated
from a concrete class with no data it all works fine. However if send an
object that contains data it fails with the error;
org.xml.sax.SAXException: Invalid element in
net.climateprediction.handleService.statements.expandedStatements.ExpandedStatement
- (name of data reference)
I think this is because although the extended concrete class has the set
option the abstract class doesn't, and axis is trying to call set on the
abstract class instead of the concrete class.
Also I get the error
org.xml.sax.SAXException: No object was found for class type class
[Lnet.climateprediction.handleService.statements.expandedStatements.ExpandedStatement;
if the class contains a reference to the abstract class to enable it to
reference another node in the tree (ie. the concrete class is a branch
node). It seems axis is trying to instantiate an object from the
abstract class instead of the concrete class derived from it.
Both of these errors would appear to be caused by axis trying to use
references to the wrong class. Does anyone have any ideas on how to
correct this, do I need to add additional information to the beanMapping
when classes are extended, or to the wsdd file or is this a bug.
Any help would be greatfully appreciated
Daniel