• Post Reply Bookmark Topic Watch Topic
  • New Topic

Netbeans/wsgen Abstract class problem

 
John Farrel
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am attempting to create a web service with nb 7.2.0, using the built-in ant wsgen functionality.

The web service takes an object of abstract class as a parameter.
I have annotated the abstract class with @XmlSeeAlso({concreteClass1.class, concreteClass2});
I have also annotated the web service class with @XmlSeeAlso({concreteClass1.class, concreteClass2});

But when wsgen runs, I never get the concrete classes put into the generated .xsd, just the abstract class.

What am I doing wrong here?

 
John Farrel
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've tried simplifying this to the basic case.
The generated schema does not include Dog and Cat.


@XmlSeeAlso({Dog.class, Cat.class})
@WebService(serviceName = "UtbTest")
public class UtbTest
{

/**
* This is a sample web service operation
*/
@WebMethod(operationName = "getAnimal")
public Animal getAnimal(@WebParam(name = "animal") Animal animal)
{
return animal;
}
}

public abstract class Animal
{
public abstract String getName();
}

public class Cat extends Animal
{
@Override
public String getName()
{
return "cat";
}
}

public class Dog extends Animal
{
@Override
public String getName()
{
return "dog";
}
}






 
John Farrel
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

So, no-one has any idea what the problem is.
Damn.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!