This post shows how to truncate a table in MySQL before DbUnit loads data via @DatabaseSetup. Truncating the tables in the @Before method does not work because DBUnit loads the data first via @DatabaseSetup before delegating calls to a @Before
Spring Boot Upload Multiple Files From Angular
This post shows working code fragments that upload files from a web browser.
Kotlin – SOAP Web Service Client Example
This post shows how to consume a SOAP Web Service using a client application in Kotlin. Although we need Java, we code everything in Kotlin. Create a SOAP Web Service in Kotlin Before creating a SOAP Web Service in Kotlin,
Spring Boot – How to unit test RESTful API URLs
This post demonstrates how to unit test RESTful API URLs using Spring Boot 1.5.10RELEASE. We basically just want to ensure the list of URLs still work and match what has been documented per specification.
Log Unencrypted SoapFault Messages in Apache CXF
This post shows how to log unencrypted SoapFault messages from Apache CXF in client applications. These applications use WS-Security for encryption and decryption. Note that this write-up assumes the reader is familiar with the more advanced stuff in SOAP-based web
WSDL files using cxf-codegen-plugin
There are many ways to generate Java classes from WSDL files – one of them is using the cxf-codegen-plugin, which comes from the Apache Maven CXF. Note that this post will not work with the JDK version beyond 1.8. (See
Validate XML against an XSD that imports other XSDs
This post demonstrates how to validate XML against XSD that imports other XSDs. This is different from validating against multiple independent XSDs.
How To Validate XML String against XSD Without Writing To A File
This post shows how to validate XML string data against XSD files in Java. Most of the time, we work directly with XML files instead of string format. We point to an XML file and validate it against XSDs. However,
Add external resource directories to jar using build-helper-maven-plugin
This post demonstrates how to add directories that contain resources needed by an application using build-helper-maven-plugin via Maven.
Easy Reflection using Spring ReflectionTestUtils
This post demonstrates how to get and set instance variables and invoke methods via the Reflection API using Spring ReflectionTestUtils. There are key reasons to do things via Reflection: 1) test non-public methods (not recommended, though), and 2) inaccessible instance variables (to mock).