// Verify we have the right number of args for this method
Class[] methodParamTypes = method.getParameterTypes();
List inputParts = input.getOrderedParts(null);
if (methodParamTypes.length != inputParts.size()) {
throw new DeploymentException("mismatch in parameter counts: method has " + methodParamTypes.length + " whereas the input message has " + inputParts.size());
}
// Map the input parts to method args
int i = 0;
for (Iterator parts = inputParts.iterator(); parts.hasNext();) {
Part part = (Part) parts.next();
String partName = part.getName();
QName name = new QName("", partName);
byte mode = ParameterDesc.IN;
QName typeQName = part.getTypeName() == null ? part.getElementName() : part.getTypeName();
Class javaClass = methodParamTypes[i++];
//lightweight mapping has no parts in headers, so inHeader and outHeader are false
ParameterDesc parameter = new ParameterDesc(name, mode, typeQName, javaClass, false, false);
operationDesc.addParameter(parameter);
}
// Can't have multiple return values
if (output != null && output.getParts().size() > 1) {
throw new DeploymentException("Lightweight mapping has at most one part in the (optional) output message, not: " + output.getParts().size());
}
// Map the return message, if there is one
if (output != null && output.getParts().size() == 1) {
Part part = (Part) output.getParts().values().iterator().next();