shellrechargesolutionseu / ocpi-endpoints Goto Github PK
View Code? Open in Web Editor NEWNewMotion implementation of common endpoints of the OCPI protocol, using Scala
License: Other
NewMotion implementation of common endpoints of the OCPI protocol, using Scala
License: Other
Hi,
I wanted to use your implementation as a basis to test my own implementation of the OCPI standard. I don't know Scala, but was confident I could at least run it. I setup a fresh Ubuntu 19.04 install in a VM, installed JDK 8, Scala and sbt, and followed your instructions to the letter. However, after doing the "sbt -> project example -> run" and curl-ing the versions endpoint, I got the response saying "The requested resource could not be found.". Here's the full sbt output:
ocpi@ocpi-VirtualBox:~/Desktop/ocpi-endpoints$ sbt
[info] Loading settings for project ocpi-endpoints-build from plugins.sbt ...
[info] Loading project definition from /home/ocpi/Desktop/ocpi-endpoints/project
[info] Updating ProjectRef(uri("file:/home/ocpi/Desktop/ocpi-endpoints/project/"), "ocpi-endpoints-build")...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] Loading settings for project ocpi-endpoints-root from build.sbt,version.sbt ...
[info] Set current project to ocpi-endpoints-root (in build file:/home/ocpi/Desktop/ocpi-endpoints/)
[info] sbt server started at local:///home/ocpi/.sbt/1.0/server/37c8196f780dba36a70a/sock
ocpi-endpoints-root [master]> project example
[info] Set current project to example (in build file:/home/ocpi/Desktop/ocpi-endpoints/)
example [master]> run
[warn] Credentials file /home/ocpi/.ivy2/.credentials does not exist
[info] Updating prelude...
[warn] Credentials file /home/ocpi/.ivy2/.credentials does not exist
[info] Done updating.
[info] Updating msgs...
[warn] Credentials file /home/ocpi/.ivy2/.credentials does not exist
[info] Done updating.
[warn] Credentials file /home/ocpi/.ivy2/.credentials does not exist
[warn] Credentials file /home/ocpi/.ivy2/.credentials does not exist
[info] Updating msgs-json-test...
[warn] Credentials file /home/ocpi/.ivy2/.credentials does not exist
[warn] Credentials file /home/ocpi/.ivy2/.credentials does not exist
[info] Done updating.
[warn] Credentials file /home/ocpi/.ivy2/.credentials does not exist
[info] Updating msgs-spray-json...
[info] Done updating.
[info] Updating endpoints-common...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] Updating endpoints-versions...
[info] Updating endpoints-registration...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] Updating ...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] Compiling 2 Scala sources to /home/ocpi/Desktop/ocpi-endpoints/prelude/target/scala-2.12/classes ...
[info] Done compiling.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/home/ocpi/.sbt/boot/scala-2.12.7/org.scala-sbt/sbt/1.2.8/protobuf-java-3.3.1.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[info] Compiling 16 Scala sources to /home/ocpi/Desktop/ocpi-endpoints/msgs/target/scala-2.12/classes ...
[info] Packaging /home/ocpi/Desktop/ocpi-endpoints/prelude/target/scala-2.12/ocpi-prelude_2.12-1.0.3-SNAPSHOT.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Compiling 11 Scala sources to /home/ocpi/Desktop/ocpi-endpoints/msgs-spray-json/target/scala-2.12/classes ...
[info] Compiling 15 Scala sources to /home/ocpi/Desktop/ocpi-endpoints/endpoints-common/target/scala-2.12/classes ...
[warn] /home/ocpi/Desktop/ocpi-endpoints/endpoints-common/src/main/scala/com/thenewmotion/ocpi/common/OcpiResponseUnmarshalling.scala:8:27: Unused import
[warn] import cats.syntax.either._ // For Scala 2.11
[warn] ^
[warn] /home/ocpi/Desktop/ocpi-endpoints/endpoints-common/src/main/scala/com/thenewmotion/ocpi/package.scala:7:27: Unused import
[warn] import cats.syntax.either._ // Keep Scala 2.11 happy
[warn] ^
[warn] two warnings found
[info] Done compiling.
[info] Packaging /home/ocpi/Desktop/ocpi-endpoints/msgs/target/scala-2.12/ocpi-msgs_2.12-1.0.3-SNAPSHOT.jar ...
[info] Done packaging.
[info] Packaging /home/ocpi/Desktop/ocpi-endpoints/endpoints-common/target/scala-2.12/ocpi-endpoints-common_2.12-1.0.3-SNAPSHOT.jar ...
[info] Done packaging.
[info] Compiling 6 Scala sources to /home/ocpi/Desktop/ocpi-endpoints/endpoints-registration/target/scala-2.12/classes ...
[info] Done compiling.
[info] Compiling 2 Scala sources to /home/ocpi/Desktop/ocpi-endpoints/endpoints-versions/target/scala-2.12/classes ...
[info] Done compiling.
[info] Packaging /home/ocpi/Desktop/ocpi-endpoints/endpoints-registration/target/scala-2.12/ocpi-endpoints-registration_2.12-1.0.3-SNAPSHOT.jar ...
[info] Done packaging.
[info] Packaging /home/ocpi/Desktop/ocpi-endpoints/endpoints-versions/target/scala-2.12/ocpi-endpoints-versions_2.12-1.0.3-SNAPSHOT.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging /home/ocpi/Desktop/ocpi-endpoints/msgs-spray-json/target/scala-2.12/ocpi-msgs-spray-json_2.12-1.0.3-SNAPSHOT.jar ...
[info] Compiling 1 Scala source to /home/ocpi/Desktop/ocpi-endpoints/example/target/classes ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging /home/ocpi/Desktop/ocpi-endpoints/example/target/example-1.0.3-SNAPSHOT.jar ...
[info] Done packaging.
[info] Running (fork) com.thenewmotion.ocpi.example.ExampleApp
And here's the curl output:
ocpi@ocpi-VirtualBox:~$ curl -X GET -H "Authorization: Token abc" "http://localhost:8080/example/versions"
The requested resource could not be found.
Any idea what I'm doing wrong?
See part that is not implemented here
OCPI Specification refered.
Link Link to the βnextβ page should be provided, when this is NOT the last page. The Link
should also contain any filters present in the original request. See example below
ink: https://www.server.com/ocpi/cpo/2.0/cdrs/?offset=200&limit=50; rel="next"
I don't know where to ask question.
My questions:
When full release going to happen for this product?
Which class will be used to plug in the database -- Where billing related information can be stored?
Also want to contribute in this project. How can I do that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.