[NETCONF-1055] XML POST: Payloads are not well-formed XML documents Created: 13/Jun/23 Updated: 13/Jul/23 |
|
| Status: | Open |
| Project: | netconf |
| Component/s: | restconf-nb |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0 |
| Type: | Bug | Priority: | Highest |
| Reporter: | Ivan Hrasko | Assignee: | Ivan Hrasko |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | pick-next, pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
According to XML Syntax (w3schools.com) XML documents must contain one root element that is the parent of all other elements. But currently ODL is accepting POST XML requests like this: <?xml version="1.0" encoding="UTF-8"?><topology-id xmlns="urn:TBD:params:xml:ns:yang:network-topology">topology-id</topology-id> And rejects POST XML requests like this: <?xml version="1.0" encoding="UTF-8"?><network-topology xmlns="urn:TBD:params:xml:ns:yang:network-topology"> <topology-id xmlns="urn:TBD:params:xml:ns:yang:network-topology">topology-id</topology-id></network-topology> For http://192.168.56.25:8181/rests/data/network-topology:network-topology/topology=topology-id paths. |
| Comments |
| Comment by Ivan Hrasko [ 13/Jul/23 ] |
Example:
To create a new "jukebox" resource, the client might send the
following:
POST /restconf/data HTTP/1.1
Host: example.com
Content-Type: application/yang-data+json
{ "example-jukebox:jukebox" : {} }
|
| Comment by Ivan Hrasko [ 13/Jul/23 ] |
|
https://datatracker.ietf.org/doc/html/rfc8040#appendix-B.2.1 |