axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sagar Pidaparthi" <Sagar.Pidapar...@chordiant.com>
Subject RE: Abstract class object in a method parameter
Date Fri, 01 Oct 2004 17:33:22 GMT
Christophe,

 

Yes, it works now.  But, I had to use beanMapping and not TypeMapping
tags.  (I will try again with type mapping).   

 

Secondly, the process here is important-- after adding the new mapping
information to WSDD, I had to regenerate the proxies.   ( This is for
anybody else who might have a similar problem)

 

Thanks for your help.

 

Regards

 

 

Sagar

 

-----Original Message-----
From: Christophe Roudet [mailto:croudet@activia.net] 
Sent: Friday, October 01, 2004 8:37 AM
To: axis-user@ws.apache.org
Subject: RE: Abstract class object in a method parameter

 

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:Sagar.Pidaparthi@chordiant.com] 
Sent: Friday, October 01, 2004 11:31 AM
To: axis-user@ws.apache.org
Subject: RE: Abstract class object in a method parameter

 

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 Normal classes.  I have tried this and it does
resolve the problem in some cases.

 

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-----
From: Christophe Roudet [mailto:croudet@activia.net] 
Sent: Friday, October 01, 2004 5:50 AM
To: axis-user@ws.apache.org
Subject: RE: Abstract class object in a method parameter

 

Works fine for me (axis1.1, rpc-enc), just declared your derived types
in the wsdd.

 

Christophe

 

________________________________

From: Sagar Pidaparthi [mailto:Sagar.Pidaparthi@chordiant.com] 
Sent: Thursday, September 30, 2004 7:30 PM
To: axis-user@ws.apache.org
Subject: Abstract class object in a method parameter

 

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

 


Mime
View raw message