Skip to Content

Expose java class as a service

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Nov 21, 2015 at 06:43 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 16, 2015 at 09:19 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.