我使用 SAP Cloud SDK 2.19.1 和 odata-generator-maven-plugin:2.19.1。当我尝试通过 oData 服务的元数据文件生成 VDM时,/sap/opu/odata/sap/API_PRODUCT_SRV
在执行命令期间出现错误mvn clean install
:
Error: URI=file:/D:/opensap/firstapp/application/edmx/ApiProductSrv.edmx Line=1: Document root element "edmx:Edmx", must match DOCTYPE root "null".
Error: URI=file:/D:/opensap/firstapp/application/edmx/ApiProductSrv.edmx Line=1: Document is invalid: no grammar found.
…
[ERROR] Failed to execute goal com.sap.cloud.s4hana.datamodel:odata-generator-maven-plugin:2.19.1:generate (generate-consumption) on project firstapp-application: Execution generate-consumption of goal com.sap.cloud.s4hana.datamodel:odata-generator-maven-plugin:2.1
9.1:generate failed: trying to create the same field twice: Продукт -> [Help 1]
我使用在 address 获得的元数据文件/sap/opu/odata/sap/API_PRODUCT_SRV/$metadata
,但它包含俄语文本。例如,在 sap 注释中:
<Property Name="Product" Type="Edm.String" Nullable="false" MaxLength="40" sap:display-format="UpperCase" sap:label="Продукт" sap:quickinfo="Номер продукта"/>
当我在检索元数据文件 ( $metadata?sap-language=EN
) 时指定区域设置时,可以生成 VDM。但是是否可以通过元数据文件生成正确的 VDM 而无需特殊指令 sap 语言?
谢谢!