Hi, I'm trying to figure out how to get the number of input and output parameters using cxf. I had managed to do this using xfire, but since upgrading I haven't been able to twig this one. Been trying combinations of this:
ServiceInfo model =client.getEndpoint().getService().getServiceInfos().get(0); InterfaceInfo interfaceInfo = model.getInterface(); Collection<OperationInfo> operationInfos2 = interfaceInfo.getOperations(); OperationInfo toCall = null; for (OperationInfo operationInfo:operationInfos2){ if (operationInfo.getName().getLocalPart().equals(methodName)){ toCall = operationInfo; break; } } List parts = toCall.getInput().getMessageParts(); serviceInfo.put("input",new Integer(parts.size())); logger.info("Number of input parameters: " + parts.size()); List outputParts = toCall.getOutput().getMessageParts(); serviceInfo.put("output",new Integer(outputParts.size())); logger.info("Number of ouput parameters: " + outputParts.size()); and this: Collection<BindingOperationInfo> operationInfos = client.getEndpoint().getBinding().getBindingInfo().getOperations(); BindingOperationInfo opToCall = null; for(BindingOperationInfo oi: operationInfos) { if (oi.getName().getLocalPart().equals(methodName)) { opToCall = oi; } } parts = opToCall.getInput().getMessageParts(); serviceInfo.put("input",new Integer(parts.size())); logger.info("Number of input parameters: " + parts.size()); outputParts = opToCall.getOutput().getMessageParts(); serviceInfo.put("output",new Integer(outputParts.size())); logger.info("Number of ouput parameters: " + outputParts.size()); but it always seems to through back 1 and 1 as input and ouptput. Hope you can help, thanks. Marty -- View this message in context: http://www.nabble.com/finding-the-number-of-input-output-parameters-using-dynamic-client.-tp15738768p15738768.html Sent from the cxf-user mailing list archive at Nabble.com.