Skip to Content
0

OData V2 backends

Sep 04, 2017 at 10:18 AM

136

avatar image
Former Member

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)." 
iOS
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Andreas Schlosser
Sep 04, 2017 at 02:09 PM
0

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

Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

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

1

Hi Andreas,

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

Regards

Manikandan

0

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

0

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

0

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

0