Error to load the XML data - Spring-framework

Hi,

First to mention, the best Javascript Scheduler I could found on the web, that’s for such a wonderful application.

I was evaluating the dhtmlxScheduler and I’m successfully able to render it and controlled in as want and I’m able to load the test data supplied (events.xml) in samples.

I have implemented my spring controller to provide the data to the scheduler in the following format (DHTMLXScheduler supports).

2012-02-02 19:15:00 2012-02-02 21:20:00 0 But Scheduler fails to load/display the data. I have attached JSP, Error snap and Firebug response.

Please help me whats wrong I’m doing in here??
htnlScheduler.jsp.zip (2.06 KB)




Init code looks fine.
Try to load /spring/scheduler/getAllEvents directly in browser - in case of parsyng errors, browser will provide an extra info.

Normally there are two main types of error

  • content type was not set to text/xml
  • there was output before <?xml tag ( in such case you need to remove extra output, or remove the <?xml tag, which in fact is optional, and not necessary for xml parsing )

Also, it seems that some other part of code load json - scheduler also can load data from json (if you have other parts working with json it may have sense to use json here as well )

Hi Stanislav,

Thanks for your response.

Here is what i have:

Normally there are two main types of error

  • content type was not set to text/xml
    –> The Content-type is set to “text/xml” and also tried “application/xml” in both cases I’m getting the XML response but the scheduler is just throwing alert with response content.

  • there was output before <?xml tag ( in such case you need to remove extra output, or remove the <?xml tag, which in fact is optional, and not necessary for xml parsing )
    –> In fact, The response doesn’t have “<?xml tag” itself (see the firebug console)…

I’ll give a try as u suggest “Try to load /spring/scheduler/getAllEvents directly in browser” and let you know.

Thanks,
Manjunath

Hi Stanislav,

Thanks for your response.

Here is what i have:

Normally there are two main types of error

  • content type was not set to text/xml
    –> The Content-type is set to “text/xml” and also tried “application/xml” in both cases I’m getting the XML response but the scheduler is just throwing alert with response content.

  • there was output before <?xml tag ( in such case you need to remove extra output, or remove the <?xml tag, which in fact is optional, and not necessary for xml parsing )
    –> In fact, The response doesn’t have “<?xml tag” itself (see the firebug console)…

I’ll give a try as u suggest “Try to load /spring/scheduler/getAllEvents directly in browser” and let you know.

Thanks,
Manjunath

JSON worked for me.