Including Attributes In The Opening <Rpc> Tag; Parsing The Junos Xml Protocol Server Response - Juniper JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010 Manual

Junos xml management protocol guide
Hide thumbs Also See for JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010:
Table of Contents

Advertisement

Junos 10.3 Junos XML Management Protocol Guide

Parsing the Junos XML Protocol Server Response

48
The following example shows how to create a new Junos OS user account called
at the
hierarchy level in the candidate configuration:
[edit system login]
<rpc>
<load-configuration>
<configuration>
<system>
<login>
<user>
<name>admin</name>
<full-name>Administrator</full-name>
<class>superuser</class>
</user>
</login>
</system>
</configuration>
</load-configuration>
</rpc>
For more information, see "Changing Configuration Information" on page 103 and
"Committing a Configuration" on page 133. For a summary of Junos XML configuration
tag elements, see the Junos XML API Configuration Reference.
Including Attributes in the Opening <rpc> Tag
Optionally, a client application can include one or more attributes of the form
in the opening
attribute-name="value"
server echoes each attribute, unchanged, in the opening
encloses its response. A client application can use this feature to associate requests and
responses by including an attribute in each opening
unique identifier. The Junos XML protocol server echoes the attribute in its opening
tag, making it easy to map the response to the initiating request. The client
<rpc-reply>
application can freely define attribute names, except as described in the following note.
NOTE: The
attribute name is reserved. The Junos XML protocol server sets
xmlns:junos
the attribute to an appropriate value on the opening
applications must not emit it on the opening
"xmlns:junos Attribute" on page 49.
The Junos XML protocol server encloses its response to each client request in a separate
pair of opening
<rpc-reply>
well-formed XML document.
<rpc-reply xmlns:junos="URL">
<!-- tag elements representing a response -->
</rpc-reply>
The
xmlns:junos
attribute in the opening
for the enclosed tag elements that have the
further in "xmlns:junos Attribute" on page 49. The
within the
<junoscript>
tag element. Client applications must include code for parsing
tag for each request. The Junos XML protocol
<rpc>
<rpc>
<rpc-reply>
tag. For more information, see
<rpc>
and closing
tags. Each response constitutes a
</rpc-reply>
<rpc-reply>
tag defines the default namespace
prefix in their names, as discussed
junos:
<rpc-reply>
tag in which it
<rpc-reply>
request tag that assigns a
tag, so client
tag element occurs only
Copyright © 2010, Juniper Networks, Inc.
admin

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junos os

Table of Contents