|
Replies:
1
-
Last Post:
Jun 11, 2009 4:07 AM
by: aitdx
|
|
|
|
|
|
|
Problem with inheritance
Posted:
Jun 11, 2009 3:55 AM
|
|
|
Hi
I use Glassfish and metro for cretating a web service. My problem is that two classes (LegalEntity and NaturalPerson) extends a abstrac class Person. When metro generates the wsdl, the Person's class is referenced but the others (Natural and Legal) not.
When I execute a find method, I get the following error:
[java] Exception in thread "main" com.sun.xml.ws.encoding.soap.DeserializationException: Failed to read a response: javax.xml.bind.UnmarshalException [java] - with linked exception: [java] [javax.xml.bind.UnmarshalException: Unable to create an instance of es.corunet.facturgal.client.Person [java] - with linked exception:
It's true, becouse Peson is abstract.
Any, idea??
Thanks
|
|
|
|
|
|
|
Re: Problem with inheritance
Posted:
Jun 11, 2009 4:06 AM
in response to: aitdx
|
|
|
I answered myself:
I have to use:
@WebService @XmlSeeAlso({LegalEntity.class,NaturalPerson.class})
Thanks
Message was edited by: aitdx
|
|
|
|
|