margozzi
20 Dec 2010, 4:21 PM
var reader = new Ext.data.XmlReader( {
record: 'Data'
}, ['Foo', 'Bar']
);
With this data coming back from Web Service, the XmlReader fails to read it correctly.
<Data>
<Foo>23</Foo>
<Bar>76</Bar>
</Data
The very same reader is happy with this format of Data though.
<Response>
<Data>
<Foo>23</Foo>
<Bar>76</Bar>
</Data
</Response>
All of the examples I have seen like to wrap the data with success type
information. This is superfluous when using RESTful web services. The
success is determined by the HTTP status code. So I don't see the need
for it again in the XML data.
Is there a way to make this work in the first scenario?
record: 'Data'
}, ['Foo', 'Bar']
);
With this data coming back from Web Service, the XmlReader fails to read it correctly.
<Data>
<Foo>23</Foo>
<Bar>76</Bar>
</Data
The very same reader is happy with this format of Data though.
<Response>
<Data>
<Foo>23</Foo>
<Bar>76</Bar>
</Data
</Response>
All of the examples I have seen like to wrap the data with success type
information. This is superfluous when using RESTful web services. The
success is determined by the HTTP status code. So I don't see the need
for it again in the XML data.
Is there a way to make this work in the first scenario?