Unmarshal ZIP w/ error handling in Camel 3.x

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Unmarshal ZIP w/ error handling in Camel 3.x

Gerald Kallas - mailbox.org
Dear community,

I've following route

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
        <camelContext xmlns="http://camel.apache.org/schema/blueprint">
                <route>
                        <from uri="file:/var/casisp/files/in?include=.*\.zip" />
                        <unmarshal><zipfile /></unmarshal>
                        <log message="body: ${in.body}" />
                        <to uri="file:/var/casisp/files/out" />
                </route>
        </camelContext>
</blueprint>

When I'm sending a corrupted ZIP file to this route I'd expect a Camel runtime error. This won't happen, I'm only getting an empty body.

Do I miss something?

Best
- Gerald
Reply | Threaded
Open this post in threaded view
|

Re: Unmarshal ZIP w/ error handling in Camel 3.x

Claus Ibsen-2
Hi

Okay its a bit weird as I would assume the zip api would throw an
exception. Can you create a JIRA

On Tue, Mar 10, 2020 at 9:17 PM Gerald Kallas <[hidden email]> wrote:

>
> Dear community,
>
> I've following route
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
>         <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>                 <route>
>                         <from uri="file:/var/casisp/files/in?include=.*\.zip" />
>                         <unmarshal><zipfile /></unmarshal>
>                         <log message="body: ${in.body}" />
>                         <to uri="file:/var/casisp/files/out" />
>                 </route>
>         </camelContext>
> </blueprint>
>
> When I'm sending a corrupted ZIP file to this route I'd expect a Camel runtime error. This won't happen, I'm only getting an empty body.
>
> Do I miss something?
>
> Best
> - Gerald



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2