[英]FpML Custom binding jaxb
我需要在我的項目中使用FpML並努力用JAXB生成Java類:
[ERROR] Element "{http://www.fpml.org/FpML-5/confirmation}tradeId" shows up in more than one properties.
line 1142 of file:/D:/FpML/schema/fpml/5-5/confirmation/fpml-doc-5-5.xsd
fpml-doc-5.5.xsd導入到主模式中。
我嘗試使用內聯自定義綁定(我放棄使用外部文件),如下所示:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns="http://www.fpml.org/FpML-5/confirmation" xmlns:fpml-annotation="http://www.fpml.org/annotation" targetNamespace="http://www.fpml.org/FpML-5/confirmation" ecore:documentRoot="FpML" ecore:nsPrefix="conf" ecore:package="org.fpml.confirmation" version="$Revision: 10163 $" elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
jaxb:version="1.0">
....
<xsd:element name="issuer" type="IssuerId"></xsd:element>
<xsd:element name="tradeId" type="TradeId">
<xsd:annotation>
<xsd:appinfo>
<jaxb:property name="tradeIdentifierId"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
仍然發生相同的錯誤。
直接編輯架構以重命名tradeId將解決此問題,但我不能這樣做。 我仍然可以定義自己的內聯綁定。
你能說明點什么嗎?
使用JAXB版本2。我使用的jaxb-xjc 2.1.13沒有FPML 5.5確認的問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.