0
votes

I'm trying to generate wsdl from java.

The plugin generates schema information for those classes included in the same project but seems not for classes in dependency packages.

<xs:element minOccurs="0" name="xxx" type="xs:anyType"/>

The xxx class is an JAXB annotated class and resides in different package with different (compile scoped) artifact.

Is this normal?

1

1 Answers

0
votes

I found the problem. And I'm answering for my own question for further visitors.

Here comes two blog entries saved my days.

Please, anybody, answer for me and others with some technical stuff.

My JAXB annotated classes look like this.

@Entity
@Inheritance
abstract class Parent {
}

@Entity
class Sun extends Parent {
}

@Entity
class Daughter extends Parent {
}

All three classes seem work in JPA testing.

When it comes to JAX-WS, I need to annotate the Parent class with @XmlSeeAlso.

@XmlSeeAlso({Sun.class, Daughter.class})
abstract class Parent {
}

Now I can work with

abstract ParentService<P extends Parent> {
}

@WebService
class SunService extends ParentService<Sun> {
}