i use axis 1.3 and abstract types quite extensively... I 'originally'
had a problem with axis, but i have had none for around 6-12 months...

i find though that you really need to follow the process to the letter
to make it work...

here's my process, if it helps...

1.) construct a valid wsdl
2.) run ant target on wsdl to create .java classes making sure to pass
the -s option to get the deploy.wsdd file
3.) cut the <typemapping from the deploy.wsdd and paste into the
server-config.wsdd
4.) check the <parameter> and <operation> tags and copy them if need be
5.) restart

i find that if you edit the server-config.wsdd by hand, you could run
into real trouble, so if you've done that (and it sounds like you did as
you refer to 'beanmapping') i'd suggest you try this...

i used to try to edit the files myself manaully too but i had such a
hard time with axis that i now edit ONLY the wsdl file, and use the axis
tools 100% from that point...

hth,
cwd
 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 05, 2006 4:15 PM
To: [email protected]
Subject: RE: Abstract types

This seems very similar to an issue that I had.  I believe it is a bug.
I ended up going back to 1.2.1.
 
      Gregg

  _____  

From: [EMAIL PROTECTED] on
behalf of Daniel Goodman
Sent: Fri 5/5/2006 9:01 AM
To: [email protected]
Subject: Abstract types



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.Expand
edSt
atement
- (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.Expa
nded
Statement;
 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


Reply via email to