Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Java Code: Create Collection Protocol Registrations

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: This Java file contains Main, Login, Logout methods. Also, configuration attributes- URL, username, and password.

  2. CprDetails.java: This file includes JSON payload in string format. It returns your JSON payload.

  3. CprService.java: This file contains one method which accepts authentication token and URL.

Reference Code

https://github.com/krishagni/os-extensions/tree/master/Collection-protcol-registrations-simple-java-code

 

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.

 

 

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com