I work with jax-ws and the wsdl is generated for my method.
So it generate only the base type in the wsdl and jaxb classes
1. is there a way to tell him to generate also the inherited types?
2. does it work if i add the types manually to the wsdl?
Joined: Oct 04, 2006
So I finally had a chance to check this by writing some code...
Here is what I did:
1. Created a base class for responses called ResponseBase.
2. Created a class for responses called ResponseOne that is a subclass of ResponseBase.
3. Created an endpoint implementation class with the following method:
4. Using the wsgen command in JDK 6, I generated additional artifacts.
This is a section of the generated XML schema describing the response types:
Note that the complex type responseOne is wrapped in the generated complex type findResponseOneResponse. This is because the SOAP binding parameter style is set to wrapped. If it were set to bare, then the findResponseOneResponse element would be declared like this:
The generated class FindResponseOneResponse looks like this:
Note that this class only contains one ResponseOne object.
Note that the ResponseOne class is the class I implemented myself and JAXB thus does not need to generate it.
Given the above, I do not quite see where your problem is. Perhaps our environment or tools are different in some way.
To answer your second question: Yes, after having generated a WSDL, you can manipulate it by hand and use it.
To preserve the hand-manipulated WSDL when deploying, you configure the @WebService annotation that annotates the endpoint implementation class in the following manner: