Have you looked at the Aegis Inheritance section in the User Guide?

http://xfire.codehaus.org/Aegis+Inheritance

 -Øyvind

-----Opprinnelig melding-----
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sendt: fr 27.04.2007 01:20
Til: [email protected]
Emne: [xfire-user] service method with abstract class parameter? - Couldn't 
instantiate class. null
 
Our current issues revolves around calling a service method that takes in 
an abstract class as a parameter. e.g.

public void loadGelcoCCAddendum(GelcoCCAddendum gelcoCCAddendum) throws 
GeneralWebServiceException;

Class Hierachy:
GelcoCCAddendum - Abstract Class
        GelcoLodgingCCAddendum - concrete subclass
        GelcoRentalCCAddendum - concrete subclass
        GelcoTravelCCAddendum - concrete subclass

I would like for this loadGelcoCCAddendum() method to have the ability to 
handle any of the GelcoCCAddendum subclasses. The issue we are seeing is 
that XFire is giving us an error. I believe it is trying to instantiate 
the abstract class(GelcoCCAddendum) rather than the concrete class that is 
passed in. I would really rather not have a seperate service method for 
each subclass of GelcoCCAddendum.

org.codehaus.xfire.fault.XFireFault: Couldn't instantiate class. null
        at 
org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
        at 
org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
        at 
org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)
        at 
org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
        at 
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.client.Client.onReceive(Client.java:382)


Any thoughts on how XFire/Aegis need to be configure to support this 
functionality? This seems to be a pretty basic approach but have not had 
any luck getting this to work! Would changing the parameter from an 
Abstract class to an Interface help us out at all?


Thanks in advance!


Bob

<<winmail.dat>>

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to