11-30-2009 09:38 AM
{
newsl: [
{
fileName: "gdfgioudfz.xml"
,
titel: "rewr"
,
body: "<p>rwerewr</p>
<p> </p>"
}
,
{
fileName: "ServiceorientierteArchitekturen .xml"
,
titel: "Serviceorientierte Architektur (SOA)"
,
body: "<p>ist derzeit einer der meistverwendeten, aber auch meistdiskutierten Begriffe in der Informationsverarbeitung. Dabei zeigt sich,.</p>
<p> </p>"
}
,
{
fileName: "test.xml"
,
titel: "test"
,
body: "<p>hier ist nur ein test</p>
<p> </p>"
}
]
}
the Problem is, Surf can not consume this webscript because of wordwrap in the Json result: body: "<p>hier ist nur ein test</p>
<p> </p>"
newsl: [
<#list folder.children as d>
<#if d.mimetype = "text/xml">
<#assign dom=d.xmlNodeModel>
{
fileName: "${d.name}"
,
titel: "${dom.news.title}"
,
body: "${dom.news.body}"
}
<#if d_has_next>,</#if>
</#if>
</#list>
]
und when I execute this webscript on the server side, i don't get any error, but when Surf consume this webscript Iget this error:Alfresco Web Script Status 500 - Internal Error
The Web Script /surf/service/newsListe has responded with a status of 500 - Internal Error.
500 Description: An error inside the HTTP server which prevented it from fulfilling the request.
Message: Failed to load script 'org.alfresco.web.scripts.LocalFileSystemStore$LocalFileSystemStoreScriptContent@ef43b1': SyntaxError: unterminated string literal (C:deploy/alfresco/site-webscripts/newsListe.get.js#8(eval)#10)
Exception: org.mozilla.javascript.EcmaError - SyntaxError: unterminated string literal (C:/alfresco/site-webscripts/newsListe.get.js#8(eval)#10)
12-04-2009 07:24 AM
newsl: [
<#list folder.children as d>
<#if d.mimetype = "text/xml">
<#assign dom=d.xmlNodeModel>
{
fileName: "${d.name}"
,
titel: "${dom.testNews.title}"
,
body: "${dom.testNews.body?j_string}"
}
<#if d_has_next>,</#if>
</#if>
</#list>
]
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.