protected Collection<Attachment> getAttachments() throws MuleException { if (payload instanceof AbstractWrappedMessage) { AbstractWrappedMessage soap = (AbstractWrappedMessage) payload; return soap.getAttachments(); } else { // @TODO: Maybe pass the connector down and use connector exception // instead? throw new DefaultMuleException( CxfMessages.inappropriateMessageTypeForAttachments(payload.getClass().getName())); } }
public CxfMessageAdapter(Message message) throws MuleException { if (message == null) { throw new DefaultMuleException(CxfMessages.unableToConstructAdapterForNullMessage()); } this.payload = message; }