Error receiving XML in HTTPResponse body

jaimemm jaimemm at gmail.com
Tue Jan 13 12:21:14 EST 2009


Thanks for your quick answer.

Here you go:

Request:
==================
POST /decoupling/DecouplingProcessServlet HTTP/1.1

accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*

accept-charset: iso-8859-1,*,utf-8

accept-encoding: gzip

connection: close

Content-Length: 145

Content-Length: 145

content-type: text/xml

Host: 127.0.0.1:8081

User-Agent: Jakarta Commons-HttpClient/3.0.1



<?xml version="1.0" encoding="UTF-8"?>

<er-request id="100007" client-application-id="partner1"
purchase_locale="en_GB" language_locale="en_GB"/>


Response:
======================


HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

X-Powered-By: Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1
date=200510231054)/Tomcat-5.5

Content-Type: text/xml;charset=UTF-8

Date: Tue, 13 Jan 2009 17:12:18 GMT

Connection: close



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<er-response id="100001" sub-id="0">

    <payload>

        <error id="100001" type="UNEXPECTED">

            <description>Start tag "payload" was not found in the
xml.</description>

        </error>

    </payload>

</er-response>


Regarding the chunked, I think it's the same problem.
But I'd like to check first this one to not mess around too much.

With regards,

Jaime

Trustin Lee-3 wrote:
> 
> I guess it's a bug.  Could you post the whole HTTP request and
> response so that I can analyze the root cause of the problem?  (Please
> do the same for the previous one related with chunked encoding.)  To
> intercept the HTTP request and response, you could use an existing
> HTTP monitoring tools like:
> 
>     * http://www.fiddlertool.com/fiddler/
> 
> If you are not using Windows, please google 'HTTP debugging proxy.' to
> get one.  Wireshark is also great for this, but it's not specific to
> HTTP.
> 
> — Trustin Lee, http://gleamynode.net/
> 
> 
> 
> On Wed, Jan 14, 2009 at 1:20 AM, jaimemm <jaimemm at gmail.com> wrote:
>>
>> The following error is taking place when receiving XML data in
>> HTTPResponse
>>
>>
>> WARNING: EXCEPTION, please implement
>> test.netty.HttpResponseHandler.exceptionCaught() for proper handling.
>> java.lang.IllegalArgumentException: invalid version format: <?XML
>>        at
>> org.jboss.netty.handler.codec.http.HttpVersion.<init>(HttpVersion.java:68)
>>        at
>> org.jboss.netty.handler.codec.http.HttpVersion.valueOf(HttpVersion.java:53)
>>        at
>> org.jboss.netty.handler.codec.http.HttpResponseDecoder.readInitial(HttpResponseDecoder.java:40)
>>        at
>> org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:80)
>>        at
>> org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:42)
>>        at
>> org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:372)
>>        at
>> org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:345)
>>        at
>> org.jboss.netty.handler.codec.replay.ReplayingDecoder.handleUpstream(ReplayingDecoder.java:308)
>>        at
>> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:293)
>>        at
>> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:280)
>>        at
>> org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:299)
>>        at
>> org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:244)
>>        at
>> org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:161)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>        at java.lang.Thread.run(Thread.java:619)
>> 13-Jan-2009 16:16:52 org.jboss.netty.channel.SimpleChannelHandler
>> WARNING: EXCEPTION, please implement
>> test.netty.HttpResponseHandler.exceptionCaught() for proper handling.
>> java.lang.IllegalArgumentException: Invalid header syntax: <er-response
>> id="100001" sub-id="0">
>>        at
>> org.jboss.netty.handler.codec.http.HttpMessageDecoder.splitHeader(HttpMessageDecoder.java:240)
>>        at
>> org.jboss.netty.handler.codec.http.HttpMessageDecoder.readHeaders(HttpMessageDecoder.java:181)
>>        at
>> org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:83)
>>        at
>> org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:42)
>>        at
>> org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:372)
>>        at
>> org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:345)
>>        at
>> org.jboss.netty.handler.codec.replay.ReplayingDecoder.handleUpstream(ReplayingDecoder.java:308)
>>        at
>> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:293)
>>        at
>> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:280)
>>        at
>> org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:299)
>>        at
>> org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:244)
>>        at
>> org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:161)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>        at java.lang.Thread.run(Thread.java:619)
>> -----------------
>>
>> is it something wrong configured or a bug?
>> --
>> View this message in context:
>> http://n2.nabble.com/Error-receiving-XML-in-HTTPResponse-body-tp2151841p2151841.html
>> Sent from the Netty User Group mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> netty-users mailing list
>> netty-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/netty-users
>>
>>
> 
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Error-receiving-XML-in-HTTPResponse-body-tp2151841p2152202.html
Sent from the Netty User Group mailing list archive at Nabble.com.





More information about the netty-users mailing list