Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The program demonstrates how to create the new collection protocol registration using Java code.

...

The program comprises three files:-

  • ApiClient.java

  • CprDetails.java

  • CprService.java

Information of files:

  1. ApiClient.java

...

  1. : This Java file contains Main, Login, Logout methods. Also, configuration attributes- URL, username, and password.

...

  1. CprDetails.java

...

  1. : This file includes JSON payload in string format. It returns your JSON payload.

...

  1. CprService.java

...

  1. : This file contains one method which accepts authentication token and URL.

Reference Code

<>

Clone repository using the following URL: https://github.com/Kaustubh-Wadagavi/Collection-protcol-registrations-simple-java-code.git

Command to clone the repository: git clone https://github.com/Kaustubh-Wadagavi/Collection-protcol-registrations-simple-java-code.git

How to set up code in the Eclipse IDE:

File --> Import --> Git --> Projects from git --> Existing Local Repository --> Add (Path to clonned repository)

How to run:

A. Right-Click on ApiClient.java

B. Run As --> Java Application

Note

Before running the source code

1. Please configure the URL, Username, and password attributes that are present in ApiClient.java

2. Please add correct values of JSON values in CprDetails.java under the PAYLOAD attribute.

...