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()));
}
}
}
}
// include extra classes as needing concrete mappings
GlobalCustom global = m_generationParameters.getGlobal();
for (int i = 0; i < extras.size(); i++) {
String type = (String)extras.get(i);
if (!concrs.contains(type)) {
concrs.add(type);
global.addClassCustomization(type);
qnames.add(null);
}
}
// generate bindings for all data classes used
m_bindingGenerator.generateSpecified(qnames, concrs.asList(), abstrs.asList());
// add binding definitions for collections passed or returned in plain doc/lit, and find empty service bindings
Map typemap = new HashMap();
Set unbounduris = new HashSet();
for (Iterator iter = services.iterator(); iter.hasNext();) {
ServiceCustom service = (ServiceCustom)iter.next();
List ops = service.getOperations();
String uri = service.getNamespace();
BindingHolder hold = m_bindingGenerator.addBinding(uri, false);
for (Iterator iter1 = ops.iterator(); iter1.hasNext();) {
OperationCustom op = (OperationCustom)iter1.next();
List parms = op.getParameters();
for (Iterator iter2 = parms.iterator(); iter2.hasNext();) {