I significantly enhanced the existing SOAPVersion class. I see many code
like:
if( binding.equals( SOAP11 ) ) {
MessageFactory.newInstance(SOAP11);
} else {
MessageFactory.newInstance(SOAP12);
}
... and so on, and also in many places java.lang.String is used to
denote the difference between SOAP 1.1 / 1.2. This is not a good coding
practice.
There were a lot of convenience methods created around those 1.1/1.2
handling, yet since they are defined on a separate class, often people
don't notice that it's there, and ended up coding those by themselves.
I think creating an enum class with helper methods on it makes it easy
to discover such methods, and also improves the type safety.
So I encourage people to use it whenever possible...
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com