}
Method javaMethod = method.getJavaMethod();
Object [] arguments = null;
Object targetObject = this.getTheImplementationObject(inMessage);
DeserializationContext dserContext = new DeserializationContext();
// Run each argument (sub-element) through the appropriate deser
Iterator args = rpcElement.getChildElements();
Map elementCounts = new HashMap();
while (args.hasNext()) {
OMElement arg = (OMElement) args.next();
QName qname = arg.getQName();
RPCParameter param = method.getParameter(qname);
if (param == null) {
// unknown parameter. Fault or continue depending on
// strictness configuration.
continue;
}
Integer count = (Integer)elementCounts.get(qname);
if (count == null) count = new Integer(0);
elementCounts.put(qname, new Integer(count.intValue() + 1));
Deserializer dser = param.getDeserializer(count.intValue());
// Got a recognized param, so feed this through the deserializer
try {
dserContext.deserialize(arg.getXMLStreamReader(), dser);
} catch (Exception e) {
throw AxisFault.makeFault(e);
}
}
// OK, now we're done with the children. If this is SOAP 1.2, we're
// finished. If it's SOAP 1.1, there may be multirefs which still
// need to be deserialized after the RPC element.
if (dserContext.isIncomplete()) {
try {
dserContext.processRest(rpcElement);
} catch (Exception e) {
throw AxisFault.makeFault(e);
}
if (dserContext.isIncomplete()) {
throw new AxisFault("Unresolved multirefs!");
}
}
arguments = new Object [method.getNumInParams()];