Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 31D61DE85 for ; Tue, 7 Aug 2012 10:33:54 +0000 (UTC) Received: (qmail 87908 invoked by uid 500); 7 Aug 2012 10:33:53 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 87787 invoked by uid 500); 7 Aug 2012 10:33:53 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 87758 invoked by uid 99); 7 Aug 2012 10:33:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2012 10:33:52 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gary.tully@gmail.com designates 209.85.212.169 as permitted sender) Received: from [209.85.212.169] (HELO mail-wi0-f169.google.com) (209.85.212.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2012 10:33:47 +0000 Received: by wibhm2 with SMTP id hm2so2403015wib.2 for ; Tue, 07 Aug 2012 03:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=AKITzwiLqcGRsMxI7Jj5uybNHV4ne5MVI533p6FuxYw=; b=RzNmomva1i0U8Bz/1knEU1Ib0Ouz94O7lzxpIzcywDs0fSzbBi/oS+r+R8CRdUVyh1 PajuqUJdD/GCCPCfLmW4GoJGFgw4W2M3nZLRkQBz9lPXyY/MqmL439rQyvfkaofqJkuM dXs0U1Mx1wIRhCfiziy+wKrnDs/3dd7V3u4QgzjHdfRd/Qllj/wwObdS0unmP08uz0/q H3yMJDN572OmSRoMpIjZWdEoD7nWAEOlF9e0oIEvJjv7HnFARMGL6PYPxOtM9V+MzQa9 IaabHwGE/Ua+izhOdPh78AhPiC9tqH9XFHectoCHrHvqYKJEISpgtE3pAK6bydomlVup STdg== MIME-Version: 1.0 Received: by 10.180.81.38 with SMTP id w6mr26392973wix.10.1344335606947; Tue, 07 Aug 2012 03:33:26 -0700 (PDT) Received: by 10.194.54.66 with HTTP; Tue, 7 Aug 2012 03:33:26 -0700 (PDT) In-Reply-To: <1344281451563-4654825.post@n4.nabble.com> References: <1344281451563-4654825.post@n4.nabble.com> Date: Tue, 7 Aug 2012 11:33:26 +0100 Message-ID: Subject: Re: Does v5.6.0 MessageServlet(REST interface) support a Content-Type of "text/plain"? From: Gary Tully To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 it has got to be 'text/xml' at the moment. On 6 August 2012 20:30, Steve.V. wrote: > I can use the RESTful HTTP protocol to POST and GET messages as long as I > POST using either "text/xml" or "application/x-www-form-urlencoded" as the > Content-Type. If I try to POST via "text/plain", messages are put on the > queue, but have no content. When I attempt to GET those messages off of the > queue, the broker encounters a NullPointerException at line 269 of > MessageServlet.java: > > java.lang.NullPointerException > at > org.apache.activemq.web.MessageServlet.writeMessageResponse(MessageServlet.java:269) > at > org.apache.activemq.web.MessageServlet.writeResponse(MessageServlet.java:256) > at > org.apache.activemq.web.MessageServlet.doMessages(MessageServlet.java:229) > at org.apache.activemq.web.MessageServlet.doGet(MessageServlet.java:165) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) > at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1360) > at org.apache.activemq.web.SessionFilter.doFilter(SessionFilter.java:45) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:477) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:499) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:499) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) > at org.eclipse.jetty.server.Server.handle(Server.java:349) > at > org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452) > at > org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884) > at > org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938) > at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634) > at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) > at > org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76) > at > org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609) > at > org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534) > at java.lang.Thread.run(Thread.java:619) > > Thanks, > Stephen Vincent > > > > > ----- > Stephen Vincent > -- > View this message in context: http://activemq.2283324.n4.nabble.com/Does-v5-6-0-MessageServlet-REST-interface-support-a-Content-Type-of-text-plain-tp4654825.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- http://fusesource.com http://blog.garytully.com