Mathias Nilsson wrote:
But I thought that I could do this without the wsdl. I use jax-ws annotations.
I use the spring-xfire to make the magic happen. Is there anyway I can include classes with annotations?
XML schemas can still be used, without having to be included in a WSDL, to generate JAXB bean classes for the request and response.
I personally prefer to write an XML schema and generate the JAXB classes using XJC, but of course you can do it the other way too, but I have no experience with that approach.
Here is what I would do if I were in your situation (if I wanted to do bean-classes-first development):
- Write an XML schema that comes relatively close to the data model you have now.
- Use XJC to generate JAXB bean classes from the XML schema.
- See how the JAXB bean classes are annotated with JAXB annotations and try to apply this to my existing classes.
- Annotate the method(s) I want to use my custom request and/or response beans with RequestWrapper and/or ResponseWrapper annotations.
Best wishes!