}
if (!value.startsWith(ProtocolConstants.INBOUND_MAP_START) || !value.endsWith(ProtocolConstants.INBOUND_MAP_END))
{
log.warn("Expected object while converting data for " + paramType.getName() + " in " + data.getContext().getCurrentProperty() + ". Passed: " + value);
throw new ConversionException(paramType, "Data conversion error. See logs for more details.");
}
value = value.substring(1, value.length() - 1);
try
{
// Loop through the properties passed in
Map<String, String> tokens = extractInboundTokens(paramType, value);
if (paramsString == null)
{
return createUsingSetterInjection(paramType, data, tokens);
}
else
{
return createUsingConstructorInjection(paramType, data, tokens);
}
}
catch (InvocationTargetException ex)
{
throw new ConversionException(paramType, ex.getTargetException());
}
catch (ConversionException ex)
{
throw ex;
}
catch (Exception ex)
{
throw new ConversionException(paramType, ex);
}
}