User guide

Northbound Interface User Interaction
974
AlliedView NMS Administration Guide
12.3.4.1 Client Implementation
There are several ways to implement a client program and several tools are also available to simplify web services
development. Here are some examples:
Use the WSDL provided with client code generator tools (e.g. wsdl2java, wsdl2cpp, etc.) to generate client stub source
code for the client to use when calling remote objects. (faster and easier to follow)
Use an IDE software packages that read the WSDL and guide the client development based on the available interface.
(can be slow for experienced programmers)
Develop the client that manually calls SOAP classes and pass all operation and parameters for the operation. (Requires
more SOAP understanding and good if you need to access the SOAP message properties directly.)
12.3.4.2 Example Class (Java)
This example will use Java but other languages have a similar mechanism to generate stub source code and here the example
will use Inventory module in NMS
1. Activate the available web services in NMS (refer to 12.3.1.1).
2. Point the browser to web services URL path on NMS server to see the deployed services and get the Inventory WSDL
contents into a file (Inventory.wsdl).
3. Run the wsdl2java tool with Inventory.wsdl (See Java or Axis/SOAP documentation) to generate stubs (you will then have
at least InventoryService, InventorySoapBindingStub and InventoryInterface classes).
4. The generated classes have all the information needed to access the NMS web service Write the client code to use the
generated classes (see example below) with the correct parameters.
5. Compile your class together with the generated classes and run your code that calls web services.
12.3.4.3 Accessing Examples
A complete set of examples is included with release 10.0 in the <NMS_home>/examples directory. There is the
nb_examples.zip file, which when extracted contains a set of guidelines and examples. Open the readme text file first.
12.3.5 Available Operations
There are many operations available through northbound interface in NMS with different parameter and results types. The
WSDL defines the syntax of all parameters and results but does not define what is the 'Object' included in Lists (object
arrays) or HashMaps which have different values based on operation. However, when used in parameters generally Lists will
contain a collection of string objects and HashMaps will contain key/value pairs which are both string objects.
Many of the operations that take a HashMap parameter as a filter criteria will accept a '*' anywhere in the string and a '!' at
the beginning of the string with their respective meanings when matching the criteria.
The table below show details of available operations in release 9.0 and the key words listed here will be used in the table.
Properties of objects used are as they are stored in NMS database or retrieved from device and multiple parameters are
listed as they appear.
MO match criteria: A HashMap of match criteria key/value pairs using Managed Object properties (e.g. category=Rapier,
type=9700 etc.). Criteria can be left empty to match anything or use selected special characters mentioned above (some
operations require match to specific devices).
List of object properties: A list (array of objects) with each element containing properties of one object in a HashMap
Provision properties: A map of parameters used in provisioning the device (see 12.3.6 for the list)