From 549ef87a8e0eaf059c3e27c87a5ca1ff2a0e53d6 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Wed, 16 May 2018 14:05:15 -0400 Subject: [PATCH] INT-4469: XML Unmarshaller support byte[] payloads JIRA: https://jira.spring.io/browse/INT-4469 --- .../transformer/UnmarshallingTransformer.java | 8 +++++-- .../UnmarshallingTransformerTests.java | 23 ++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/UnmarshallingTransformer.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/UnmarshallingTransformer.java index f4bc8fdc53..d4289f1406 100644 --- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/UnmarshallingTransformer.java +++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/UnmarshallingTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ package org.springframework.integration.xml.transformer; +import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; @@ -110,6 +111,9 @@ public class UnmarshallingTransformer extends AbstractPayloadTransformer("message: " + new String(bytes).trim()); + } + return "hello " + new String(bytes).trim(); + } return null; } + @Override public boolean supports(Class clazz) { return true; }