首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用cloud-sdk maven profile生成VDM时遇到错误

使用cloud-sdk maven profile生成VDM时遇到错误
EN

Stack Overflow用户
提问于 2021-06-03 13:35:43
回答 1查看 82关注 0票数 0

我正在尝试使用以下元数据生成VDMs

代码语言:javascript
运行
复制
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="1.0"
    xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"
    xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
    xmlns:sap="http://www.sap.com/Protocols/SAPData">
    <edmx:DataServices m:DataServiceVersion="2.0">
        <Schema Namespace="myService" xml:lang="en" sap:schema-version="1" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
            <Annotation Term="Core.SchemaVersion" String="1.0.0" xmlns="http://docs.oasis-open.org/odata/ns/edm"/>
            <EntityType Name="myPlant" sap:content-version="1">
                <Key>
                    <PropertyRef Name="Plant"/>
                    <PropertyRef Name="PlantName"/>
                </Key>
                <Property Name="Plant" Type="Edm.String" Nullable="false" MaxLength="4" sap:unicode="false" sap:label="Plant" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
                <Property Name="PlantName" Type="Edm.String" Nullable="false" MaxLength="30" sap:unicode="false" sap:label="PurchasinPlant" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
                <Property Name="ValuationArea" Type="Edm.String" Nullable="false" MaxLength="4" sap:unicode="false" sap:label="Valuation Area" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
                <Property Name="PlantCustomer" Type="Edm.String" Nullable="false" MaxLength="10" sap:unicode="false" sap:label="CustomerNoPlant" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
                <Property Name="PlantSupplier" Type="Edm.String" Nullable="false" MaxLength="10" sap:unicode="false" sap:label="Sppl. No. Plnt" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
                <Property Name="DefaultPurchasingOrganization" Type="Edm.String" Nullable="false" MaxLength="4" sap:unicode="false" sap:label="Purchasing Org." sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
                <Property Name="FactoryCalendar" Type="Edm.String" Nullable="false" MaxLength="2" sap:unicode="false" sap:label="Factory Calend." sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
                <Property Name="SalesOrganization" Type="Edm.String" Nullable="false" MaxLength="4" sap:unicode="false" sap:label="Sales Org. ICB" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
                <Property Name="AddressId" Type="Edm.String" Nullable="false" MaxLength="10" sap:unicode="false" sap:label="Address" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
                <Property Name="PlantCategory" Type="Edm.String" Nullable="false" MaxLength="1" sap:unicode="false" sap:label="Plant cat." sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
                <Property Name="Distributionchannel" Type="Edm.String" Nullable="false" MaxLength="2" sap:unicode="false" sap:label="Distrib.channel" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
            </EntityType>
            
            
            <EntityContainer Name="myService_Entities" m:IsDefaultEntityContainer="true" sap:supported-formats="atom json xlsx">
                <EntitySet Name="myPlantSet" EntityType="myService.myPlant" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:pageable="false" sap:content-version="1"/>
            </EntityContainer>
            <atom:link rel="self" href="https://sap/myService/$metadata" xmlns:atom="http://www.w3.org/2005/Atom"/>
            <atom:link rel="latest-version" href="https://sap/myService/$metadata" xmlns:atom="http://www.w3.org/2005/Atom"/>
        </Schema>
    </edmx:DataServices>
</edmx:Edmx>

在运行maven配置文件时,我得到以下错误-

错误: URI=file:/C:../src/main/resources/connectedsystem/metadata/myService.xml Line=5:文档根元素"edmx:Edmx“必须与DOCTYPE根元素"null”匹配。错误: URI=file:/C:../src/main/resources/connectedsystem/metadata/myService.xml Line=5:文档无效:找不到语法。警告:验证已打开,但未设置org.xml.sax.ErrorHandler,这可能不是所需的。解析器将使用默认的ErrorHandler来打印前0个错误。请调用setErrorHandler方法来修复此问题。错误: URI=file:/C:../src/main/resources/connectedsystem/metadata/myService.xml Line=5:文档根元素"edmx:Edmx“必须与DOCTYPE根元素"null”匹配。错误: URI=file:/C:../src/main/resources/connectedsystem/metadata/myService.xml Line=5:文档无效:找不到语法。

使用的cloud-sdk版本为3.42.0

EN

回答 1

Stack Overflow用户

发布于 2021-06-03 16:22:19

出现这些错误消息通常是因为根据XML标准,XML文档是无效的。但是,在大多数情况下,这不会影响代码生成。所以请告诉我们代码生成是否也会失败。

我可以使用提供的元数据成功地生成代码,因此我相信不会有问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67815897

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档