Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
still not working; on local debugging, convertBodyTo seems to be a noop
Browse files Browse the repository at this point in the history
going to remote-debug this on target system
#6
  • Loading branch information
metas-ts committed Jan 11, 2020
1 parent 3f2df8f commit 79cab6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -5,6 +5,7 @@
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;

import org.apache.camel.Converter;
import org.apache.camel.Exchange;
Expand Down Expand Up @@ -53,7 +54,7 @@ public Reader toReader(final byte[] buf, final Exchange exchange) throws Unsuppo
@Converter
public Reader toReader(final InputStream is, final Exchange exchange) throws UnsupportedEncodingException
{
String charSetName = "UTF-8";
String charSetName = StandardCharsets.UTF_8.name();
if (exchange != null)
{
String exchangeCharsetName = exchange.getProperty(Exchange.CHARSET_NAME, String.class);
Expand Down
Expand Up @@ -73,6 +73,8 @@ public final void configure()
.log(LoggingLevel.INFO, "EDI: Storing CamelFileName header as property for future use...")
.setProperty(Exchange.FILE_NAME, header(Exchange.FILE_NAME))

.convertBodyTo(String.class, stepComCharsetName)

.setProperty(Exchange.CHARSET_NAME).constant(StandardCharsets.UTF_8.name())
.unmarshal(stepComDataFormat);

Expand Down

0 comments on commit 79cab6d

Please sign in to comment.