This section describes NETCONF message structures.
If you want to perform an operation in base1.1, the client must support base1.1 so that this capability can be advertised during capability set exchanges.
The XML messages sent by a client to a server must be concluded with the end character ]]>]]>. Otherwise, the server fails to identify the XML messages and does not respond to them. By default, the end character is automatically added to XML messages sent by a device. In the following example, the end character is not added, which facilitates XML format identification. In practice, the end character must be added.
If the capability set in the <hello> elements contains base1.1, the RPC messages in YANG model support the chunk format. Messages in chunk format can be fragmented. The end character is \n##\n.
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <ok /> </rpc-reply>
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3"> <rpc-error> <error-type>application</error-type> <error-tag>bad-element</error-tag> <error-severity>error</error-severity> <error-app-tag>43</error-app-tag> <error-path xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:acl="http://www.huawei.com/netconf/vrp/huawei-acl">/nc:rpc/nc:edit-config/nc:config/acl:acl/acl:aclGroups/acl:aclGroup[acl:aclNumOrName="2999"]/acl:aclRuleBas4s/acl:aclRuleBas4[acl:aclRuleName="rule_-2"]/acl:vrfAny</error-path> <error-message xml:lang="en">vrfAny has invalid value a.</error-message> <error-info> <bad-element>vrfAny</bad-element> </error-info> </rpc-error> </rpc-reply>
The message's fields are as follows: