Skip to content

ShellRechargeSolutionsEU/e-clearing-client_ochp-1.2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCHP client Build Status

Client for www.e-clearing.net written in Scala

WARNING

This library only supports OCHP 1.2. Newer versions of OCHP will be supported in ochp-client.

Includes

  • Open Clearing House Protocol v1.2 generated client and bean classes with help of cxf

  • API trait to communicate with the clearing house:

    trait EclearingApi {
      def recvAllTokens(): List[ChargeToken]
      def sendAllTokens(tokens: List[ChargeToken]): Result[ChargeToken]
      def recvNewTokens(lastUpdate: DateTime): List[ChargeToken]
      def sendNewTokens(tokens: List[ChargeToken]): Result[ChargeToken]
    
      def sendAllChargePoints(chargePoints: List[ChargePoint]): Result[ChargePoint]
      def recvAllChargePoints():List[ChargePoint]
      def sendNewChargePoints(chargePoints: List[ChargePoint]): Result[ChargePoint]
      def recvNewChargePoints(lastUpdate: DateTime):List[ChargePoint]
    
      def sendCdrs(cdrs: List[CDR]): Result[CDR]
      def recvCdrs(): List[CDR]
      def confCdrs(approvedCdrs: List[CDR], declinedCdrs: List[CDR])
    }
    
  • Service trait that can be instantiated like here:

    val service = new OchpService {
      val conf = OchpConfig(
        wsUri = "http://localhost:8088/mockeCHS-OCHP_1.2",
        user = "me",
        password = "mypass"
      )
      val client = OchpClient.createCxfClient(conf)
    }

Setup

Maven

  1. Add this repository to your pom.xml:

    <repository>
        <id>thenewmotion</id>
        <name>The New Motion Repository</name>
        <url>http://nexus.thenewmotion.com/content/groups/public"</url>
    </repository>
  2. Add dependency to your pom.xml:

    <dependency>
        <groupId>com.thenewmotion</groupId>
        <artifactId>ochp-client-1.2_2.11</artifactId>
        <version>1.20</version>
    </dependency>

SBT

  1. Add the following resolver:

    resolvers += "TNM" at "http://nexus.thenewmotion.com/content/groups/public"
  2. Add the following dependency:

    "com.thenewmotion" %% "ochp-client-1.2" % "1.20",