odata-api | OData v4 Protocol on .NET Core | Networking library
kandi X-RAY | odata-api Summary
kandi X-RAY | odata-api Summary
OData v4 Protocol on .NET Core
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of odata-api
odata-api Key Features
odata-api Examples and Code Snippets
Community Discussions
Trending Discussions on odata-api
QUESTION
When learning Odata, i've tried a test project with books and then tried making my own with a database connected. Both projects has edmx version 4 and is similar configured.
However, when calling my methods with parameters in the original project, it doesn't work, but it does in the Book example. etc. odata/v4/Resources(1) than the books(1). I can fetch data from Companies and resources controllers, but not from AccountController even it's similar setup method wised. It returns 404 not found. I can do the ?$select filtering on the resources controller, but not on the companiesController. Every other odata function works as it should. Changing to odataprefix and odataroute, every controller works, but then the method calling with parameters doesn't work.
I'm unaware of what i'm missing or what is giving me this issue and are now searching for help.
The guides i've been following and reading about is linked below. I'm aware that prefix routing is differently, but it should work like the book test to begin with:
Kind regards
Start.cs - My project - Github => original project
...ANSWER
Answered 2020-Aug-12 at 08:06- The 404 when calling odata/v4/Accounts is because while your entity set is named
Accounts
your controller is namedAccountCoutroller
. Make itAccountsController
and that will take care of the 404 - With regard to the query options ($filter, $select, etc) working on /odata/v4/Resources but not working on /odata/v4/Companies, note that
GetCompanies
action returnsCompanyResponse
(and notCompany
) objects.CompanyResponse
is not represented in the service metadata - it's not in the EDM. The response you're actually seeing is because your API is falling back on ASP.NET Web API serialization. OData will have a challenge constructing the $filter or $select expressions since it "knows" nothing aboutCompanyResponse
. ReturningCompany
objects would fix the issue.
QUESTION
I'm building a Spring Boot project making use of S/4HANA custom OData Service and Java VDM. I have been following various tutorials on SAP Blog, developer.sap.com or S4H13 course - the approach is pretty much the same. I managed to successfully generate VDM for my Custom OData Service based on the edmx file, created all necessary commands, methods in the controller and so on.
Unfortunately, I'm encountering an issue when launching the project locally.
I use the following command first: mvn clean package
and later, when I'm in the application directory want to run the project: mvn spring-boot:run
.
The project build fails with the following errors and exceptions:
2020-07-31 12:45:20.941 ERROR 70176 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Exception sending context initialized event to listener instance of class [com.sap.cloud.sdk.s4hana.connectivity.ErpDestination]
ANSWER
Answered 2020-Jul-31 at 13:16Please find the outdated dependency in your dependency tree:
QUESTION
I am getting the issue described up above when running integration tests.
The full error message follows:
...ANSWER
Answered 2020-Mar-25 at 13:55Looking at the dependency tree, I can see that there is a mix-up of SDK dependencies of version 2 and 3 in your project which is causing the issue.
The dependency entries with groupId starting with com.sap.cloud.s4hana
are mostly v2 dependencies and the ones with groupId starting with com.sap.cloud.sdk
are v3 dependencies.So, please use this as a reference to convert all v2 dependencies to the corresponding v3 dependencies.
Alternatively, you can also include the sdk-bom
dependency (groupId: com.sap.cloud.sdk
, artifactId: sdk-bom
) in your pom with a version
, so that you can start including other sdk dependencies without explicitly including the version
information.
This would also ensure that all the sdk dependencies you include would always fall into the a particular version:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install odata-api
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page