log.debug(" QName " + i + " = " + qNames.get(i));
}
}
for (int pi=0; pi<params.length; pi++) {
if (pi >= 0) {
ParameterDescription pd = params[pi];
if (log.isDebugEnabled()) {
log.debug(" ParameterDescription =" + pd.toString());
log.debug(" original firstIndex = " + firstIndex[pi]);
log.debug(" original lastIndex = " + lastIndex[pi]);
}
firstIndex[pi] = -1; // Reset index
lastIndex[pi] = -1; // Reset index
// Found a parameter that is expected in the body
// Calculate its index by looking for an exact qname match
for (int qi=0; qi<qNames.size(); qi++) {
QName qName = qNames.get(qi);
if (qName.getLocalPart().equals(pd.getPartName())) {
if (qName.getNamespaceURI().equals(pd.getTargetNamespace())) {
if (firstIndex[pi] < 0) {
if(log.isDebugEnabled()) {
log.debug(" set first index to " + qi);
}
firstIndex[pi] = qi;
}
lastIndex[pi] = qi;
}
}
}
// Fallback to searching for just the part name
if (firstIndex[pi] < 0) {
for (int qi=0; qi<qNames.size(); qi++) {
QName qName = qNames.get(qi);
if (qName.getLocalPart().equals(pd.getPartName())) {
if (firstIndex[pi] < 0) {
if(log.isDebugEnabled()) {
log.debug(" fallback: set first index to " + qi);
}
firstIndex[pi] = qi;