cancel
Showing results for 
Search instead for 
Did you mean: 

OData V2 backends

0 Kudos

I used the assistant to create template for the application using my own backend that is generated by Olingo V2 (using JPA processing extension)

Is it possible to create iOS application with SDK using OData V2 metadata as template for generation of framework for OData?

I got this error:

It seems that the given metadata is invalid.Error Domain=SAPOData Code=0 "CSDLError: Invalid identifier character '.' in EntityContainer Name="com.sap.minutes.backend.modelContainer". See the definition of TSimpleIdentifier in the OData EDM XML Schema (http://docs.oasis-open.org/odata/odata/v4.0/os/schemas/edm.xsd)." 

Accepted Solutions (1)

Accepted Solutions (1)

aschlosser
Employee
Employee
0 Kudos

Vladimir,

The error is quite descriptive of the problem - '.' is not a valid character for names of entity containers; please change his in your metadata and everything should be fine.

Thanks

Andreas

0 Kudos

Indeed, it is. Still, it bothers me, that SDK assistant validates metadata against V4 schema...

aschlosser
Employee
Employee

Vladimir,

This is just the error description and the reference to further reading - '.' wasn't allowed in v2 either. The proxy class generation does validate against the proper OData version that is defined in the backend. If you have a v2 service, we'll validate against v2 schema.

Thanks
Andreas

mrajasekarana
Explorer
0 Kudos

Hi Andreas,

Can you please elaborate your solution , that is how to change the metadata file format ?

Regards

Manikandan

aschlosser
Employee
Employee
0 Kudos

Manikandan,

There are two options here; either you manage to convince the backend team to fix the service and comply with the OData specs, or you simply download the metadata, make a manual search&replace on your laptop, and use this modified file to generate the proxy classes for you, using the console tool

If you want to trick the Assistant into asking you for the metadata file from your local hard disk, you can also first specify an invalid backend URL, the Assistant will fail to download, ask you for the file. You can then fix up the URL after the Xcode project is generated. (We are working on improvements here to make this easier in cases of non-compliant backend services)

Thanks
Andreas

mrajasekarana
Explorer
0 Kudos

Hi Andreas,

Thanks for your quick input. To elaborate more on this . This issue is appearing only with IOS app, it works fine for SAP UI5 app. So I believe this metadata fix would not be required from Gateway perspective instead IOS team can work on how to handle this. If you have any inputs on this its highly appreciated .

Thanks

Manikandan

aschlosser
Employee
Employee
0 Kudos

Manikandan,

You're right - the UI5 libraries are a lot less strict in validating the OData backend. Technically, the backend is still producing invalid metadata and this should be adjusted. However, we've seen this problem often enough now, so we're also planning on some changes to SAPOData to react more 'flexibly' in these cases, and be more tolerant where possible.

Thanks
Andreas

Answers (0)