public static String getNamespaceURI ( Object obj ) { Package pkg = obj . getClass ( ) . getPackage ( ) ; XmlSchema xmlSchemaAnnotation = pkg . getAnnotation ( XmlSchema . class ) ; return xmlSchemaAnnotation . namespace ( ) ; }
Return the namespace URI from the package for the class of the object .