Back Forum Reply New

generating class from a wsdl.

Hi, I am a newbie to Spring and went through a few Spring WS tutorials where the XSD is involved.  For my project, I only have an existing WSDL.  i am using jaxb 1.0.6 , ant, and spring WS. The part I don't understand is how can i generate the java classes from the WSDL.  Can someone shed some light?

thanks.

Use wsimport, which should be included in your jdk (bin directory).

Or download it separately:
javase/6/.../wsimport.html

You might also notice after generating the Java classes and using these classes in your Spring WS project, you might get the warning no @XmlRootElement annotation can be found.

This means you have to manually put an @XmlRootElement annotation at the topmost element of the class that needs to be marshalled.
¥
Back Forum Reply New