I am building a Java application using JPA2 and Hibernate 4.0 I have a XML file describing the complex data types that the APIs take as input or give as output. Sample below. I want to use this XML to generate java classes (or a jar) that I can use in my APIs as parameters and return types. Also I want to put in this jar in the SpringMVC powered front end so that I may use these types to attach data to call my APIs with. I can change the format of the XML if needed. What tool(s) can I use for this. I don't write this XML to be mentioned in my APIs or any other code, the tool should let me create stubs and then forget about the XML.
<documentation target="loginValidation" >
Returns the result of login validation.
Will return LoginValidationResults object if login correct, else a null object.
</documentation>
<operation name="loginValidation">
<input target="LoginValidationArgs" />
<output target="LoginValidationResults" />
</operation>
<structure name="LoginValidationArgs">
<member name="userName" target="String" />
<member name="hashedPassword" target="String" />
<member name="schoolID" target="PositiveInteger" />
</structure>
<required target="LoginValidationArgs$schoolID" />
<required target="LoginValidationArgs$userName" />
<required target="LoginValidationArgs$hashedPassword" />
<structure name="LoginValidationResults">
<member name="userID" target="PositiveInteger" />
<member name="userType" target="String" />
<member name="userDisplayName" target="String" />
<member name="schoolID" target="Long" />
</structure>
<required target="LoginValidationResults$schoolID" />
<required target="LoginValidationResults$userID" />
<required target="LoginValidationResults$userType" />
<required target="LoginValidationResults$userName" />