Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 88220 invoked from network); 1 Oct 2004 17:35:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Oct 2004 17:35:32 -0000 Received: (qmail 58933 invoked by uid 500); 1 Oct 2004 17:33:31 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 58835 invoked by uid 500); 1 Oct 2004 17:33:30 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 58737 invoked by uid 99); 1 Oct 2004 17:33:29 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,HTML_TEXT_AFTER_BODY,HTML_TEXT_AFTER_HTML X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [192.216.91.20] (HELO chordiant.com) (192.216.91.20) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 01 Oct 2004 10:33:26 -0700 Received: from ponyxpress.chordiant.com ([10.88.0.23]) by chordiant.com (8.11.7p1+Sun/8.11.6) with ESMTP id i91HXNC18471 for ; Fri, 1 Oct 2004 10:33:23 -0700 (PDT) X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4A7DC.BFD1B5C1" Subject: RE: Abstract class object in a method parameter Date: Fri, 1 Oct 2004 10:33:22 -0700 Message-ID: <56D531FDDAF8874FBB61747D8C49CE6D07F072@ponyxpress.chordiant.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Abstract class object in a method parameter Thread-Index: AcSnRWxkplCQx4SaQnO9vk28jLGb1gAb4mqAAAIiiDAAA6PowAAEA2MQ From: "Sagar Pidaparthi" To: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C4A7DC.BFD1B5C1 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Christophe, =20 Yes, it works now. But, I had to use beanMapping and not TypeMapping tags. (I will try again with type mapping). =20 =20 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) =20 Thanks for your help. =20 Regards =20 =20 Sagar =20 -----Original Message----- From: Christophe Roudet [mailto:croudet@activia.net]=20 Sent: Friday, October 01, 2004 8:37 AM To: axis-user@ws.apache.org Subject: RE: Abstract class object in a method parameter =20 As far as I understand Party is your abstract class. You need to declare the derived type: =20 If you have: =20 public class MyConcreteParty extends Party { ... } =20 Declare: =20 =20 Christophe ________________________________ From: Sagar Pidaparthi [mailto:Sagar.Pidaparthi@chordiant.com]=20 Sent: Friday, October 01, 2004 11:31 AM To: axis-user@ws.apache.org Subject: RE: Abstract class object in a method parameter =20 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. =20 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. =20 I will report back my findings. =20 Please respond with any other ideas. =20 Here is my bean mapping in my WSDD file. =20 =20 =20 =20 =20 regards =20 Sagar =20 =20 =20 =20 =20 =20 -----Original Message----- From: Christophe Roudet [mailto:croudet@activia.net]=20 Sent: Friday, October 01, 2004 5:50 AM To: axis-user@ws.apache.org Subject: RE: Abstract class object in a method parameter =20 Works fine for me (axis1.1, rpc-enc), just declared your derived types in the wsdd. =20 Christophe =20 ________________________________ From: Sagar Pidaparthi [mailto:Sagar.Pidaparthi@chordiant.com]=20 Sent: Thursday, September 30, 2004 7:30 PM To: axis-user@ws.apache.org Subject: Abstract class object in a method parameter =20 Hi, =20 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. =20 =20 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. =20 Given below is the call I am trying to make on the client =20 Vector RETVAL =3D partyRoleCA.getAllPaymentMethods(userName, authentication, (Party)myPerson); =20 =20 The Axis server receives the call through a SOAP message and tries to instantiate a Party object and then..... =20 Given below is the error message received from the server. =20 =20 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. =20 =20 Can anybody confirm this observation? Is there a way around the problem? =20 Regards =20 Sagar =20 ------_=_NextPart_001_01C4A7DC.BFD1B5C1 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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=3D" http://businessClasses.pmf.chordiant.com"

        qname=3D"ns:MyConcreteParty"

        = type=3D" java:com.chordiant.pmf.businessClasses.MyConcreteParty = "

        serializer=3D"org.apache.axis.encoding.ser.BeanSerializerFactory&quo= t;

        deserializer=3D"org.apache.axis.encoding.ser.BeanDeserializerFactory= "

        encodingStyle=3D"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=3D"http://businessClasses.pmf.chordiant.com"

        qname=3D"ns:Party"

        languageSpecificType=3D"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 =3D 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

 

=00 ------_=_NextPart_001_01C4A7DC.BFD1B5C1--