Rest Query 415
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2013 04:23 PM
Been using activiti using rest services for a while, and while trying to add features related to query services to the application, which I did not send data to previously, I keep on getting http 415.
I use post while creating process-instances etc, no problem. And all my other requests work well.
Tried the process-instances and tasks, both presenting the same result as (guess from restlet)
{
"errorMessage": "Unsupported Media Type",
"statusCode": 415
}
my request headers :
POST /gipsy.web/service/query/process-instances HTTP/1.1
Host: localhost:8088
Connection: keep-alive
Content-Length: 10
Cache-Control: no-cache
Origin: chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/28.0.1500.71 Chrome/28.0.1500.71 Safari/537.36
Content-Type: application/json
Accept: */*
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
the form data I am sending is
{"id":201}
Any ideas ? I am stuck here.
P.S. Running on a tomcat7, ubuntu server, if it matters.
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2013 08:20 PM
My POST URL is http://hostort/activiti-rest/service/query/process-instances
and I have "Content-Type: application/json" and "Accept: application/json" defined as headers (with Authorization, of course), and the following payload:
{ "size" : 5 }
And the response is:
Status Code: 415 Unsupported Media Type
{"errorMessage":"Unsupported Media Type","statusCode":415}
I've successfully used the Firefox/RESTClient combo to test our Activiti install on many occasions with both POST, GET, and DELETE, so I don't think the problem is with formatting or stray characters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2013 02:56 AM
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2013 09:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2014 10:20 AM
I use Activiti 5.14 and the firefox RESTClient. The Query http://host-ip/activiti-rest/service/runtime/process-instances with the body
{
"processDefinitionId":"simpleApprovalProcess:2:2255"
}
leads to
{
"errorMessage": "Unsupported Media Type",
"statusCode": 415
}
Other queries work well. Does anyone has an idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2014 10:23 AM
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2014 05:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2014 05:31 AM
and the body
{
"userId":"kermit"
}
I get a 415 Unsupported Media Type error with the information: "Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept"
In the header, I send Accept: application/json, Accept-Charset: utf-8, Content-Type: application/json. Other POST-Queries work fine. In this case, the log says:
<code>
Feb 12, 2014 10:57:16 AM org.restlet.engine.log.LogFilter afterHandle
Information: 2014-02-12 10:57:16 10.120.6.62 benjamin 10.120.40.24 8080 POST /activiti-rest/service/repository/process-definitions/Ausgabe_beantragen:2:2288/identitylinks - 415 - 25 16 http://10.120.40.24:8080 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 -
Feb 12, 2014 10:57:51 AM org.restlet.ext.jackson.JacksonRepresentation getObject
Warnung: Unable to parse the object with Jackson.
org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "userId" (Class org.activiti.rest.service.api.engine.RestIdentityLink), not marked as ignorable
at [Source: org.restlet.engine.http.io.UnclosableInputStream@51f2e0a0; line: 2, column: 15] (through reference chain: org.activiti.rest.service.api.engine.RestIdentityLink["userId"])
at org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53)
at org.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:267)
at org.codehaus.jackson.map.deser.std.StdDeserializer.reportUnknownProperty(StdDeserializer.java:673)
at org.codehaus.jackson.map.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:659)
at org.codehaus.jackson.map.deser.BeanDeserializer.handleUnknownProperty(BeanDeserializer.java:1365)
at org.codehaus.jackson.map.deser.BeanDeserializer._handleUnknown(BeanDeserializer.java:725)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:703)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580)
at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732)
at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1909)
at org.restlet.ext.jackson.JacksonRepresentation.getObject(JacksonRepresentation.java:139)
at org.restlet.ext.jackson.JacksonConverter.toObject(JacksonConverter.java:218)
at org.restlet.service.ConverterService.toObject(ConverterService.java:161)
at org.restlet.resource.UniformResource.toObject(UniformResource.java:647)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:434)
at org.restlet.resource.ServerResource.post(ServerResource.java:1114)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:533)
at org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:590)
at org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:302)
at org.restlet.resource.ServerResource.handle(ServerResource.java:849)
at org.restlet.resource.Finder.handle(Finder.java:513)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Router.doHandle(Router.java:500)
at org.restlet.routing.Router.handle(Router.java:740)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:155)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114)
at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:75)
at org.restlet.Application.handle(Application.java:391)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Router.doHandle(Router.java:500)
at org.restlet.routing.Router.handle(Router.java:740)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Router.doHandle(Router.java:500)
at org.restlet.routing.Router.handle(Router.java:740)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114)
at org.restlet.Component.handle(Component.java:391)
at org.restlet.Server.handle(Server.java:491)
at org.restlet.engine.ServerHelper.handle(ServerHelper.java:74)
at org.restlet.engine.http.HttpServerHelper.handle(HttpServerHelper.java:153)
at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1031)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
</code>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2014 05:44 AM
{
"user" : "kermit"
}
it works. The documentation says, that you shoul send userId.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2014 12:56 PM