10 , , - .
jaxws-maven-plugin jaxb-xew-plugin @XmlElementWrapper /
, wsdl :
<xs:element name="books" minOccurs="0" >
<xs:complexType>
<xs:sequence>
<xs:element name="book" type="Book" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
java :
@XmlElementWrapper(name = "books")
@XmlElement(name = "book")
protected List<Book> books;
/
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<configuration>
<wsdlDirectory>${project.basedir}/src/main/webapp/WEB-INF/wsdl/</wsdlDirectory>
<xjcArgs>
<xjcArg>-no-header</xjcArg>
<xjcArg>-Xxew</xjcArg>
<xjcArg>-Xxew:instantiate lazy</xjcArg>
<xjcArg>-Xxew:delete</xjcArg>
</xjcArgs>
</configuration>
<executions>
<execution>
<id>wsdl_import</id>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.github.jaxb-xew-plugin</groupId>
<artifactId>jaxb-xew-plugin</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.2.4-1</version>
</dependency>
</dependencies>
</plugin>