on 2021 Sep 01 8:01 AM
Hello,
My project has included below destination and i need to work on it but the internal metadata parser class fails to convert the xml to csdl document.
static func parse() -> CSDLDocument {
let parser = CSDLParser()
parser.logWarnings = false
parser.csdlOptions = CdsApiHandlingUnitEntitiesMetadataParser.options
parser.csdlFetcher = CdsApiHandlingUnitEntitiesMetadataParser.fetcher
let metadata = parser.parseInProxy(CdsApiHandlingUnitEntitiesMetadataText.xml, url: "cds_api_handling_unit") // crashing
metadata.proxyVersion = "21.7.2"
return metadata
Below is the error.
-----------------------------------------
Fatal error: 'try!' expression unexpectedly raised an error: UnexpectedException; Caused by: AssertException: Unrecoverable CSDL parsing failure!
It would be expected for the xml string to start with a "<" character, rather than " \n".
Perhaps if we could see the original metadata document it would help.
Were the proxies generated by the Assistant or by the sapcpsdk-proxygenerator?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Proxy classes were generated by Assistant.Out of 10 other destinations only this one is creating issue and making the app crashes.
I dont know why the string was changed after pasting here.
Actual Metadata string is starting correctly
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<?xmlc base=\"36\"?>\n<?xmlc-define _0=\"Name\" _1=\"Type\" _2=\"Property\" _3=\"sap:label\" _4=\"MaxLength\" _5=\"sap:quickinfo\" _6=\"sap:display-format\" _7=\"edmx:Reference\" _8=\"Precision\" _9=\"Scale\" _A=\"Namespace\" _B=\"edmx:Include\" _C=\"sap:unit\" _D=\"xmlns:edmx\" _E=\"Alias\" _F=\"Role\" _G=\"Uri\" _<_2 _0=\"StorageType\" _1=\"$0\" _4=\"$8\" _6=\"$2\" _3=\"Storage Type\"/><_2 _0=\"StorageSection\" _1=\"$0\" _4=\"$8\" _6=\"$2\" _3=\"Storage Section\"/><_2 _0=\"StorageBin\" _1=\"$0\" _4=\"$M\" _6=\"$2\" _3=\"Storage Bin\"/><_13 _0=\"to_HandlingUnitItem\" ................
User | Count |
---|---|
72 | |
9 | |
9 | |
8 | |
8 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.