* @return Returns XmlSchema.
* @throws Exception
*/
public Collection generateSchema() throws Exception {
JamServiceFactory factory = JamServiceFactory.getInstance();
JamServiceParams jam_service_parms = factory.createServiceParams();
//setting the classLoder
// jam_service_parms.setParentClassLoader(factory.createJamClassLoader(classLoader));
//it can posible to add the classLoader as well
jam_service_parms.addClassLoader(classLoader);
jam_service_parms.includeClass(className);
for (int count = 0; count < getExtraClasses().size(); ++count) {
jam_service_parms.includeClass((String) getExtraClasses().get(count));
}
JamService service = factory.createService(jam_service_parms);
QName extraSchemaTypeName;
JamClassIterator jClassIter = service.getClasses();
//all most all the time the ittr will have only one class in it
while (jClassIter.hasNext()) {
JClass jclass = (JClass) jClassIter.next();