无法实例化 BiPRO SOAP 客户端
Trouble instantiate BiPRO SOAP Client
我在创建 SOAP 客户端时遇到了一些麻烦。
我必须使用 BiPRO WebService(德国保险机构之间的规范通信模式)。
该 WebService 具有复杂的数据结构,我认为代码生成器对该结构存在一些问题。
我收到以下错误消息:
SAXParseException; [...] A class/interface with the same name "barmenia.LebenWs.CTElementarprodukt" is already in use. Use a class customization to resolve this conflict.
及以下
[...] (Relevant to above error) another "CTElementarprodukt" is generated from here
经过一番研究,我发现使用
autoNameResolution
会有帮助。但是,如果我这样做,类 不会正确生成(某些属性丢失 - 上面的消息声称)。
我正在使用以下 Maven 插件生成客户端:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>de.tj.msc.bipro.consumer.taa.tarifierung.services.clients.leben.barmenia.LebenWs</generatePackage>
<schemas>
<schema>
<url>
https://ws0.barmenia24.de/ibis/services/lebenservice_2.1.5.1.2?wsdl</url>
</schema>
</schemas>
</configuration>
</plugin>
我阅读了一些有关使用 xjb 文件的内容。
但是我没有这样的文件。
如果有人能帮助我,那就太好了。
非常感谢!
祝福
如评论所述,我建议使用不同的 JAX-WS/JAX-B 生成库来检查您是否遇到相同的错误 - 例如 jaxws-maven-plugin, which is working perfectly fine in my projects (see the cxf-spring-boot-starter)。
我在创建 SOAP 客户端时遇到了一些麻烦。 我必须使用 BiPRO WebService(德国保险机构之间的规范通信模式)。 该 WebService 具有复杂的数据结构,我认为代码生成器对该结构存在一些问题。
我收到以下错误消息:
SAXParseException; [...] A class/interface with the same name "barmenia.LebenWs.CTElementarprodukt" is already in use. Use a class customization to resolve this conflict.
及以下
[...] (Relevant to above error) another "CTElementarprodukt" is generated from here
经过一番研究,我发现使用
autoNameResolution
会有帮助。但是,如果我这样做,类 不会正确生成(某些属性丢失 - 上面的消息声称)。
我正在使用以下 Maven 插件生成客户端:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>de.tj.msc.bipro.consumer.taa.tarifierung.services.clients.leben.barmenia.LebenWs</generatePackage>
<schemas>
<schema>
<url>
https://ws0.barmenia24.de/ibis/services/lebenservice_2.1.5.1.2?wsdl</url>
</schema>
</schemas>
</configuration>
</plugin>
我阅读了一些有关使用 xjb 文件的内容。 但是我没有这样的文件。
如果有人能帮助我,那就太好了。 非常感谢!
祝福
如评论所述,我建议使用不同的 JAX-WS/JAX-B 生成库来检查您是否遇到相同的错误 - 例如 jaxws-maven-plugin, which is working perfectly fine in my projects (see the cxf-spring-boot-starter)。