-
Bug
-
Resolution: Done
-
Major
-
jbossws-1.0.0, jbossws-1.0.1
-
None
The class ToolsUtils contains a method getJavaPackageName(String) to convert a namespace into a package name, this has been implemented according to section D.5 of the JAXB specification. There are a few use cases not correctly handled so code generated by wstools is not in the package users are expecting: -
com is not recognised as a top level package name so if it is at the end of the namespace it is dropped.
The 2 letter country codes are not checked.
Any component of the namespace that is a reserved keyword should have an underscore appended
The example 'http://www.acme.com/go/espeak.xsd' in the JAXB spec is incorectly converted to 'acme.com.go.espeak' when it should be 'com.acme.go.espeak'