私たちはaxis2を使用してWebサービスクライアントを生成しています(これは今では後悔しています!)。axis2コマンドラインツールを使用すると、switch -Euwcを渡して、生成されたソースでintを整数に、ブール値をブール値などにラップできます。これは、特定のint値またはboolean値がスキーマでnillableであることをaxis2に通知する1つの方法です。
私の質問は、生成されたソースで同じ動作を実現するために、MavenでPOMまたは他の手段を介してこのパラメーターをどのように設定するかです。私のstackoverflowとgoogle検索はあまり明らかにされていません。Jiraの問題があります。これは、開発者が正しい方向を示さずに解決したようです。
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.futile.bizzareservice</groupId>
<artifactId>BizzareService</artifactId>
<version>2.0</version>
<name>BizzareService</name>
<properties>
<wsdl.location>unfortunate-wsdls</wsdl.location>
<axis2.version>1.5.4</axis2.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
<version>${axis2.version}</version>
<configuration>
<packageName>com.futile.bizzareservice.client</packageName>
<wsdlFile>${wsdl.location}/bizzareservice.wsdl</wsdlFile>
<language>java</language>
<databindingName>adb</databindingName>
<unpackClasses>true</unpackClasses>
</configuration>
<executions>
<execution>
<goals>
<goal>wsdl2code</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
<version>${axis2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb</artifactId>
<version>${axis2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb-codegen</artifactId>
<version>${axis2.version}</version>
</dependency>
</dependencies>
</project>
構成でunwrapをtrueに設定しても、まったく別のオプションであるため、役に立ちません。将来的にはaxis2を避けたいと思いますが、当面はそれで行き詰まります。