* @see ObjectBinding
*/
public class InvokeBinding implements Binding {
public Object parse(Element element, Parse parse, Parser parser) {
InvokeOperation invokeOperation = new InvokeOperation();
if (element.hasAttribute("method")) {
invokeOperation.setMethodName(element.getAttribute("method"));
} else {
parse.addProblem("invoke must have method : "+XmlUtil.toString(element));
}
List<Element> argElements = XmlUtil.elements(element, "arg");
WireParser wireParser = (WireParser) parser;
List<ArgDescriptor> argDescriptors = wireParser.parseArgs(argElements, parse);
invokeOperation.setArgDescriptors(argDescriptors);
return invokeOperation;
}