<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-runtime</artifactId>
- <version>0.6.3</version>
+ <version>0.9.4</version>
</dependency>
</dependencies>
<build>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-xjc-plugin</artifactId>
- <version>2.3.0</version>
+ <version>3.0.3</version>
</plugin>
<!-- Generate code from wsdl files (the client's code) -->
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
- <version>2.3.0</version>
+ <version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<packagename>${project.xsd.schemas.package.name}</packagename>
<extensionArgs>
<extraarg>-Xinheritance</extraarg>
+ <extraarg>-Xannotate</extraarg>
</extensionArgs>
</xsdOption>
</xsdOptions>
</configuration>
</execution>
</executions>
- <!-- We make this plugin work with this jaxb2 version.
- This particular version let us generate inherited classes using
- the -Xinheritance argument. -->
- <dependencies>
+ <dependencies>
+ <!-- We make this plugin work with this jaxb2 version.
+ This particular version let us generate inherited classes using
+ the -Xinheritance argument.
+
+ DO NOT FORGET: We can use <inheritance:implements> in xsd files or by means
+ of custom bindings (see custombinding.xjb) This useful when you may not modify
+ xsd files because they are generated by other person or machine.
+ -->
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
- <version>0.6.3</version>
+ <version>0.9.4</version>
+ </dependency>
+
+ <!-- We make this plugin work with this jaxb2 version.
+ This particular version let us generate annotated classes using
+ the -Xannotate argument.
+
+ DO NOT FORGET: We can use <annox:annotate> in xsd files or by means
+ of custom bindings like I did with <inheritance:implements> (see custombinding.xjb)
+ This useful when you may not modify xsd files because they are generated
+ by other person or machine.
+ -->
+ <dependency>
+ <groupId>org.jvnet.jaxb2_commons</groupId>
+ <artifactId>jaxb2-basics-annotate</artifactId>
+ <version>1.0.1</version>
</dependency>
</dependencies>
</plugin>
</configuration>
</execution>
</executions>
- <!-- We make this plugin work with this jaxb2 version.
- This particular version let us generate inherited classes using
- the -xjc-Xinheritance argument. -->
<dependencies>
+ <!-- We make this plugin work with this jaxb2 version.
+ This particular version let us generate inherited classes using
+ the -Xinheritance argument.
+
+ DO NOT FORGET: We can use <inheritance:implements> in xsd files or by means
+ of custom bindings (see custombinding.xjb) This useful when you may not modify
+ xsd files because they are generated by other person or machine.
+ -->
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
- <version>0.6.3</version>
+ <version>0.9.4</version>
</dependency>
</dependencies>
</plugin>
<jaxb:bindings xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
+ xmlns:annox="http://annox.dev.java.net"
jaxb:version="2.1"
- jaxb:extensionBindingPrefixes="inheritance">
+ jaxb:extensionBindingPrefixes="inheritance annox">
<!--
Se procesa con Xpath si quieres meter expresiones regulares y cosas así en teoría dependes de Xpath
<jaxb:bindings schemaLocation="examples.xsd">
<jaxb:bindings node="//xsd:element[@name='CustomBindingExampleRequest']/xsd:complexType">
<inheritance:implements>de.spring.webservices.operations.Request</inheritance:implements>
+ <annox:annotate>@java.lang.SuppressWarnings({"unchecked","rawtypes"})</annox:annotate>
</jaxb:bindings>
</jaxb:bindings>
<jaxb:bindings schemaLocation="examples.xsd">
<jaxb:bindings node="//xsd:element[@name='CustomBindingExampleResponse']/xsd:complexType">
<inheritance:implements>de.spring.webservices.operations.Response</inheritance:implements>
+ <annox:annotate>@java.lang.SuppressWarnings({"unchecked","rawtypes"})</annox:annotate>
</jaxb:bindings>
</jaxb:bindings>
+ <!-- The same applies to annotate. If you do not want or you may not modify your xsd files you cand
+ modify instead this file with your custom binding :) -->
+
</jaxb:bindings>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
+ xmlns:annox="http://annox.dev.java.net"
jaxb:version="2.1"
- jaxb:extensionBindingPrefixes="inheritance"
+ jaxb:extensionBindingPrefixes="inheritance annox"
elementFormDefault="qualified"
targetNamespace="http://localhost:8888/spring-ws/example">
<xs:complexType>
<xs:annotation>
<xs:appinfo>
+ <annox:annotate>@java.lang.SuppressWarnings({"unchecked","rawtypes"})</annox:annotate>
<inheritance:implements>de.spring.webservices.operations.Request</inheritance:implements>
</xs:appinfo>
</xs:annotation>