Re: 400 bad request POSTing to Tomcat 7.0.42

2015-03-03 Thread Alessandro Manzoni
Il 03.03.2015 09.47, Alexey Panchenko ha scritto: I am curious about how the client code looks now, before we continue complaining on the other end. Just trying to be fair. 1 HttpClient httpclient = new DefaultHttpClient(); 2 HttpPost httppost = new HttpPost(uri); 3

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-03-03 Thread Alessandro Manzoni
on't care about encoding, this time the server is implementing a sort of post only miscontrolled REST service. Sent from my iPhone On 3 Mar 2015, at 03:27, Alessandro Manzoni wrote: Il 02.03.2015 17.18, Brett Ryan ha scritto: Actually its not tomcats issue, when sending an encoding ot

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-03-02 Thread Alessandro Manzoni
Il 02.03.2015 17.18, Brett Ryan ha scritto: Actually its not tomcats issue, when sending an encoding other than the default which is ISO-8859-1 according to RFC-2616 (HTTP/1.1) you should send the encoding type (i.e. text/xml;charset=utf-8). By default the JAXB marshaller will use UTF-8 encodi

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-03-02 Thread Alessandro Manzoni
Using InputStreamEntity and forcing UFF-8 as enconding in HttpPost the problem was solved. InputStreamEntity only, without UFF-8, was not enough. That's sond definitively as a Tomcat issue. Il 26.02.2015 13.35, Oleg Kalnichevski ha scritto: On Thu, 2015-02-26 at 13:28 +0100, Aless

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Alessandro Manzoni
w how to adjust ipotetical buffers. Sent from my iPhone On 26 Feb 2015, at 23:28, Alessandro Manzoni wrote: What I would like to understand, is why an InputStreamEntity would be better than a StringEntity. - To unsubscribe

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Alessandro Manzoni
Thank you very much, Il 26.02.2015 13.33, Oleg Kalnichevski ha scritto: On Thu, 2015-02-26 at 13:06 +0100, Alessandro Manzoni wrote: Il 26.02.2015 11.59, Stefan Magnus Landrø ha scritto: or a tcp dump if you prefer. Could it be a transfer encoding issue? Is there a proxy involved in this

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Alessandro Manzoni
Thank you Oleg, Il 26.02.2015 09.52, Oleg Kalnichevski ha scritto: On Thu, 2015-02-26 at 19:04 +1100, Brett Ryan wrote: Since I produce the xml in memory, that's the way Marshal.marshal method works, I could use the ByteArrayEntity using the byte[] from the ByteArrayOutputStream supplied to ma

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Alessandro Manzoni
able to trace localhost traffic. Can you advise one? 2015-02-26 9:50 GMT+01:00 Oleg Kalnichevski : On Thu, 2015-02-26 at 08:26 +0100, Alessandro Manzoni wrote: Hi Stefan, thank you for the reply, Post a wire log of the session exhibiting the problem. Oleg Il 25.02.2015 20.44, Stefan Mag

Re: Please remove me from the list

2015-02-26 Thread Alessandro Manzoni
Il 26.02.2015 09.26, Maurice MILLS ha scritto: Hello, I have made several requests to unsubscribe from the list and I still receive the mails. Can you please remove me from the list? Thanks, Maurice To remove your address from the list, send a message to: as was stated in subscription

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-25 Thread Alessandro Manzoni
Hi Stefan, thank you for the reply, Il 25.02.2015 20.44, Stefan Magnus Landrø ha scritto: 2015-02-25 20:07 GMT+01:00 Alessandro Manzoni : Il 25.02.2015 19.28, Stefan Magnus Landrø ha scritto: Few questions: Why not use a more appropriate entity type? ByteArrayEntity? StreamEntity? Should

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-25 Thread Alessandro Manzoni
kl. 17.26 skrev Alessandro Manzoni : I made a simple client that sends a xml stream to a webapp running on tomcat 7 by POST method. Both client and tomcat run on the same server (linux). HTTPClient version is 4.2.2. The xml stream is formally correct. Somtimes, when the stream is more than 30KB tomcat

400 bad request POSTing to Tomcat 7.0.42

2015-02-25 Thread Alessandro Manzoni
I made a simple client that sends a xml stream to a webapp running on tomcat 7 by POST method. Both client and tomcat run on the same server (linux). HTTPClient version is 4.2.2. The xml stream is formally correct. Somtimes, when the stream is more than 30KB tomcat replies with an html page re