*/
public Collection generateSchema() throws SchemaGeneratorException {
Map interfaces = idl.getInterfaces();
if (interfaces==null)
throw new SchemaGeneratorException("No interfaces defined");
if (interfaceName==null)
throw new SchemaGeneratorException("Interface name required");
Interface intf = (Interface) interfaces.get(interfaceName);
/**
* Schema genertaion done in two stage 1. Load all the methods and
* create type for methods parameters (if the parameters are Beans
* then it will create Complex types for those , and if the
* parameters are simple type which decribe in SimpleTypeTable
* nothing will happen) 2. In the next stage for all the methods
* messages and port types will be creteated
*/
if (intf==null)
throw new SchemaGeneratorException("Interface " + interfaceName + " does not exists");
Operation[] operations = intf.getOperations();
// since we do not support overload
HashMap uniqueMethods = new HashMap();
XmlSchemaComplexType methodSchemaType;
XmlSchemaSequence sequence = null;
List processedExs = new ArrayList();
for (int i = 0; i < operations.length; i++) {
Operation operation = operations[i];
String operationName = operation.getName();
if (excludeMethods.contains(operationName)) {
continue;
}
if (uniqueMethods.get(operationName) != null) {
throw new SchemaGeneratorException(
" Sorry we don't support methods overloading !!!! ");
}
if (operation.hasRaises()) {
List extypes = operation.getRaises();