cancel
Showing results for 
Search instead for 
Did you mean: 

Expose java class as a service

former_member186020
Participant
0 Kudos

We want to develop the application on HCP using Java and not use XS. We understand that the database can be connected using JDBC connection and database artifacts can be read.


What we are not able to understand ( might be a silly question ) is do we have a mechanism to expose the Java classes as web services(Odata/Rest/SOAP), is there a prescribed framework to do the same.


In some of the applications which other teams are building , they are using Apache CXF and I don't know is it the standard and can be used or is there any standard framework for doing the same.


Please Advice.


Thanks,

Vishesh.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_bonk
Explorer
0 Kudos

Hello Vishesh,

we're using JPA for developping the data model. Our data model also needs to exposed as an OData service. Hence we decided to use the Apache Olingo framwork. It also provides components for automatically exposing JPA models as Odata services. There are several tuotials and other documentation available, e.g. https://olingo.apache.org/doc/odata2/tutorials/CreateWebApp.html

Best regards,

Thomas

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vishesh,

I have a solution for your question.

I have exposed java services as REST services in OData 4.0 format and you can cosume them directly in your application.

Please check out my documents:

OData 4.0 Services (CRUD) using Olingo(JSON supported): Part-1

OData 4.0 Services (CRUD) using Olingo(JSON supported): Part-2

OData 4.0 Services (CRUD) using Olingo(JSON supported): Part-3