Skip to content

Latest commit

 

History

History
79 lines (59 loc) · 2.35 KB

README.md

File metadata and controls

79 lines (59 loc) · 2.35 KB

RESTful Web Services iDempiere Plugin

Description

This is an example of how to create new endpoints for iDempiere and how to integrate RESTful definition.

Apache CXF

Features

  • Partner CRUD
  • Restful resources definitions (enpoint, message, http status code)
  • Json contract
  • Exceptions handlers
  • Transactions
  • Version endpoint

Instructions

Adding a new endpoint

It's necessary to add a new bean in WEB-INF/beans.xml file:

<jaxrs:serviceBeans>
			<bean class="com.ingeint.ws.controller.PartnerController" />
			<bean class="com.ingeint.ws.controller.VersionController" />
</jaxrs:serviceBeans>

Adding a new library

Add the new dependency (artifacItem) to the pom.xml file in the artifactItems attribute, example:

    <artifactItems>
        <artifactItem>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>28.0-jre</version>
        </artifactItem>
    </artifactItems>

Then, add a new classpath entry in the .classpath file, example:

    <classpathentry kind="lib" path="lib/guava.jar"/>

Verify you are including the folder lib in the build.properties file, exaple:

bin.includes = .,\
               META-INF/,\
               OSGI-INF/,\
               lib/

Finally, add the new dependency in MANIFEST.MF file as a Bundle-ClassPath attribute, example:

Bundle-ClassPath: .,
 lib/guava.jar

Target Platform

A target platform allows you to download dependencies and build the jar plugin, there are some examples: