[CONTROLLER-1335] RPC Invocation via XML POST fails while equivalent JSON succeeds Created: 23/May/15 Updated: 25/Jul/23 Resolved: 25/May/15 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | restconf |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Ryan Goulding | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 3351 |
| Description |
|
Using toaster RPC as an example, POST XML to the REST endpoint fails while the equivalent POST using JSON succeeds. XML input: Status: 400 Bad Request ]}} When I try using JSON: } |
| Comments |
| Comment by Tony Tkacik [ 24/May/15 ] |
|
Seems as mistake in toaster tutorial. <input> Input element needs to define namespace of toaster module, e.g. <input xmlns="http://netconfcentral.org/ns/toaster" > Actually RPC code in Hydrogen and Helium failed to validate namespaces This got fixed in Lithium. |
| Comment by Ryan Goulding [ 24/May/15 ] |
|
Thanks, Tony; I just verified this using stable/lithium. I have updated the documentation https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Toaster_Step-By-Step#Invoke_make-toast_via_RestConf to ensure transparency. Are there existing unit or integration tests that verify restconf RPC behavior using HTTP? |
| Comment by Tony Tkacik [ 25/May/15 ] |
|
Codecs are used from yangtools (instead of custom writen as in Hydrogen and partly in Helium) - these are XML codec from yang-data-impl and JSON codec from yang-data-codec-gson - unit test for codecs are also in these artefacts. There are several CSIT tests which uses conrete models to test functionality using restconf. |