Junos XML Protocol Session Overview
The Junos XML protocol server communicates with client applications within the context of a Junos XML protocol session. The server and client explicitly establish a connection and session before exchanging data and close the session and connection when they are finished.
Each request from the client application and each response from the Junos XML protocol server must constitute a well-formed XML document by obeying the structural rules defined in the Junos XML protocol and Junos XML document type definition (DTD) for the kind of information they encode. The client application must produce a well-formed XML document for each request by emitting tag elements in the required order and only in the legal contexts.
Client applications access the Junos XML protocol server using one of the protocols listed in Supported Access Protocols for Junos XML Protocol Sessions. To authenticate with the Junos XML protocol server, a client application uses either a Junos XML protocol-specific mechanism or the access protocol’s standard authentication mechanism, depending on the protocol. After authentication, the Junos XML protocol server uses the Junos OS login usernames and classes configured on the device to determine whether a client application is authorized to make each request.
The following list outlines the basic structure of a Junos XML protocol session:
The client application establishes a connection to the Junos XML protocol server and opens the Junos XML protocol session.
The Junos XML protocol server and client application exchange initialization information, which is used to determine if they are using compatible versions of the Junos OS and the Junos XML management protocol.
The client application sends one or more requests to the Junos XML protocol server and parses its responses.
The client application closes the Junos XML protocol session and the connection to the Junos XML protocol server.