Home

My Favorites

Close

Please to see your favorites.

Operations Center sample code - Jersey client API connecting to dashboard through RESTful web services

This document (7011908) is provided subject to the disclaimer at the end of this document.

Environment

Novell Operations Center 5.0 Dashboard
NetIQ Operations Center

Situation

This sample code demonstrates how to use the Jersey client APIs for connecting to dashboard/NOC server through the RESTful Web services. It provides java class "jerseySample" with the code, and two batch files (DOS/Windows syntax) for compilation and running. Sample code is step-by-step commented, for better understanding.

Resolution

Please do the following:
a) install Web2Connect package on your myMO server. Please see documentation for details.
b) make sure your Web2Connect service is up and running
c) download jersey-bundle-1.17.jar from
   https://maven.java.net/service/local/repositories/releases/content/com/sun/jersey/jersey-bundle/1.17/jersey-bundle-1.17.jar
d) read the documentation and study provided library source code
e) modify the sample code below according to your environment ( hard-coded ip, port, user, password )
f) compile the code
g) run compiled class in console/DosBox window

Suggested batch file for compiling the code:
@echo off
set JAVA_HOME=c:\Program Files (x86)\Java\jdk1.6.0_29
set MO_LIB=lib\moweb2cn.jar;lib\mocommon.jar
set JERSEY_LIB=lib\jersey-bundle-1.17.jar
set COMMON=%MO_LIB%;%JERSEY_LIB%
set CMD="%JAVA_HOME%\bin\javac.exe" -Xlint:unchecked -verbose -cp %COMMON% jerseySample.java
echo %CMD%
%CMD%



Suggested batch file for running the code:
@echo off
set JAVA_HOME=c:\Program Files (x86)\Java\jdk1.6.0_29
set MO_LIB=lib\moweb2cn.jar;lib\mocommon.jar
set JERSEY_LIB=lib\jersey-bundle-1.17.jar
set COMMON=.;%MO_LIB%;%JERSEY_LIB%
set CMD="%JAVA_HOME%\bin\java.exe" -cp %COMMON% jerseySample
echo %CMD%
%CMD%



Here is our Jersey client API sample code:

This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7011908
  • Creation Date:11-MAR-13
  • Modified Date:11-MAR-13
    • NetIQOperations Center

Did this document solve your problem? Provide Feedback

© Micro Focus