return found;
}
private ServiceEndpointMethodMapping getMethodMappingForOperation(final String operationName, final Class serviceEndpointInterface) throws OpenEJBException {
// get mapping for service endpoint interface
final ServiceEndpointInterfaceMapping interfaceMapping = javaWsdlMapping.getServiceEndpointInterfaceMappingMap().get(serviceEndpointInterface.getName());
if (interfaceMapping == null) {
throw new OpenEJBException("No java-wsdl mapping found for the service interface " + serviceEndpointInterface);
}
// match by operation name
for (final ServiceEndpointMethodMapping methodMapping : interfaceMapping.getServiceEndpointMethodMapping()) {
if (operationName.equals(methodMapping.getWsdlOperation())) {
return methodMapping;
}
}
// failed - throw nice exception message
final StringBuffer availOps = new StringBuffer(128);
for (final ServiceEndpointMethodMapping methodMapping : interfaceMapping.getServiceEndpointMethodMapping()) {
if (availOps.length() > 0) availOps.append(",");
availOps.append(methodMapping.getWsdlOperation());
}
throw new OpenEJBException("No method found for operation named '" + operationName + "'. Available operations: " + availOps);
}