PICoder is a small utility that I have developed to create the PI configuration automatically with one click. I have used the Directory API to demonstrate this example.
In this blog, I have shown step by step example on how to create the program by using Directory API and create the PI configuration. This code works with PI 7.3x.
In order to execute the scenario you need to have two roles for your userid:
Step by Step guide on the Configuration & development using Directory API:
You can develop this program using eclipse or NWDS but I have used NWDS for my development and J2SE 1.6. PI version is 7.3x.
In this example, I have created a ChangeList and “JDBC” channel from desktop java application.
Step 1: Open NWDS & Change Perspective
Step 2: Create Java Project -> PICoder
Copy the code of PISystemConfig.java from the downloads.
Step 2: Create another Class
Get all the below required java files from the downloads so I have shown for reference only.
Step 3: Import the WSDL file for Changelist and Channel
Select “Webservices -> WSDL”
Login into the PI System to get the wsdl file.
Extract both Changelist and Communication Channel WSDL. Obviously, you need to do it one after the other.
Now Right Click on the wsdl and Generate Client for both Changelist and Communication Channel wsdl.
Now you should see the wsdl and corresponding files in the project list:
Step 4: Make sure you have all the code downloaded from this blog
Step 5: After executing the code from the NWDS, output in PI
I strongly recommend to go thru this blog written by William on Directory API which made me do my own research and use this API for my own purpose.
I had many iterations to make it work with PI system. I can help to share the issues I have seen and fixes that I have applied. Let me know if you want to discuss with me here.