As far as I understand Party is your abstract
class. You need to declare the derived type: If you have: public class MyConcreteParty extends Party
{ … } Declare: <typeMapping
xmlns:ns=" http://businessClasses.pmf.chordiant.com"
qname="ns:MyConcreteParty"
type=" java:com.chordiant.pmf.businessClasses.MyConcreteParty "
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/> Christophe From: Sagar Pidaparthi
[mailto:[EMAIL PROTECTED] Thanks for the response. I did
declare these abstract classes as beans with BeanMapping in WSDD file for this
service. It does cause trouble, even with mappings specified. I will do some more experiments. I
really don’t want to go and convert all abstract classes to I will report back my findings. Please respond with any other ideas. Here is my bean mapping in my WSDD file.
<beanMapping
xmlns:ns="http://businessClasses.pmf.chordiant.com"
qname="ns:Party"
languageSpecificType="java:com.chordiant.pmf.businessClasses.Party"
/> regards Sagar -----Original Message----- Works fine for me (axis1.1,
rpc-enc), just declared your derived types in the wsdd. Christophe From: Sagar
Pidaparthi [mailto:[EMAIL PROTECTED] Hi, I am experiencing some problems
while instantiating some of the business objects on the server. This
could be because the base classes are abstract and any attempt use these
objects in a parameter would require such an object’s instantiation.
In our native code usage such base class objects like Person were obtained from
a factory and probably type cast because we were controlling/developing the
code. When axis tries to instantiate a
Party, it fails because Party is an abstract class and can not be
instantiated. We may have a problem with abstract classes (at run time),
just as we had problem with interfaces as parameters ( at proxy
generation time) in a method call. Given below is the call I am trying
to make on the client
Vector RETVAL = partyRoleCA.getAllPaymentMethods(userName, authentication, (Party)myPerson); The Axis server receives the call
through a SOAP message and tries to instantiate a Party object and
then….. Given below is the error message received
from the server. faultString: org.xml.sax.SAXException: Unable to
create JavaBean of type com.chordiant.pmf.businessClasses.Party. Missing
default constructor? Error was: java.lang.InstantiationException:
com/chordiant/pmf/businessClasses/Party. Can anybody confirm this observation? Is there a way around
the problem? Regards Sagar |
- RE: Abstract class object in a method parameter Sagar Pidaparthi
- RE: Abstract class object in a method parameter Christophe Roudet
- RE: Abstract class object in a method parameter Sagar Pidaparthi
- RE: Abstract class object in a method parameter Sagar Pidaparthi