;
}
serviceName.setStringValue(serviceQName.getLocalPart());
serviceName.setTargetNamespace(serviceInfo.getObjectNamespace());
PortTypeType pt;
if (serviceMapType.getPortTypeArray() != null
&& serviceMapType.getPortTypeArray().length > 0) {
pt = serviceMapType.getPortTypeArray(0);
} else {
pt = serviceMapType.addNewPortType();
}
// ArrayList<MethodBean> operations = serviceInfo.getOperations();
List<MethodBean> operations = new ArrayList<MethodBean>();
operations.add(serviceInfo.getMethodBean());
for (int i = 0; i < operations.size(); i++) {
MethodBean op = (MethodBean) operations.get(i);
if (op == null) {
throw new GFacSchemaException("Operation can not be Null");
}
MethodType[] methods = pt.getMethodArray();
MethodType method = null;
if (methods != null) {
for (MethodType oldMethod : methods) {
if (op.getMethodName().equals(oldMethod.getMethodName())) {
method = oldMethod;
}
}
}
if (method == null) {
method = pt.addNewMethod();
}
method.setMethodName(op.getMethodName());
method.setMethodDescription(op.getMethodDescription());
ApplicationType appType = method.getApplication();
if (appType == null) {