Hi, community;
I have a SWON service which contains a SPARQL query, in case the query *is*
*not
empty* the service responds with a JSON object. But in case the query *is
empty* I would like to return a non JSON response, ideally an HTTP 404 with
a payload message like "No results found."
*Is it possible to change the response type dynamically to achieve this?*
For reference, the service ui:prototype is like this:
<ui:group>
<ui:setGlobalVar ui:name="empty" ui:value="{= xsd:boolean(true) }"/>
<ui:forEach ui:resultSet="{#
...
}" ui:separator=",">
<ui:setGlobalVar ui:name="empty" ui:value="{= xsd:boolean(false) }"
/>
<swon:Object>
...
</swon:Object>
</ui:forEach>
*<ui:if ui:condition="{= ui:globalVarValue("empty") = true
}">*
<swon:Object>
*<swon:Value arg:name="Error" arg:value="No results found."/>*
</swon:Object>
</ui:if>
</ui:group>
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.