camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cwhistler <chadd.whist...@sungard.com>
Subject Re: file move option not working when using split
Date Thu, 21 Jul 2011 11:53:17 GMT
Do you mean to propagate the entire inbound message into the outbound List so
that it is available when this List is returned?

	public List splitBody(Exchange exchange)
	{
		String fileName = (String)
exchange.getIn().getHeader(Exchange.FILE_NAME_ONLY);
		log.info("Processing file - " + fileName);
		BufferedReader inputReader =
exchange.getIn().getBody(BufferedReader.class);
		StringBuffer sb = new StringBuffer();
		List messages = new ArrayList();
                           *messages.add(exchange.getIn());*
                           . . . .
              }

or do you mean to add all of the headers from the inbound message to each of
the new messages that I am creating and putting in the list?

	private Message createOutput(*Exchange exchange*, String fileName, String
participant, StringBuffer sb)
	{
		Message message = new DefaultMessage();
		message.setBody(sb.toString());
		*message.setHeaders(exchange.getIn().getHeaders());*
		message.setHeader(Exchange.FILE_NAME, fileName + "." + participant);
		return message;
	}


--
View this message in context: http://camel.465427.n5.nabble.com/file-move-option-not-working-when-using-split-tp4616425p4619103.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message