}
} else {
// construct a sequence for wrapped method parameters
SequenceElement seq = new SequenceElement();
ArrayList parms = odef.getParameters();
for (int j = 0; j < parms.size(); j++) {
ValueCustom parm = (ValueCustom)parms.get(j);
String type = parm.getWorkingType();
ElementElement pelem;
if (!typemap.containsKey(type)) {
// add predefined mapping type to known types and require schema import
QName tname = (QName)classtypes.get(type);
if (tname != null) {
typemap.put(type, tname);
imports.add(typeschemas.get(tname));
}
}
pelem = buildValueElement(parm, ptypemap, typeschemas, holder);
seq.getParticleList().add(pelem);
}
// add corresponding schema definition to schema
ComplexTypeElement tdef = new ComplexTypeElement();
tdef.setContentDefinition(seq);
ElementElement elem = new ElementElement();
String wname = odef.getRequestWrapperName();
elem.setName(wname);
elem.setTypeDefinition(tdef);
schema.getTopLevelChildren().add(elem);
rqelem = new QName(sns, wname);
}
// add part definition to message (if present)
if (rqelem != null) {
MessagePart part = new MessagePart("part", rqelem);
rqmsg.getParts().add(part);
def.addNamespace(rqelem.getUri());
}
// generate output message information
Message rsmsg = new Message(odef.getResponseMessageName(), wns);
op.addOutputMessage(rsmsg);
def.addMessage(rsmsg);
ValueCustom rtrn = odef.getReturn();
QName rselem = null;
if (m_generationParameters.isDocLit()) {
// check if return value defined for method
if (!"void".equals(rtrn.getWorkingType())) {
// check for existing element definition matching the return type
rselem = (QName)classelems.get(rtrn.getWorkingType());
if (rselem == null) {
// create new element for return
ElementElement relem = buildValueElement(rtrn, ptypemap, typeschemas, holder);
schema.getTopLevelChildren().add(relem);
rselem = relem.getQName();
} else {
// import and use existing element definition
imports.add(elemschemas.get(rselem));
addSchemaReference(rqelem, elemschemas, holder);
}
}
} else {
// add corresponding schema definition to schema
SequenceElement seq = new SequenceElement();
if (!"void".equals(rtrn.getWorkingType())) {
ElementElement relem = buildValueElement(rtrn, ptypemap, typeschemas, holder);
seq.getParticleList().add(relem);
}
ComplexTypeElement tdef = new ComplexTypeElement();
tdef.setContentDefinition(seq);
ElementElement elem = new ElementElement();
String wname = odef.getResponseWrapperName();