1
2
3
4
5
6
7 package org.mule.module.cxf.employee;
8
9 import org.apache.cxf.interceptor.Fault;
10 import org.apache.cxf.message.Message;
11 import org.apache.cxf.phase.AbstractPhaseInterceptor;
12 import org.apache.cxf.phase.Phase;
13
14 public class AttachmentVerifyInterceptor extends AbstractPhaseInterceptor<Message>
15 {
16 public static boolean HasAttachments;
17
18 public AttachmentVerifyInterceptor()
19 {
20 super(Phase.PRE_STREAM_ENDING);
21 }
22
23 public void handleMessage(Message message) throws Fault
24 {
25 HasAttachments = message.getAttachments() != null && message.getAttachments().size() > 0;
26 }
27
28
29 }
30
31