protected void initializeWSDLOperations() {
List<OperationInfo> removes = new ArrayList<OperationInfo>();
Method[] methods = serviceClass.getMethods();
Arrays.sort(methods, new MethodComparator());
InterfaceInfo intf = getInterfaceInfo();
Map<QName, Method> validMethods = new HashMap<QName, Method>();
for (Method m : methods) {
if (isValidMethod(m)) {
QName opName = getOperationName(intf, m);
validMethods.put(opName, m);
}
}
for (OperationInfo o : intf.getOperations()) {
Method selected = null;
for (Map.Entry<QName, Method> m : validMethods.entrySet()) {
QName opName = m.getKey();
if (o.getName().getNamespaceURI().equals(opName.getNamespaceURI())
&& isMatchOperation(o.getName().getLocalPart(), opName.getLocalPart())) {
selected = m.getValue();
break;
}
}
if (selected == null) {
LOG.log(Level.WARNING, "NO_METHOD_FOR_OP", o.getName());
removes.add(o);
} else {
initializeWSDLOperation(intf, o, selected);
}
}
for (OperationInfo op : removes) {
intf.removeOperation(op);
}
// Some of the operations may have switched from unwrapped to wrapped.
// Update the bindings.
for (ServiceInfo service : getService().getServiceInfos()) {