[Contents] [Prev] [Next] [Index] [Report an Error]

Emitting the Opening <junoscript> Tag

The client application then emits its opening <junoscript> tag, which has the following syntax (and appears here on two lines only for legibility):

<junoscript version="version" hostname="hostname" junos:key="key"
     release="release-code">

The attributes are as follows. For a list of the attribute values that are acceptable in the current version of the JUNOScript API, see Supported Software Versions.

In the following example of a client application’s opening <junoscript> tag, the version="1.0" attribute indicates that it is using JUNOScript version 1.0. The hostname="client1" attribute indicates that the client application is running on the machine called client1. The release="9.4R1" attribute indicates that the routing platform is running the initial version of JUNOS Release 9.4.

<junoscript version="1.0" hostname="client1" release="9.4R1">

Note: If the application fails to emit the <?xml?> PI before emitting the opening <junoscript> tag, the JUNOScript server emits an error message similar to the following and immediately closes the session and connection:

<rpc-reply>
    <xnm:error xmlns="http://xml.juniper.net/xnm/1.1/xnm" \             xmlns:xnm="http://xml.juniper.net/xnm/1.1/xnm">         <message>
            communication error while exchanging credentials         </message>
    </xnm:error> </rpc-reply>
<!- - session end at YYYY-MM-DD hh:mm:ss TZ - ->
</junoscript>

For more information about the <xnm:error> tag, see Handling an Error or Warning.


[Contents] [Prev] [Next] [Index] [Report an Error]