cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Edmx file fails as it does not have DOCTYPE

alexey_voronov
Discoverer
0 Kudos
286

Hello,

We generated ODATA v2 client for few services using this guide:
https://sap.github.io/cloud-sdk/docs/java/features/odata/vdm-generator

We use MAven depencencies and Maven plugin to generate neede classes. Nevertheless, when I build our project I've got warning and errors like:
Warning: validation was turned on but an org.xml.sax.ErrorHandler was not set, which is probably not what is desired. Parser will use a default ErrorHandler to print the first 0 errors. Please call the setErrorHandler method to fix this.
Error: URI=file:/C:/Repository/planner/integrator/S4Hana/edmx/API_CLFN_PRODUCT_SRV.xml Line=2: Document root element "edmx:Edmx", must match DOCTYPE root "null".
Error: URI=file:/C:/Repository/planner/integrator/S4Hana/edmx/API_CLFN_PRODUCT_SRV.xml Line=2: Document is invalid: no grammar found.

Same errors happened for all our edmx files. 

How could we avoid it? We would prefer to disable that default validator or use that one which understand edmx, but we did not found such option in Maven plugin.

Code part from our MAven plugin is:

<plugin>
<groupId>com.sap.cloud.sdk.datamodel</groupId>
<artifactId>odata-generator-maven-plugin</artifactId>
<version>${sap.cloud.version}</version>
<executions>
<execution>
<id>generate-consumption</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputDirectory>${project.basedir}/edmx</inputDirectory>
<outputDirectory>${sap.vdm.generated.folder}</outputDirectory>
<deleteOutputDirectory>false</deleteOutputDirectory>
<overwriteFiles>true</overwriteFiles>
<packageName>com.delfoi.planner.integrator.customer.s4hana.s4hana.vdm</packageName>
<compileScope>COMPILE</compileScope>
<serviceMethodsPerEntitySet>true</serviceMethodsPerEntitySet>
</configuration>
</execution>
</executions>
</plugin>

Where

<sap.cloud.version>5.14.0</sap.cloud.version>

PS: Also I found that in this tag only last link is actually accessible. First two links are "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."


<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">

Accepted Solutions (0)

Answers (0)