[
https://issues.apache.org/jira/browse/STANBOL-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997748#comment-12997748
]
Fabian Christ commented on STANBOL-101:
---------------------------------------
curl -X POST -H "Accept: application/rdf+nt" -H "Content-type: text/plain"
--data "Fise can detect famous cities such as Paris."
http://localhost:8080/engines/
throws an exception
22.02.2011 12:10:35 com.sun.jersey.spi.container.ContainerResponse write
SCHWERWIEGEND: A message body writer for Java class
org.apache.clerezza.rdf.core.impl.SimpleMGraph, and Java type class
org.apache.clerezza.rdf.core.impl.SimpleMGraph, and MIME media type
application/octet-stream was not found
22.02.2011 12:10:35 com.sun.jersey.spi.container.ContainerResponse
traceException
SCHWERWIEGEND: Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException
at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:267)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1035)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:947)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:938)
at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:399)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:478)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:663)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:91)
at
org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:77)
at
org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at
org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
at
org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
at
org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> Better control of returned format
> ---------------------------------
>
> Key: STANBOL-101
> URL: https://issues.apache.org/jira/browse/STANBOL-101
> Project: Stanbol
> Issue Type: Improvement
> Components: Enhancer
> Reporter: Fabian Christ
> Labels: Accept-Header, Enhancer,, Format,
>
> Currently, you can define the returned format for the Enhancer by setting the
> 'accept' header. The value of the 'format' field provided in the payload
> seems not to be used internally.
> If you set the accepted content to 'application/json' the Enhancer returns
> JSON format as expected:
> curl -X POST -H "Accept: application/json" -H "Content-type: text/plain" \
> --data "Fise can detect famous cities such as Paris." \
> http://localhost:8080/engines/
> If you leave the accept header blank, JSON-LD format is returned. But there
> is no way to explicitly force the system to return JSON-LD.
> curl -X POST -H "Accept: " -H "Content-type: text/plain" \
> --data "Fise can detect famous cities such as Paris." \
> http://localhost:8080/engines/
> Stanbol should define which is the default format officially and provide a
> consistent way to control the returned format. Perhaps it would be useful to
> return the supported formats through the REST API.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira