The Portfolio API documentation comes with several code samples that illustrate the different methods available through the API. But sometimes seeing these samples out of context isn’t enough. You need to see the whole application that they came from.
Attached to this message is a zip file containing the JAVA code that was used to create the code samples. These are not complicated scripts. They were written to demonstrate specific methods, but they are functional.
Instructions for using the JAVA Code Samples.
[ul]1. Download and unzip the attached file.
2. Open Terminal on Macintosh or the Command Line utility in Windows.
3. Navigate to the folder containing the JAVA source files.
4. Compile one of the files using the following command. (For example: loginLogout.java)
javac -cp dam-client.jar:. loginLogout.java
5. Run the program.
java -cp dam-client.jar:. loginLogout[/ul]
You will need to make some modifications to the scripts to get them to work on your system. Open the files in a text editor and change the ‘SERVER’ variable so that it is pointing to your Portfolio Server. The ‘catUsed’ variable references a specific catalog the script interacts with. Change this to one of your own catalogs, or create one called simple.fdb.
Please post any questions you might have to the forums and we’ll answer them as best we can.
Please note that these code samples are for demonstration purposes only and are provided as is. We will not support their use in a production environment. Please use at your own risk.
For the very latest updates to the API documentation and new code samples, you can view the online API code reference at doc.extensis.com/api/portfolio-server/index.html.
JAVA Code Samples.zip (315 KB)