I discovered a couple of interesting issues when using Apache CXF and Maven behind a proxy this week. It started when I sent out a package of stubs in a Maven project I had built to enable developers of integration systems to regenerate there own stubs from the live WSDL. This project uses the wsdl2java tool from Apache CXF to generate some JAX-WS based SOAP stubs from the WSDL hosted on a staging server on the internet....
Whilst working on my Javascript, ExtJS 4 and Apache CXF skills I came across a solution to a problem I encountered getting ExtJS to talk to Apache CXF using JSON.
The basis for this issue revolves around “wrapping” in JSON and two different schools on what is correct way to encode it. As far as I can see there is the more verbose version which Jettison, the default JSON serialiser in Apache CXF produces, then there is the “unwrapped” version which the alternate serialiser Jackson produces....
Configuring logging in Apache CXF can be confusing at first, in my view this is further compounded by Apache Tomcat’s logging architecture.
In my cxf based projects the first step is to use the logging configuration available in 2.2.8 or later. This enables you to configure your logger of choice for the entire CXF stack. Needless to say I really like this feature as I am not a big fan of java....
Recently I have been doing quite a bit of work around Apache CXF, both on the server side and the client side. Over the next few weeks I will post some of the tricks I have learnt.
In this post I will summarise one of the cxf-codegen-plugin options I used to assist me while consuming WCF web services using Apache CXF. When dealing with WCF based services, and indeed any WSDL which uses more than one namespace it is handy knowing how to control name spaces and how these translate into packages in your java stubs....