cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Barker <>
Subject Truncated XML
Date Mon, 08 Nov 2004 14:06:06 GMT

(following up from the posting XML from a java app using compression)

I have refined this and now view the output with the following sitemap
    <map:match pattern="midascompressed.xml">
        <map:read src="module:request:inputStream"/>
        <map:serialize type="text"/>

I now see that the XML that is fed into Cocoon (as trapped by tcpmon) is
actually truncated and Cocoon doesn't get the whole XML fragment
as the output is
<OpenPortalRequest xmlns="" 
xmlns:xsi="">    <Requests>    
    <Request>            <TimeWindow>                
</TimeWindow>            <DataDescript

so cut off mid element!!

Anyone else seen this, or have a solution?

Many thanks,


Norman Barker wrote:

> Hi,
> I have set up a configuration as follows;
> I post data to Cocoon in compressed format, Apache Server (in front of 
> Cocoon) then decompresses the compressed XML before passing this onto
> Cocoon which at the moment just has a simple stream generator as follows
>    <map:match pattern="midascompressed.xml">
>        <map:generate type="stream"/>
>        <map:serialize type="xml"/>
>    </map:match>
> I put tcpmon in between Apache and Cocoon to see what is going on and 
> the XML is being inflated as the dump belows shows.
> However Cocoon reports XML document structures must start and end 
> within the same entity!  Has anyone done this, got any ideas
> as to why mine is failing?
> POST /cocoon/midascompressed.xml HTTP/1.1
> Host:
> Content-Encoding: gzip
> Content-Type: application/xml
> Content-Length: 336
> User-Agent: Java/1.4.2_04
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> Max-Forwards: 10
> X-Forwarded-For:
> X-Forwarded-Host: localhost
> X-Forwarded-Server:
> <OpenPortalRequest xmlns="" 
> xmlns:xsi="">    
> <Requests>       <Request>            <TimeWindow>                <!--

> CCYY-MM-DDThh:mm:ss  -->                
> <StartDateTime>2004-10-01T11:00:00</StartDateTime>                
> <EndDateTime>2004-10-10T11:00:00</EndDateTime>            
> </TimeWindow>            <!-- GUID is the name of the layer in the WFS 
> and WMS -->            <DataDescriptorGUID GUID="weather"/>            
> <Area>                <StartLatitude>49.850</StartLatitude>       
>    <StartLongitude>-1.173</StartLongitude>                
> <EndLatitude>50.350</EndLatitude>                
> <EndLongitude>1.5074</EndLongitude>            </Area>        
> </Request>    </Requests></OpenPortalRequest>
> Many thanks,
> Norman

Norman Barker
Software Engineer
ComSine Ltd
Tel: +44 (0)1483 457121
*Please Note:*
This text is confidential. If you are not the named addressee, it could be unlawful for you
to read, copy, distribute, disclose or use the information contained herewith. If you are
not the intended recipient please telephone +44(0)1483 457121.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message