Skip to content

Instantly share code, notes, and snippets.

View stephan-landers's full-sized avatar

stephan-landers

View GitHub Profile
// Replicates the belongs() method used in Mule's SuccessStatusValidator
def belongs(values, value) {
var intValue = Integer.parseInt(value);
var valueParts = values.toString().split(','); //values.split sometimes fails. Strange...
var valuePart;
var limits;
var code;
var lower;
var upper;
var i;
public class HttpRequestExceptionInterceptor {
/** Flow variable name for transferring the outside event session to inside the enricher */
private static final String OUTSIDE_EVENT_SESSION =
"_HttpRequestExceptionInterceptor_outsideEventSession";
/** Session variable name for the MuleMessage on an exception */
private String lastErrorMessageVarName = "lastHttpError";
public void setLastErrorMessageVarName(final String name) {
this.lastErrorMessageVarName = name;
}
[...]
<spring:beans>
[...]
<spring:bean
id="httpRequestExceptionInterceptor"
class="com.ricston.mule.interceptors.HttpRequestExceptionInterceptor">
<spring:property name="lastErrorMessageVarName" value="lastHttpError"/>
</spring:bean>
<aop:config>
<aop:aspect
@stephan-landers
stephan-landers / pom.xml
Created August 26, 2019 10:27
Adding JSONAssert dependency
[...]
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>1.5.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>