This Java project provides a simple interface to interact with NZTA MotoCheck services, allowing you to authenticate a client and fetch vehicle details using Java.
- Java 1.8 installed in system , with environment path set
- External JAR files: saaj-api-1.3.5.jar and saaj-impl-1.3.8.jar (already included in the project)
- Clone the repository: https://github.com/Alamance-IT-Solution/sample-code.git
- Navigate to the project directory: cd java
- Before compiling, remove the existing .class files: rm *.class
- Compile the Java file: javac -cp .:saaj-api-1.3.5.jar:saaj-impl-1.3.8.jar -source 1.8 -target 1.8 SOAPClientNZTA.java
- Execute the compiled Java file: java -cp .:saaj-api-1.3.5.jar:saaj-impl-1.3.8.jar SOAPClientNZTA
##############################################################################################################################################################
This Python project provides a simple interface to interact with MotoCheck services, allowing you to authenticate a client and fetch vehicle details using the provided plate number.
Python 3.x Dependencies listed in requirements.txt
-
Clone the repository: https://github.com/Alamance-IT-Solution/sample-code.git
-
Navigate to the project directory: cd python
-
Install dependencies: pip install -r requirements.txt
-
Create a .env file in the project root and add the following environment variables: CDI_USERNAME=your_username CDI_PASSWORD=your_password CDI_GROUP_NAME=your_group_name CDI_LOCATION_ID=your_location_id CDI_ENDPOINT_ID=your_endpoint_id CDI_ACCOUNT_ID=your_account_id CDI_IP_ADDRESS=your_ip_address
Replace your_username, your_password, etc., with your actual NZTA MotoCheck account details.
-
Open a terminal and navigate to the project directory.
-
Run the authentication script: python authenticate_cdi_admin.py
This script authenticates the client and displays the authentication response.
-
Run the script to fetch vehicle details using a plate number: python fetch_vehicle_by_platenumber.py YOUR_PLATE_NUMBER
Replace YOUR_PLATE_NUMBER with the actual plate number you want to query.