public class WSDLGeneratorUtil {
public static MethodType findOperationFromServiceDesc(String methodName, ServiceDescriptionType serviceDescType)
throws GFacWSDLException {
PortTypeType portType = serviceDescType.getPortType();
if (serviceDescType.getPortType().getMethod().getMethodName().equals(methodName)) {
serviceDescType.getPortType().getMethod();
}
if (isInbuiltOperation(methodName)) {
MethodType builtInOperationType = portType.addNewMethod();
builtInOperationType.setMethodName(methodName);
return builtInOperationType;
}
throw new GFacWSDLException("Method name " + methodName + " not found");