Closed michaelwechner closed 10 years ago
I cannot reproduce this issue when using the sample at
http://127.0.0.1:8080/yanel/test/use-cases/calendar.ics
but I can reproduce the problem, that when adding special characters like for example ü,ä, ü that the XML won't be well-formed anymore.
I think the problem is that
src/resources/calendar/src/java/org/wyona/yanel/impl/resources/calendar/CalendarEvent.java#toXML() is using StringBuffer instead the org.w3c.dom classes!
The problem was that the method
src/resources/calendar/src/java/org/wyona/yanel/impl/resources/calendar/CalendarResource.java#getSize()
was not implemented correctly. When requesting the XML view, then the size of calendar.ics was returned anyway, but which of course did not fit, and hence the InputStream was often closed to early
We should still improve the StringBuffer issue
src/resources/calendar/src/java/org/wyona/yanel/impl/resources/calendar/CalendarEvent.java#toXML() is using StringBuffer
StringBuffer has now been replaced by DOM
When requesting
http://127.0.0.1:8080/yanel/my-realm/calendar.ics?yanel.resource.viewid=xml
then a well-formed XML will be dumped (named calendar.xml) beside calendar.ics inside the realm repository, but the browser does not receive the complete XML, but rather complains about not closed tokens. Please note that 'my-realm' is just an example.
An existing sample can be accessed
http://127.0.0.1:8080/yanel/test/use-cases/calendar.ics?yanel.resource.viewid=xml
assuming that you have the default source version of Yanel installed.