Tag Archives: java

Camel – Socket Permission Denied using port 0 with Restlets

Restlets offer solid support for ephemeral ports. Apache Camel does a solid job of trying to stop you. Continue reading

CXF – Validating JAX-RS WADL files in unit tests

What’s the best way to stop developers breaking the WADLs generated by CXF for Java-first JAX-RS services? Make breaking the WADLs break the build of course. Continue reading

JBoss Fuse – Deploying JAX-RS services with Fuse 6.2 and Java 8

Depending on the parts of CXF your JAX-RS services utilise, you might have a little OSGi-wrangling on your hands if you want to deploy them to JBoss Fuse 6.2 on Java 1.8
Continue reading

CXF – Missing WADL method parameter element types with JSON JAX-RS services

If you’re using JSON to exchange data with your CXF JAX-RS service clients you might find your out-of-the-box WADL file a little light on detail. Continue reading

CXF – Using interceptors to provide simple, property-based response filters

An example of building a CXF interceptor to provide a lightweight, property driven mechanism for web service consumers to filter response sets to suit their needs. Continue reading

JSoup – Entity exigency

If you’re using JSoup to parse and render HTML documents which could contain a small range of exotic characters you may not like the choice of entity escaping it offers you. Fortunately it’s pretty easy to tweak it to suit your needs. Continue reading

JAXWS – Handling multi-dimensional arrays of interfaces

If you’ve exposed your value objects via interfaces in your Java service classes JAXB is unlikely to play nicely with them. Here we look at using adapters to help it map between interfaces and implementations and in particular getting this to work with multi-dimensional arrays. Continue reading

Java – Compressed serialization

Serialization may be a quick and easy way of persisting a set of Java objects but it isn’t often a very space efficient one. Here we look at using compression with serialization to reduce the footprint of our saved objects and use JUnit Theories to test our mechanism over a range of object sizes. Continue reading

JavaMail – Random NoSuchProviderException errors sending SMTP mail

The appearance of random NoSuchProviderException errors when testing a new application release turns out to be caused by a new Maven dependency’s dependency. Continue reading

Java – Trusting HTTPS server certificates

Switching Java HTTP client code over to HTTPS can go without a hitch when hitting well-established production servers. When it comes to in-house boxes or development and test environments though, hokey server certificates can throw up a few problems. Continue reading