INT-993 unwrapping Exceptions for inbound Web Service gateways
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2010 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.
|
||||
@@ -109,7 +109,16 @@ public class MarshallingWebServiceInboundGateway extends AbstractMarshallingPayl
|
||||
|
||||
@Override
|
||||
protected Object invokeInternal(Object requestObject) throws Exception {
|
||||
return this.gatewayDelegate.sendAndReceive(requestObject);
|
||||
try {
|
||||
return this.gatewayDelegate.sendAndReceive(requestObject);
|
||||
}
|
||||
catch (Exception e) {
|
||||
while (e.getClass().getName().startsWith("org.springframework") &&
|
||||
e.getCause() instanceof Exception) {
|
||||
e = (Exception) e.getCause();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -55,6 +55,19 @@ public class SimpleWebServiceInboundGateway extends SimpleMessagingGateway imple
|
||||
}
|
||||
|
||||
public void invoke(MessageContext messageContext) throws Exception {
|
||||
try {
|
||||
this.doInvoke(messageContext);
|
||||
}
|
||||
catch (Exception e) {
|
||||
while (e.getClass().getName().startsWith("org.springframework") &&
|
||||
e.getCause() instanceof Exception) {
|
||||
e = (Exception) e.getCause();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private void doInvoke(MessageContext messageContext) throws Exception {
|
||||
Assert.notNull(messageContext,"'messageContext' is required; it must not be null.");
|
||||
WebServiceMessage request = messageContext.getRequest();
|
||||
Assert.notNull(request, "Invalid message context: request was null.");
|
||||
|
||||
Reference in New Issue
Block a user