[ https://issues.apache.org/jira/browse/TIKA-593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13241266#comment-13241266 ]
Maxim Valyanskiy commented on TIKA-593: --------------------------------------- > FYI I do not understand how having TikaExceptionMapper registered can result > in 415 being returned, I'm looking at it and seeing no traces of 415, can you > clarify please ? I'll try to explain. Tika server's resources can handle any input mime-type. When we no not specify mime type in our PUT request (or specify something generic like 'application/octet-stream'), Tika uses its own mime-type detector to detect its type and choose parser. When we specify mime-type it skips detection stage and choose parser that handles specified document type. When we can't handle specified mime-type, when we can't detect it, or when we do not have parser for that type, we throw WebApplicationException(Response.Status.UNSUPPORTED_MEDIA_TYPE) - 415 code. Tika parser framework wraps that exception into TikaException. TikaExceptionMapper unwraps it: {{noformat}} if (e.getCause() !=null && e.getCause() instanceof WebApplicationException) { return ((WebApplicationException) e.getCause()).getResponse(); } {{noformat}} That exception mapper was lost after transition from Jersey to CXF, so we had 500-error instead of 415. PS: maybe we can speak Russian on jabber? > Tika network server > ------------------- > > Key: TIKA-593 > URL: https://issues.apache.org/jira/browse/TIKA-593 > Project: Tika > Issue Type: New Feature > Components: general > Affects Versions: 0.10 > Reporter: Jukka Zitting > Assignee: Chris A. Mattmann > Fix For: 1.2 > > Attachments: TIKA-593.Mattmann.032612.patch.2.txt, > TIKA-593.Mattmann.032612.patch.txt, TIKA-593.Mattmann.032712.patch.2.txt, > TIKA-593.Mattmann.032712.patch.txt, TIKA-593_pom.diff > > > It would be cool to be able to run Tika as a network service that accepts a > binary document as input and produces the extracted content (as XHTML, text, > or just metadata) as output. A bit like TIKA-169, but without the dependency > to a servlet container. > I'd like to be able to set up and run such a server like this: > $ java -jar tika-app.jar --port 1234 > We should also add a NetworkParser class that acts as a local client for such > a service. This way a lightweight client could use the full set of Tika > parsing functionality even with just the tika-core jar within its classpath. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira