MessageHandlingException and MessageDeliveryException now require the failed/undelivered Message as a constructor argument.

This commit is contained in:
Mark Fisher
2008-04-09 00:18:56 +00:00
parent f6756da3c8
commit fec6dec258
153 changed files with 458 additions and 476 deletions

View File

@@ -24,7 +24,7 @@ import javax.xml.transform.TransformerException;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.dom.DOMSource;
import org.springframework.integration.message.MessageHandlingException;
import org.springframework.integration.message.MessagingException;
import org.springframework.ws.client.core.SourceExtractor;
import org.springframework.ws.client.core.WebServiceMessageCallback;
import org.springframework.xml.transform.StringResult;
@@ -63,7 +63,7 @@ public class SimpleWebServiceTargetAdapter extends AbstractWebServiceTargetAdapt
new StringSource((String) requestPayload), requestCallback, result);
return result.toString();
}
throw new MessageHandlingException("Unsupported payload type '" + requestPayload.getClass() +
throw new MessagingException("Unsupported payload type '" + requestPayload.getClass() +
"'. " + this.getClass().getName() + " only supports 'java.lang.String' and '" + Source.class.getName() +
"'. Consider using the '" + MarshallingWebServiceTargetAdapter.class.getName() + "' instead.");
}

View File

@@ -24,7 +24,7 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.integration.MessagingConfigurationException;
import org.springframework.integration.ConfigurationException;
import org.springframework.integration.endpoint.DefaultMessageEndpoint;
import org.springframework.integration.scheduling.Subscription;
import org.springframework.integration.ws.adapter.MarshallingWebServiceTargetAdapter;
@@ -54,10 +54,10 @@ public class WebServiceTargetAdapterParser extends AbstractSingleBeanDefinitionP
String channel = element.getAttribute("channel");
String uri = element.getAttribute("uri");
if (!StringUtils.hasText(channel)) {
throw new MessagingConfigurationException("The 'channel' attribute is required.");
throw new ConfigurationException("The 'channel' attribute is required.");
}
if (!StringUtils.hasText(uri)) {
throw new MessagingConfigurationException("The 'uri' attribute is required.");
throw new ConfigurationException("The 'uri' attribute is required.");
}
String marshallerRef = element.getAttribute("marshaller");
String unmarshallerRef = element.getAttribute("unmarshaller");