The NETCONF Java toolkit provides an object-oriented interface for communicating with a NETCONF server. The toolkit enables programmers familiar with the Java programming language to easily connect to a device, open a NETCONF session, construct configuration hierarchies in XML, and create and execute operational and configuration requests.
The NETCONF Java toolkit has four basic classes, which are described in Table 1.
Table 1: NETCONF Java Toolkit Classes
Defines the device on which the NETCONF server runs, and represents the SSHv2 connection and default NETCONF session with that device.
Represents a NETCONF session established with the device on which the NETCONF server runs.
Creates XML-encoded data.
XML-encoded data that represents an operational or configuration request or configuration data.
A configuration management server is generally a PC or workstation that is used to configure a router, switch, or security device remotely. The communication between the configuration management server and the NETCONF server via the NETCONF Java toolkit involves:
To use the NETCONF Java toolkit, you must install the toolkit and add the .jar path to your CLASSPATH. For more information about installing the NETCONF Java toolkit, see Downloading and Installing the NETCONF Java Toolkit.
Once the toolkit is installed, you connect to a device, create a NETCONF session, and execute operations by adding the associated code to a Java program file, which is then compiled and executed. For more information about creating NETCONF Java toolkit programs, see Creating and Executing a NETCONF Java Toolkit Program File.
Note: Juniper Networks devices running Junos OS Release 7.5R1 or later support the NETCONF XML management protocol.
Troubleshooting Exception Errors in a NETCONF Java Toolkit Program
Using the NETCONF Java Toolkit to Execute an Operational Request RPC
Using the NETCONF Java Toolkit to Print Component Temperatures
Using the NETCONF Java Toolkit to Load and Commit a Configuration