<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:55:17 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[CONTROLLER-1335] RPC Invocation via XML POST fails while equivalent JSON succeeds</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-1335</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;Using toaster RPC as an example, POST XML to the REST endpoint fails while the equivalent POST using JSON succeeds.&lt;/p&gt;

&lt;p&gt;XML input:&lt;br/&gt;
Endpoint: &lt;a href=&quot;http://localhost:8181/restconf/operations/toaster:make-toast&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/restconf/operations/toaster:make-toast&lt;/a&gt;&lt;br/&gt;
Content-Type: application/xml&lt;br/&gt;
Body:&lt;br/&gt;
&amp;lt;input&amp;gt;&lt;br/&gt;
     &amp;lt;toasterDoneness&amp;gt;1&amp;lt;/toasterDoneness&amp;gt;&lt;br/&gt;
     &amp;lt;toasterToastType&amp;gt;wheat-bread&amp;lt;/toasterToastType&amp;gt;&lt;br/&gt;
     &amp;lt;foo&amp;gt;fooValue&amp;lt;/foo&amp;gt;&lt;br/&gt;
&amp;lt;/input&amp;gt;&lt;/p&gt;

&lt;p&gt;Status: 400 Bad Request&lt;br/&gt;
{&quot;errors&quot;:{&quot;error&quot;:[&lt;/p&gt;
{&quot;error-type&quot;:&quot;protocol&quot;,&quot;error-tag&quot;:&quot;malformed-message&quot;,&quot;error-message&quot;:&quot;Error parsing input: Unknown child(ren) node(s) detected, identified by: toasterDoneness, in: container input&quot;}
&lt;p&gt;]}}&lt;/p&gt;

&lt;p&gt;When I try using JSON:&lt;br/&gt;
Endpoint: &lt;a href=&quot;http://localhost:8181/restconf/operations/toaster:make-toast&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/restconf/operations/toaster:make-toast&lt;/a&gt;&lt;br/&gt;
Content-Type: application/xml&lt;br/&gt;
Body:&lt;br/&gt;
{&lt;br/&gt;
  &quot;input&quot; :&lt;/p&gt;
  {
    &quot;toaster:toasterDoneness&quot; : &quot;1&quot;,
    &quot;toaster:toasterToastType&quot; : &quot;wheat-bread&quot;,
    &quot;toaster:foo&quot; : &quot;fooValue&quot;
  }
&lt;p&gt;}&lt;br/&gt;
Status: 200 OK&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="25889">CONTROLLER-1335</key>
            <summary>RPC Invocation via XML POST fails while equivalent JSON succeeds</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10003">Cannot Reproduce</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="rgoulding">Ryan Goulding</reporter>
                        <labels>
                    </labels>
                <created>Sat, 23 May 2015 17:14:46 +0000</created>
                <updated>Tue, 25 Jul 2023 08:24:04 +0000</updated>
                            <resolved>Mon, 25 May 2015 07:15:35 +0000</resolved>
                                                                    <component>restconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="50706" author="tony.tkacik@gmail.com" created="Sun, 24 May 2015 13:55:27 +0000"  >&lt;p&gt;Seems as mistake in toaster tutorial.&lt;/p&gt;

&lt;p&gt;&amp;lt;input&amp;gt;&lt;br/&gt;
     &amp;lt;toasterDoneness&amp;gt;1&amp;lt;/toasterDoneness&amp;gt;&lt;br/&gt;
     &amp;lt;toasterToastType&amp;gt;wheat-bread&amp;lt;/toasterToastType&amp;gt;&lt;br/&gt;
     &amp;lt;foo&amp;gt;fooValue&amp;lt;/foo&amp;gt;&lt;br/&gt;
&amp;lt;/input&amp;gt;&lt;/p&gt;

&lt;p&gt;Input element needs to define namespace of toaster module, e.g.&lt;/p&gt;

&lt;p&gt;&amp;lt;input xmlns=&quot;http://netconfcentral.org/ns/toaster&quot; &amp;gt;&lt;br/&gt;
... &lt;br/&gt;
&amp;lt;/input&amp;gt;.&lt;/p&gt;

&lt;p&gt;Actually RPC code in Hydrogen and Helium failed to validate namespaces&lt;br/&gt;
and accepted input without them which was bug.&lt;/p&gt;

&lt;p&gt;This got fixed in Lithium.&lt;/p&gt;</comment>
                            <comment id="50707" author="rgoulding" created="Sun, 24 May 2015 15:31:20 +0000"  >&lt;p&gt;Thanks, Tony;  I just verified this using stable/lithium.  &lt;/p&gt;

&lt;p&gt;I have updated the documentation &lt;a href=&quot;https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Toaster_Step-By-Step#Invoke_make-toast_via_RestConf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Toaster_Step-By-Step#Invoke_make-toast_via_RestConf&lt;/a&gt; to ensure transparency.  &lt;/p&gt;

&lt;p&gt;Are there existing unit or integration tests that verify restconf RPC behavior using HTTP?&lt;/p&gt;</comment>
                            <comment id="50708" author="tony.tkacik@gmail.com" created="Mon, 25 May 2015 07:15:35 +0000"  >&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;There are several CSIT tests which uses conrete models to test functionality using restconf.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3351</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=3351]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10315"><![CDATA[Lithium]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02pxr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>