Appendix: Debugging

Setting Test Timeout

Either in the <ConnectorName>TestParent

// Sets global timeout
@Rule
public Timeout globalTimeout = new Timeout(300000);

Or if using Eclipse in Preferences > Java > Installed JREs, edit the JRE and add -Dmule.test.timeoutSecs=300 to the Default VM arguments.

Viewing Inbound and Outbound Messages in CXF

Place the following files into /<connector-project>/src/test/resources folder:

log4j.properties

#default properties to initialise log4j
log4j.rootLogger=INFO, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout= org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern= [%d{MM-dd HH:mm:ss}] %-5p %c{1} [%t]: %m%n

#settings for specific packages
#log4j.logger.org.mule = DEBUG

#CXF is used heavily by Mule for web services
log4j.logger.org.apache.cxf = DEBUG
#log4j.logger.org.apache.jcp = DEBUG
#log4j.logger.org.apache.ws.security = DEBUG
log4j.logger.org.apache.cxf.interceptor.LoggingInInterceptor = DEBUG, console
log4j.logger.org.apache.cxf.interceptor.LoggingOutInterceptor = DEBUG, console

cxf.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:cxf="http://cxf.apache.org/core"
      xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">
   <cxf:bus>
      <cxf:features>
         <cxf:logging/>
      </cxf:features>
   </cxf:bus>
</beans>