We need an independent compilation layer of the sources generated by the JBossWS tools. The reason is basically that JBossWS-CXF tools delegate to the underlying Apache CXF implementation, which uses Javac from the current JDK to compile generated source. The problem raises when running in-container: on AS 7 series, the java.endorsed.dirs sys prop is not set and the JAXWS API level is controlled through JBoss Modules. The Javac compiler retrieved by Apache CXF is not aware of modules and ends up using the JAXWS API from the current JDK. On JDK6 this leads to a compilation issue, given AS 7 already ships with JAXWS 2.2, so the generated sources default to 2.2 level. JAXWS 2.2 is included in JDK starting from JDK 7. The minor api addition to javax.xml.Service (from 2.1 to 2.2) prevents 2.2 level sources from compiling using JDK6.