*/
private List generate(List classes, List extras, Map classelems, Map elemschemas, Map classtypes, Map typeschemas,
Collection exists) throws JiBXException, IOException {
// add any service classes not already present in customizations
WsdlCustom wsdlcustom = m_generationParameters.getWsdlCustom();
for (int i = 0; i < classes.size(); i++) {
String sclas = (String)classes.get(i);
if (wsdlcustom.getServiceCustomization(sclas) == null) {
wsdlcustom.addServiceCustomization(sclas);
}
}
// accumulate unmapped data classes used by all service operations
// TODO: throws class handling, with multiple services per WSDL
InsertionOrderedSet abstrs = new InsertionOrderedSet();
InsertionOrderedSet concrs = new InsertionOrderedSet();
ArrayList qnames = new ArrayList();
List services = wsdlcustom.getServices();
boolean doclit = m_generationParameters.isDocLit();
for (Iterator iter = services.iterator(); iter.hasNext();) {
ServiceCustom service = (ServiceCustom)iter.next();
List ops = service.getOperations();
for (Iterator iter1 = ops.iterator(); iter1.hasNext();) {
OperationCustom op = (OperationCustom)iter1.next();
List parms = op.getParameters();
if (doclit && parms.size() > 1) {
System.err.println("Multiple parmameters not allowed for doc/lit: method " + op.getMethodName());
}
for (Iterator iter2 = parms.iterator(); iter2.hasNext();) {
ValueCustom parm = (ValueCustom)iter2.next();
if (doclit) {
accumulateData(parm, classelems, concrs);
} else {
accumulateData(parm, classtypes, abstrs);
}
}
if (doclit) {
accumulateData(op.getReturn(), classelems, concrs);
} else {
accumulateData(op.getReturn(), classtypes, abstrs);
}
ArrayList thrws = op.getThrows();
for (int i = 0; i < thrws.size(); i++) {
// add concrete mapping for data type, if used
ThrowsCustom thrw = (ThrowsCustom)thrws.get(i);
FaultCustom fault = wsdlcustom.forceFaultCustomization(thrw.getType());
if (!concrs.contains(fault.getDataType())) {
concrs.add(fault.getDataType());
qnames.add(new QName(service.getNamespace(), fault.getElementName()));
}
}