AnsweredAssumed Answered

Activiti REST development issues

Question asked by manusoftar on Jan 13, 2016
Latest reply on Jan 20, 2016 by jbarrez
First of all i apologize for my english but it is not my first language, being said that ill go to the point now.

We are trying to use Activiti-REST to develop our tickets system (between other things) but right now we are stucked trying to actually be able to consume the REST service because we are facing CORS problems.

We are using GlassFish Server because the company was already using it and don't want to switch to another web server just for this app.

The thing is that GlassFish runs Activiti-Rest on  http://localhost:8080 or https://localhost:8181 and the web page that should consume it on http://localhost:8383 so even though the domain is the same -> localhost, the mere fact that the server listens on different ports fires the CORS exception (to call it somehow).

After doing some research we found that the REST Api should implement a ContainerResponseFilter that will return the needed headers to allow cross domain ajax calls…

We tried adding the class ourselves and also updating the web.xml but it doesn't work, either it rises an exception at deployment time that it doesn't find a root resource package or it just wont do a thing if the @Path annotattion is written ot that class.

Also we tried to compile the sources from your github to make our own activiti-rest.war but it compiles to jar (the activiti-rest module) the master project Activiti, is set to packaging pom…

We really need some help from you people we are totally stucked at this point, we even tried using a proxy within GlassFish but since the services are running on the SAME domain but different ports it doesn't seem to work at all whatsoever.

Thanks in advance for any help you can give us.

Carlos Manuel Fernandez Ravelli.-

Outcomes