我有一个像mongodb的文件
{
"_id" : ObjectId("54e66b2da7b5f3a92e09dc6c"),
"SomeMetric" : [
{
//some object
}
{
//some object
}
],
"FilterMetric" : [
{
"min" : "0.00",
"max" : "16.83",
"avg" : "0.00",
"class" : "s1"
},
{
"min" : "0.00",
"max" : "16.83",
"avg" : "0.00",
"class" : "s2"
},
{
"min" : "0.00",
"max" : "16.83",
"avg" : "0.00",
"class" : "s1"
},
{
"min" : "0.00",
"max" : "16.83",
"avg" : "0.00",
"class" : "s2"
}
]
}
Run Code Online (Sandbox Code Playgroud)
通常它包含许多这样的嵌套数组.我想单独设计一个指标,只有具有我搜索条件的数组.我有查询
db.sample.find( …Run Code Online (Sandbox Code Playgroud) 我无法让 AutoNameResolution 在 maven-jaxb2-plugin 中工作。下面是我的pom文件
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.2</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<args>
<arg>-XautoNameResolution</arg>
</args>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>com.commp.soap.service</generatePackage>
<schemas>
<schema>
<url>https://urltowsdl</url>
</schema>
</schemas>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我无法弄清楚我哪里出错了。我在错误中得到的只是"A class/interface with the same name is already in use. Use a class customization to resolve this conflict."
因为我正在使用第三方 wsdl,我不会使用其中的大多数功能,我只想要一个简单的自动解析,而不是为我不使用的东西编写绑定。
我也尝试过 apache cxf。
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>stock-quote-service</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.basedir}/src/main/generated_java</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${project.basedir}/src/main/resources/wsdl/consume.wsdl</wsdl>
<wsdlLocation>http://usrltoWsdl</wsdlLocation>
<serviceName>Consumer</serviceName>
<extraargs>
<extraarg>-verbose</extraarg>
<extraarg>-p</extraarg>
<extraarg>com.projects.webservicex.service</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution> …Run Code Online (Sandbox Code Playgroud)