<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Activiti 5.16 REST api returning XML not JSON in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185262#M138392</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Never mind… the JSON you get with a trailer slash is just the standard JSON error block &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Still searching for an answer on this one…..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Aug 2014 19:41:07 GMT</pubDate>
    <dc:creator>joeysr20det</dc:creator>
    <dc:date>2014-08-07T19:41:07Z</dc:date>
    <item>
      <title>Activiti 5.16 REST api returning XML not JSON</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185260#M138390</link>
      <description>I setup an Activiti 5.16 test environment a couple days ago; I deployed the activiti-explorer.war and activiti-rest.war to a Tomcat 7 instance. Everything appears to be up and running just fine without any errors. I'm attempting to use the REST api and i'm running into issues. I'm calling the manage</description>
      <pubDate>Thu, 07 Aug 2014 16:28:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185260#M138390</guid>
      <dc:creator>joeysr20det</dc:creator>
      <dc:date>2014-08-07T16:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti 5.16 REST api returning XML not JSON</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185261#M138391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just wanted to follow up. If the URL doesn't end with a forward slash it returns XML. If it does end with a forward slash it returns JSON. I don't know if that a standard REST or JSON thing; I haven't seen this kind of functionality before and the guide doesn't mention it (that I've come across).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://mouse:8084/activiti-rest/service/management/engine" rel="nofollow noopener noreferrer"&gt;http://mouse:8084/activiti-rest/service/management/engine&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;returns XML&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://mouse:8084/activiti-rest/service/management/engine/" rel="nofollow noopener noreferrer"&gt;http://mouse:8084/activiti-rest/service/management/engine/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;return JSON&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 19:37:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185261#M138391</guid>
      <dc:creator>joeysr20det</dc:creator>
      <dc:date>2014-08-07T19:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti 5.16 REST api returning XML not JSON</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185262#M138392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Never mind… the JSON you get with a trailer slash is just the standard JSON error block &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Still searching for an answer on this one…..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 19:41:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185262#M138392</guid>
      <dc:creator>joeysr20det</dc:creator>
      <dc:date>2014-08-07T19:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti 5.16 REST api returning XML not JSON</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185263#M138393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Instead of a Content-Type header, try an "Accept" header. Use application/json as the expected data type.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 00:42:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185263#M138393</guid>
      <dc:creator>pmsevestre</dc:creator>
      <dc:date>2014-08-08T00:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti 5.16 REST api returning XML not JSON</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185264#M138394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Cool that worked! I didn't think to even try that. I read the Activiti 5.16 documentation thoroughly and didn't find anything about getting absolutely any other return type than JSON EXCEPT a type of multipart when your downloading a file. I really wouldn't have thought I would have had to explicitly tell Activiti to give me JSON if that's all it says you'll get in the documentation &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Activiti people: Just for the record, I ran into this with Chrome and Firefox with REST plugins and with my Java URL connection. I don't know if this is a bug or maybe desired functionality for different response types.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks pmsevestre!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 15:17:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185264#M138394</guid>
      <dc:creator>joeysr20det</dc:creator>
      <dc:date>2014-08-08T15:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti 5.16 REST api returning XML not JSON</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185265#M138395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is the returned XML actually representing the result you expect (eg. &lt;/SPAN&gt;&lt;A href="http://mouse:8084/activiti-rest/service/management/engine" rel="nofollow noopener noreferrer"&gt;http://mouse:8084/activiti-rest/service/management/engine&lt;/A&gt;&lt;SPAN&gt; returns engine details as XML)? This is probably a side-effect of the usage of Restlet as a REST-framework. Since we use Jackson message converters, both JSON and XML can be generated in theory…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Aug 2014 07:24:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185265#M138395</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-08-11T07:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti 5.16 REST api returning XML not JSON</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185266#M138396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It sure does and it's completely correct. However, I did run into errors with services that returned JSON array because they don't marshall correctly to XML. I suppose if you wanted XML and knew what the service returned (structure wise) you could parse it properly yourself. Anyhow, here are few samples of output from my Activiti 5.16 instance:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;GET /activiti-rest/service/management/engine:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ProcessEngineInfoResponse&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;default&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;resourceUrl&amp;gt;file:/C:/Users/joey/AppData/Roaming/NetBeans/7.2/apache-tomcat-7.0.27.0_base/webapps/activiti-rest/WEB-INF/classes/activiti-context.xml&amp;lt;/resourceUrl&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;exception/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;version&amp;gt;5.16&amp;lt;/version&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ProcessEngineInfoResponse&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;GET /activiti-rest/service/repository/deployments/1506/resources&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This one returns an HTTP 500 from Tomcat and the Tomcat log reveals the following. I imagine it's because this service is trying to return a JSON array in XML:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;java.io.IOException: javax.xml.stream.XMLStreamException: Trying to output second root, &amp;lt;ArrayList&amp;gt;&lt;BR /&gt; at com.fasterxml.jackson.dataformat.xml.util.StaxUtil.throwXmlAsIOException(StaxUtil.java:24)&lt;BR /&gt; at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator._handleStartObject(ToXmlGenerator.java:428)&lt;BR /&gt; at com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.writeStartObject(ToXmlGenerator.java:397)&lt;BR /&gt; at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:138)&lt;BR /&gt; at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:100)&lt;BR /&gt; at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:21)&lt;BR /&gt; at com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase.serialize(AsArraySerializerBase.java:186)&lt;BR /&gt; at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:222)&lt;BR /&gt; at com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider.serializeValue(XmlSerializerProvider.java:87)&lt;BR /&gt; at com.fasterxml.jackson.databind.ObjectWriter._configAndWriteValue(ObjectWriter.java:683)&lt;BR /&gt; at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:534)&lt;BR /&gt; at org.restlet.ext.jackson.JacksonRepresentation.write(JacksonRepresentation.java:474)&lt;BR /&gt; at org.restlet.engine.adapter.ServerCall.writeResponseBody(ServerCall.java:519)&lt;BR /&gt; at org.restlet.engine.adapter.ServerCall.sendResponse(ServerCall.java:463)&lt;BR /&gt; at org.restlet.ext.servlet.internal.ServletCall.sendResponse(ServletCall.java:430)&lt;BR /&gt; at org.restlet.engine.adapter.ServerAdapter.commit(ServerAdapter.java:196)&lt;BR /&gt; at org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:153)&lt;BR /&gt; at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1118)&lt;BR /&gt; at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)&lt;BR /&gt; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)&lt;BR /&gt; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)&lt;BR /&gt; at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)&lt;BR /&gt; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)&lt;BR /&gt; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)&lt;BR /&gt; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)&lt;BR /&gt; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)&lt;BR /&gt; at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)&lt;BR /&gt; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)&lt;BR /&gt; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)&lt;BR /&gt; at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)&lt;BR /&gt; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)&lt;BR /&gt; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)&lt;BR /&gt; at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)&lt;BR /&gt; at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)&lt;BR /&gt; at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)&lt;BR /&gt; at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)&lt;BR /&gt; at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)&lt;BR /&gt; at java.lang.Thread.run(Thread.java:745)&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Aug 2014 14:46:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-5-16-rest-api-returning-xml-not-json/m-p/185266#M138396</guid>
      <dc:creator>joeysr20det</dc:creator>
      <dc:date>2014-08-11T14:46:05Z</dc:date>
    </item>
  </channel>
</rss>

