Skip to Content
0
Aug 03, 2023 at 07:21 AM

OData v4 Code Generation in Visual Studio / Authentication issues?

266 Views Last edit Aug 03, 2023 at 07:24 AM 2 rev

Having issues using S4 2022 SFP2 Standard oData 4 Services in the latest VS 2022 Community Edition 17.6.5 with OData Connected Service 2022+ 1.0.2 I thought I would give the ES5 service a try.


The service for which I'm trying to create a service reference: https://sapes5.sapdevcenter.com/sap/opu/odata4/sap/ze2e001/default/sap/ze2e001_salesorder/0001/$metadata

I provide the authorization data via the header (base64 encoded).

image.png

This seems to work quite well.

image.png

Still I get the same error as with the on premise systems.

image.png

I don't experience such issues with SAP oData v2 services like API_PRODUCTION_ORDER_2_SRV. Code generation works fine.

I'm not a .NET developer but we have a S4 implementation project where the customer requieres to access oData v4 services from their .NET applications.

I then tried to download the metadata and manipulate it. It contains some references / URIs which needs to be adapted.

Like:

image.png

It turns out that these references are causing the issues. When removing them from the metadata, the code generation reports no errors.

Also when I save the payload of these references in a file and reference the local file, everything seems to work.

It should not be an authentication issue.

I put a user und SICF nodes /default_host/sap/opu/odata and /default_host/sap/opu/odata4. When putting the absolut URIs of the references in the browser, no authentication is requiered - the entity_ files are downloaded.

Still the authentication for the service metadata is requiered

Still the Unchase OData Connected Service extention would return an issue with authentication for the references.

I know that SAP cannot provide support for software products of other companies etc.

Andre Fischer Is there any chance to remove the need for authentication for an odata v4 Service in SICF? Which nodes would be effected? Just to test if thats would resove the issue.

Attachments

image.png (37.6 kB)
image.png (31.5 kB)
image.png (41.3 kB)
image.png (9.5 kB)