Llocer / llocer_ocpi

openEV OCPI 2.2.1 implementation
GNU Lesser General Public License v2.1
9 stars 2 forks source link

Usage of OCPI library #1

Closed susanthomasv99 closed 2 years ago

susanthomasv99 commented 2 years ago

Hi, I'm trying to test the location modules example using this library. But I'm having trouble with understanding the main server code which I have to run. What do I have to do to test this library?

Llocer commented 2 years ago

Hi,

Thanks for your interest in these librarians.

You have full-functionality examples of OCPI nodes at librarian llocer_ev_examples. In particular, there are examples of location module as sender and location module as receiver.

The main page of this librarian contains a description of the examples.

Do not hesitate to ask any doubt.

Kind regards.

susanthomasv99 commented 2 years ago

Thank you for replying. Can I run these sender and receiver modules independently? It shows an error that main method is missing. Also, Any API implementation required to test this?

Llocer commented 2 years ago

Yes, sender and receiver are independent modules.

Can I ask which servlet container are you using? These examples have been tested using Tomcat.

You can post the text of the error you refer.

susanthomasv99 commented 2 years ago

Hi, I'm looking to implement OCPI node to node communication between two parties without using any hubs. I came across your library and that's what I'm looking for. But I'm completely new to Java and I'm finding it difficult to understand how to test this library. Can you please give me the steps I need to follow? I'm not using any servlet containers now. Anything else required to test this?

On Mon, Jul 11, 2022 at 1:15 PM Llocer @.***> wrote:

Yes, sender and receiver are independent modules.

Can I ask which servlet container are you using? These examples have been tested using Tomcat.

You can post the text of the error you refer.

— Reply to this email directly, view it on GitHub https://github.com/Llocer/llocer_ocpi/issues/1#issuecomment-1180073361, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZTUS6SQWDAIWE7CMVVVYG3VTPGK7ANCNFSM53GICXMA . You are receiving this because you authored the thread.Message ID: @.***>

Llocer commented 2 years ago

Hi,

OCPI protocol is based on HTTP, being OCPI nodes an specialization of HTTP servers. As you know, the usual way to implement in Java a HTTP server is implementing a servlet and run it in a servlet container as Tomcat.

The servlet implementation is totally included in this librarian (here). Thus, usual steps will be:

susanthomasv99 commented 2 years ago

Thank you for explaining the steps in detail. I will try it out

On Mon, Jul 11, 2022 at 1:43 PM Llocer @.***> wrote:

Hi,

OCPI protocol is based on HTTP, being OCPI nodes an specialization of HTTP servers. As you know, the usual way to implement in Java a HTTP server is implementing a servlet and run it in a servlet container as Tomcat.

The servlet implementation is totally included in this librarian (here https://github.com/Llocer/llocer_ocpi/tree/master/src/main/java/com/llocer/ev/ocpi/server). Thus, usual steps will be:

  • create in your preferred IDE the maven projects for the librarians and compile them.
  • create the war file that includes all the necessary jar files.
  • configure your servlet container to run previous war
  • configure your network to accept HTTP request to the address of the servlet container.

— Reply to this email directly, view it on GitHub https://github.com/Llocer/llocer_ocpi/issues/1#issuecomment-1180096879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZTUS6QBG35SEX3ENJT2TJLVTPJRDANCNFSM53GICXMA . You are receiving this because you authored the thread.Message ID: @.***>