شركة التطبيقات المتكاملة لتصميم النظم البرمجية الخاصة

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » Ims

Public general use code classes and xml files that we've compiled and used over the years:

Optical Fiber Network Management Intranet Portal (OFN) client support class for Nokia's Next Generation Network (NGN) client model.

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.IO;
   4:  using System.Net;
   5:  using System.Xml;
   6:   
   7:  namespace Ia.Ngn.Cl.Model.Client.Nokia
   8:  {
   9:      ////////////////////////////////////////////////////////////////////////////
  10:   
  11:      /// <summary publish="true">
  12:      /// Optical Fiber Network Management Intranet Portal (OFN) client support class for Nokia's Next Generation Network (NGN) client model.
  13:      /// </summary>
  14:      /// 
  15:      /// <remarks> 
  16:      /// Copyright © 2014-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  17:      ///
  18:      /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
  19:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  20:      ///
  21:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  22:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  23:      /// 
  24:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  25:      /// 
  26:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  27:      /// </remarks> 
  28:      public class Ims
  29:      {
  30:          private static bool success;
  31:          private static string sessionId, commandInLower, requestId, switchName;
  32:   
  33:          ////////////////////////////////////////////////////////////////////////////
  34:   
  35:          /// <summary>
  36:          /// 1360 COM WebAPI User Guide
  37:          /// </summary>
  38:          public enum ResultCode
  39:          {
  40:              Successful = 0, // added by me
  41:              SuccessfulButNoParameters = 100000, // added by me
  42:              DocumentElementIsNull = 100001, // added by me
  43:              Null = 100002, // added by me
  44:              MaximumCombinedNumberOfAgcfGatewayRecordsInAnyMgcIpAndMgcSecondaryIpPairIsExceeded = 100003, // added by me
  45:              PLX_SERVICE_NO_CONNECTION_TO_SWITCH = 1,
  46:              PLX_SERVICE_INVALID_OBJECT_ID = 2,
  47:              PLX_SERVICE_CONNECT_FAILURE = 3,
  48:              PLX_SERVICE_OBJECT_DOES_NOT_EXIST = 4,
  49:              PLX_NE_RESPONSE_FAILURE = 5,
  50:              PLX_INVALID_OPERATION = 6,
  51:              PLX_INVALID_TID = 7,
  52:              PLX_SWITCH_CONNECT_FAILED = 8,
  53:              PLX_SWITCH_NOT_MANAGED = 9,
  54:              PLX_SWITCH_NO_ACTIVE_CONNECTION = 10,
  55:              PLX_INVALID_TL1_META_PROCESSING = 11,
  56:              PLX_SWITCH_VERSION_MISMATCH = 13,
  57:              PLX_INVALID_REGULAR_EXPRESSION = 14,
  58:              PLX_INVALID_RANGE = 15,
  59:              PLX_FILE_IO_ERROR = 17,
  60:              PLX_XML_ERROR = 18,
  61:              PLX_TRANSIENT_STATE = 19,
  62:              PLX_UNABLE_TO_PERFORM_OPERATION = 21,
  63:              PLX_MAX_CONFIGURATION_EXCEEDED = 22,
  64:              PLX_NOT_SUPPORTED = 23,
  65:              PLX_REQ_PARAMETER_NOT_SET = 24,
  66:              PLX_CONGESTION_CONTROL_REQUEST_TIMEOUT = 26,
  67:              PLX_CONGESTION_CONTROL_CONGESTION_DETECTED = 27,
  68:              PLX_DB_REQUEST_FAILURE = 10001,
  69:              PLX_DB_LOGIN_FAILURE = 10002,
  70:              PLX_USER_PRIV_VIOLATION = 10202,
  71:              PLX_INVALID_IP = 20002,
  72:              PLX_INVALID_NETWORK_IP = 20003,
  73:              PLX_DUPLICATE_NAME = 20006,
  74:              PLX_INVALID_PORT_ID = 20008,
  75:              PLX_UNABLE_TO_ADD_DUPLICATE = 20011,
  76:              PLX_UNABLE_TO_DELETE_CHILDREN_EXIST = 20012,
  77:              PLX_MUST_DELETE_ACL_FIRST = 20013,
  78:              PLX_FAILURE = 20014,
  79:              PLX_SYNC_FAILURE = 20015,
  80:              PLX_OE_NOT_SUPPORTED = 20016,
  81:              PLX_INVALID_CHARS_IN_NAME = 20017,
  82:              PLX_SWITCH_EM_USERNAME_INVALID_CHARS = 20108,
  83:              PLX_SWITCH_EM_PASSWORD_INVALID_CHARS = 20110,
  84:              PLX_SWITCH_CANNOT_MODIFY_NAME = 20121,
  85:              PLX_ROUTE_INVALID_NAME_LEN = 20804,
  86:              PLX_ROUTE_INVALID_NAME_CHARS = 20805,
  87:              PLX_ROUTE_INVALID_ROUTE_ID = 20806,
  88:              PLX_ROUTE_INVALID_ROUTE_PRIORITY = 20807,
  89:              PLX_NUMBER_INVALID_NPA = 21901,
  90:              PLX_NUMBER_INVALID_NXX = 21902,
  91:              PLX_INVALID_SUBSCRIBER_ID = 22200,
  92:              PLX_INVALID_SUBSCRIBER_PIC_CODE = 22201,
  93:              PLX_INVALID_SUBSCRIBER_STATUS = 22204,
  94:              WEB_API_FAILURE = 30000,
  95:              SESSION_INVALID = 30001,
  96:              SESSION_TIMED_OUT = 30002,
  97:              REQUEST_TIMED_OUT = 30003,
  98:              PLX_CTS_UNKNOWN_ERROR = 50000,
  99:              PLX_CTS_ERROR_DBUNAVAIL = 50001,
 100:              PLX_CTS_ERROR_DBERROR = 50002,
 101:              PLX_CTS_ERROR_DATAINVALID = 50003,
 102:              PLX_CTS_ERROR_DATAREPLICATION = 50004,
 103:              PLX_CTS_ERROR_NODATAFOUND = 50005,
 104:              PLX_CTS_ERROR_UNAUTHORIZED = 50006,
 105:              PLX_CTS_ERROR_RETRYLATER = 50007,
 106:              PLX_CTS_ERROR_OVERLOAD = 50008,
 107:              PLX_CTS_ERROR_DUPLICATEKEY = 50009,
 108:              PLX_CTS_ERROR_VERSIONMISMATCH = 50010,
 109:              PLX_CTS_ERROR_UPDATELOGOVERRUN = 50011,
 110:              PLX_CTS_ERROR_UNEXPECTEDSTATE = 50012
 111:          }
 112:   
 113:          ////////////////////////////////////////////////////////////////////////////
 114:   
 115:          /// <summary>
 116:          ///
 117:          /// </summary>
 118:          public Ims()
 119:          {
 120:              // below: trust all certificates
 121:              // below: see http://stackoverflow.com/questions/2859790/the-request-was-aborted-could-not-create-ssl-tls-secure-channel
 122:   
 123:              System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true);
 124:              //ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
 125:   
 126:              System.Net.ServicePointManager.Expect100Continue = true;
 127:              //System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
 128:              //System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
 129:              System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
 130:          }
 131:   
 132:          ////////////////////////////////////////////////////////////////////////////
 133:   
 134:          /// <summary>
 135:          ///
 136:          /// </summary>
 137:          public string SessionId
 138:          {
 139:              get { return sessionId; }
 140:          }
 141:   
 142:          ////////////////////////////////////////////////////////////////////////////
 143:   
 144:          /// <summary>
 145:          ///
 146:          /// </summary>
 147:          public void ActUser(out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 148:          {
 149:              XmlDocument soapResultEnvelopeXmlDocument;
 150:   
 151:              SendSoapRequestAndReadResponse(ActUserSoapEnvelopeXml(sessionId), out soapResultEnvelopeXmlDocument);
 152:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 153:          }
 154:   
 155:          ////////////////////////////////////////////////////////////////////////////
 156:   
 157:          /// <summary>
 158:          ///
 159:          /// </summary>
 160:          public void CancUser(out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 161:          {
 162:              XmlDocument soapResultEnvelopeXmlDocument;
 163:   
 164:              SendSoapRequestAndReadResponse(CancUserSoapEnvelopeXml(sessionId), out soapResultEnvelopeXmlDocument);
 165:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 166:          }
 167:   
 168:          /*
 169:          ////////////////////////////////////////////////////////////////////////////
 170:          ////////////////////////////////////////////////////////////////////////////
 171:  
 172:          /// <summary>
 173:          ///
 174:          /// </summary>
 175:          public void EntNgfsAgcfGatewayRecordV2(int gwId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 176:          {
 177:              int tableId;
 178:              List<Dictionary<string, string>> parameterDictionaryList;
 179:              XmlDocument soapResultEnvelopeXmlDocument;
 180:  
 181:              tableId = Ia.Ngn.Cl.Model.Business.Nokia.AgcfGatewayTable.NgfsAgcfGatewayTableAid;
 182:  
 183:              SendSoapRequestAndReadResponse(EntNgcfAgcfGatewayRecordV2SoapEnvelopeXml(tableId, gwId, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 184:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 185:          }
 186:          */
 187:   
 188:          ////////////////////////////////////////////////////////////////////////////
 189:   
 190:          /// <summary>
 191:          ///
 192:          /// </summary>
 193:          public Ia.Ngn.Cl.Model.Nokia.AgcfGatewayRecord RtrvNgfsAgcfGatewayRecordV2(int gwId, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 194:          {
 195:              XmlDocument soapResultEnvelopeXmlDocument;
 196:   
 197:              return RtrvNgfsAgcfGatewayRecordV2(gwId, out soapResultEnvelopeXmlDocument, out resultCode);
 198:          }
 199:   
 200:          ////////////////////////////////////////////////////////////////////////////
 201:   
 202:          /// <summary>
 203:          ///
 204:          /// </summary>
 205:          public Ia.Ngn.Cl.Model.Nokia.AgcfGatewayRecord RtrvNgfsAgcfGatewayRecordV2(int gwId, out XmlDocument soapResultEnvelopeXmlDocument, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 206:          {
 207:              int tableId;
 208:              List<Dictionary<string, string>> parameterDictionaryList;
 209:              Ia.Ngn.Cl.Model.Nokia.AgcfGatewayRecord agcfGatewayRecord;
 210:   
 211:              tableId = Ia.Ngn.Cl.Model.Business.Nokia.AgcfGatewayTable.NgfsAgcfGatewayTableAid;
 212:   
 213:              SendSoapRequestAndReadResponse(RtrvNgcfAgcfGatewayRecordV2SoapEnvelopeXml(tableId, gwId, sessionId), out soapResultEnvelopeXmlDocument);
 214:   
 215:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 216:   
 217:              if (resultCode == Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful)
 218:              {
 219:                  agcfGatewayRecord = Ia.Ngn.Cl.Model.Business.Nokia.AgcfGatewayRecord.ParseFromDictionary(parameterDictionaryList[0]);
 220:              }
 221:              else agcfGatewayRecord = null;
 222:   
 223:              return agcfGatewayRecord;
 224:          }
 225:   
 226:          ////////////////////////////////////////////////////////////////////////////
 227:   
 228:          /// <summary>
 229:          ///
 230:          /// </summary>
 231:          public Ia.Ngn.Cl.Model.Nokia.AgcfGatewayRecordTemp RtrvNgfsAgcfGatewayRecordFromSkbV2(int gwId, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 232:          {
 233:              XmlDocument soapResultEnvelopeXmlDocument;
 234:   
 235:              return RtrvNgfsAgcfGatewayRecordFromSkbV2(gwId, out soapResultEnvelopeXmlDocument, out resultCode);
 236:          }
 237:   
 238:          ////////////////////////////////////////////////////////////////////////////
 239:   
 240:          /// <summary>
 241:          /// Read from SKB side
 242:          /// </summary>
 243:          public Ia.Ngn.Cl.Model.Nokia.AgcfGatewayRecordTemp RtrvNgfsAgcfGatewayRecordFromSkbV2(int gwId, out XmlDocument soapResultEnvelopeXmlDocument, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 244:          {
 245:              int tableId;
 246:              List<Dictionary<string, string>> parameterDictionaryList;
 247:              Ia.Ngn.Cl.Model.Nokia.AgcfGatewayRecordTemp agcfGatewayRecord;
 248:   
 249:              tableId = Ia.Ngn.Cl.Model.Business.Nokia.AgcfGatewayTable.NgfsAgcfGatewayTableAid;
 250:   
 251:              SendSoapRequestAndReadResponse(RtrvNgcfAgcfGatewayRecordFromSkbV2SoapEnvelopeXml(tableId, gwId, sessionId), out soapResultEnvelopeXmlDocument);
 252:   
 253:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 254:   
 255:              if (resultCode == Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful)
 256:              {
 257:                  agcfGatewayRecord = Ia.Ngn.Cl.Model.Business.Nokia.AgcfGatewayRecordTemp.ParseFromDictionary(parameterDictionaryList[0]);
 258:              }
 259:              else agcfGatewayRecord = null;
 260:   
 261:              return agcfGatewayRecord;
 262:          }
 263:   
 264:          ////////////////////////////////////////////////////////////////////////////
 265:   
 266:          /// <summary>
 267:          ///
 268:          /// </summary>
 269:          public void DltNgfsAgcfGatewayRecordV2(int gwId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 270:          {
 271:              int tableId;
 272:              List<Dictionary<string, string>> parameterDictionaryList;
 273:              XmlDocument soapResultEnvelopeXmlDocument;
 274:   
 275:              tableId = Ia.Ngn.Cl.Model.Business.Nokia.AgcfGatewayTable.NgfsAgcfGatewayTableAid;
 276:   
 277:              SendSoapRequestAndReadResponse(DltNgcfAgcfGatewayRecordV2SoapEnvelopeXml(tableId, gwId, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 278:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 279:          }
 280:   
 281:          ////////////////////////////////////////////////////////////////////////////
 282:          ////////////////////////////////////////////////////////////////////////////
 283:   
 284:          /// <summary>
 285:          ///
 286:          /// </summary>
 287:          public void EntNgfsAgcfGwCombinedRecV2(int gwId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont ont, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 288:          {
 289:              bool isExceeded;
 290:              int tableId;
 291:              List<Dictionary<string, string>> parameterDictionaryList;
 292:              XmlDocument soapResultEnvelopeXmlDocument;
 293:   
 294:              // check if the number of AGCF gateway records for the MGC primary and secondary IP pair does not exceed the maximum recommended by Nokia
 295:   
 296:              isExceeded = Ia.Ngn.Cl.Model.Business.Nokia.Ims.MaximumCombinedNumberOfAgcfGatewayRecordsInAnyMgcIpAndMgcSecondaryIpPairIsExceeded(ont.MgcIp);
 297:   
 298:              if (!isExceeded)
 299:              {
 300:                  tableId = Ia.Ngn.Cl.Model.Business.Nokia.AgcfGatewayTable.NgfsAgcfGatewayTableAid;
 301:   
 302:                  SendSoapRequestAndReadResponse(EntNgfsAgcfGwCombinedRecV2SoapEnvelopeXml(tableId, gwId, ont, sessionId), out soapResultEnvelopeXmlDocument);
 303:                  ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 304:              }
 305:              else
 306:              {
 307:                  resultCode = Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.MaximumCombinedNumberOfAgcfGatewayRecordsInAnyMgcIpAndMgcSecondaryIpPairIsExceeded;
 308:              }
 309:          }
 310:   
 311:          ////////////////////////////////////////////////////////////////////////////
 312:   
 313:          /// <summary>
 314:          ///
 315:          /// </summary>
 316:          public void EdNgfsAgcfGatewayRecordV2_MateExternalIPAddr(int gwId, string mateExternalIPAddr, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 317:          {
 318:              int tableId;
 319:              List<Dictionary<string, string>> parameterDictionaryList;
 320:              XmlDocument soapResultEnvelopeXmlDocument;
 321:   
 322:              tableId = Ia.Ngn.Cl.Model.Business.Nokia.AgcfGatewayTable.NgfsAgcfGatewayTableAid;
 323:   
 324:              SendSoapRequestAndReadResponse(EdNgfsAgcfGatewayRecordV2_MateExternalIPAddrSoapEnvelopeXml(tableId, gwId, mateExternalIPAddr, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 325:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 326:          }
 327:   
 328:          ////////////////////////////////////////////////////////////////////////////
 329:   
 330:          /// <summary>
 331:          ///
 332:          /// </summary>
 333:          public void EdNgfsAgcfGatewayRecordV2_MateSite(int gwId, int mateSite, string primarySwitch, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 334:          {
 335:              int tableId;
 336:              List<Dictionary<string, string>> parameterDictionaryList;
 337:              XmlDocument soapResultEnvelopeXmlDocument;
 338:   
 339:              tableId = Ia.Ngn.Cl.Model.Business.Nokia.AgcfGatewayTable.NgfsAgcfGatewayTableAid;
 340:   
 341:              SendSoapRequestAndReadResponse(EdNgfsAgcfGatewayRecordV2_MateSiteSoapEnvelopeXml(tableId, gwId, mateSite, primarySwitch, sessionId), out soapResultEnvelopeXmlDocument);
 342:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 343:          }
 344:   
 345:          ////////////////////////////////////////////////////////////////////////////
 346:   
 347:          /// <summary>
 348:          ///
 349:          /// </summary>
 350:          public void EdNgfsAgcfGatewayRecordV2_IP1(int gwId, string ip1, string primarySwitch, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 351:          {
 352:              int tableId;
 353:              List<Dictionary<string, string>> parameterDictionaryList;
 354:              XmlDocument soapResultEnvelopeXmlDocument;
 355:   
 356:              tableId = Ia.Ngn.Cl.Model.Business.Nokia.AgcfGatewayTable.NgfsAgcfGatewayTableAid;
 357:   
 358:              SendSoapRequestAndReadResponse(EdNgfsAgcfGatewayRecordV2_IP1SoapEnvelopeXml(tableId, gwId, ip1, primarySwitch, sessionId), out soapResultEnvelopeXmlDocument);
 359:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 360:          }
 361:   
 362:          ////////////////////////////////////////////////////////////////////////////
 363:   
 364:          /// <summary>
 365:          ///
 366:          /// </summary>
 367:          public void DltNgfsAgcfGwCombinedRecV2(int gwId, string primarySwitch, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 368:          {
 369:              XmlDocument soapResultEnvelopeXmlDocument;
 370:   
 371:              DltNgfsAgcfGwCombinedRecV2(gwId, primarySwitch, out soapResultEnvelopeXmlDocument, out resultCode);
 372:          }
 373:   
 374:          ////////////////////////////////////////////////////////////////////////////
 375:   
 376:          /// <summary>
 377:          ///
 378:          /// </summary>
 379:          public void DltNgfsAgcfGwCombinedRecV2(int gwId, string primarySwitch, out XmlDocument soapResultEnvelopeXmlDocument, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 380:          {
 381:              int tableId;
 382:              List<Dictionary<string, string>> parameterDictionaryList;
 383:   
 384:              tableId = Ia.Ngn.Cl.Model.Business.Nokia.AgcfGatewayTable.NgfsAgcfGatewayTableAid;
 385:   
 386:              SendSoapRequestAndReadResponse(DltNgfsAgcfGwCombinedRecV2SoapEnvelopeXml(tableId, gwId, primarySwitch, sessionId), out soapResultEnvelopeXmlDocument);
 387:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 388:          }
 389:   
 390:          ////////////////////////////////////////////////////////////////////////////
 391:          ////////////////////////////////////////////////////////////////////////////
 392:   
 393:          /// <summary>
 394:          ///
 395:          /// </summary>
 396:          public void EntNgfsAgcfEndpointV2(string service, int gwId, int flatTermId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 397:          {
 398:              XmlDocument soapResultEnvelopeXmlDocument;
 399:              List<Dictionary<string, string>> parameterDictionaryList;
 400:   
 401:              SendSoapRequestAndReadResponse(EntNgfsAgcfEndpointV2SoapEnvelopeXml(service, gwId, flatTermId, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 402:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 403:   
 404:              //resultCode = Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful;
 405:          }
 406:   
 407:          ////////////////////////////////////////////////////////////////////////////
 408:   
 409:          /// <summary>
 410:          ///
 411:          /// </summary>
 412:          public List<Ia.Ngn.Cl.Model.Nokia.AgcfEndpoint> RtrvNgfsAgcfEndpointV2(string prividUser, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 413:          {
 414:              XmlDocument soapResultEnvelopeXmlDocument;
 415:              List<Dictionary<string, string>> parameterDictionaryList;
 416:              List<Ia.Ngn.Cl.Model.Nokia.AgcfEndpoint> agcfEndpointList;
 417:   
 418:              SendSoapRequestAndReadResponse(RtrvNgfsAgcfEndpointV2SoapEnvelopeXml(prividUser, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 419:   
 420:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 421:   
 422:              if (resultCode == Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful)
 423:              {
 424:                  agcfEndpointList = Ia.Ngn.Cl.Model.Business.Nokia.AgcfEndpoint.ParseFromDictionary(parameterDictionaryList);
 425:              }
 426:              else agcfEndpointList = null;
 427:   
 428:              return agcfEndpointList;
 429:          }
 430:   
 431:          ////////////////////////////////////////////////////////////////////////////
 432:   
 433:          /// <summary>
 434:          ///
 435:          /// </summary>
 436:          public List<Ia.Ngn.Cl.Model.Nokia.AgcfEndpoint> RtrvNgfsAgcfEndpointV2List(int gwId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 437:          {
 438:              XmlDocument soapResultEnvelopeXmlDocument;
 439:              List<Dictionary<string, string>> parameterDictionaryList;
 440:              List<Ia.Ngn.Cl.Model.Nokia.AgcfEndpoint> agcfEndpointList;
 441:   
 442:              SendSoapRequestAndReadResponse(RtrvNgfsAgcfEndpointV2SoapEnvelopeXml(gwId, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 443:   
 444:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 445:   
 446:              if (resultCode == Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful)
 447:              {
 448:                  agcfEndpointList = Ia.Ngn.Cl.Model.Business.Nokia.AgcfEndpoint.ParseFromDictionary(parameterDictionaryList);
 449:              }
 450:              else agcfEndpointList = null;
 451:   
 452:              return agcfEndpointList;
 453:          }
 454:   
 455:          ////////////////////////////////////////////////////////////////////////////
 456:   
 457:          /// <summary>
 458:          ///
 459:          /// </summary>
 460:          public List<Ia.Ngn.Cl.Model.Nokia.AgcfEndpoint> RtrvNgfsAgcfEndpointV2List(int gwId, string primarySwitch, int imsService, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 461:          {
 462:              XmlDocument soapResultEnvelopeXmlDocument;
 463:              List<Dictionary<string, string>> parameterDictionaryList;
 464:              List<Ia.Ngn.Cl.Model.Nokia.AgcfEndpoint> agcfEndpointList;
 465:   
 466:              SendSoapRequestAndReadResponse(RtrvNgfsAgcfEndpointV2SoapEnvelopeXml(gwId, primarySwitch, imsService, sessionId), out soapResultEnvelopeXmlDocument);
 467:   
 468:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 469:   
 470:              if (resultCode == Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful)
 471:              {
 472:                  agcfEndpointList = Ia.Ngn.Cl.Model.Business.Nokia.AgcfEndpoint.ParseFromDictionary(parameterDictionaryList);
 473:              }
 474:              else agcfEndpointList = null;
 475:   
 476:              return agcfEndpointList;
 477:          }
 478:   
 479:          ////////////////////////////////////////////////////////////////////////////
 480:   
 481:          /// <summary>
 482:          ///
 483:          /// </summary>
 484:          public void EdNgfsAgcfEndpointV2_CallWaiting(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, bool serviceAssigned, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 485:          {
 486:              XmlDocument soapResultEnvelopeXmlDocument;
 487:              List<Dictionary<string, string>> parameterDictionaryList;
 488:   
 489:              SendSoapRequestAndReadResponse(EdNgfsAgcfEndpointV2SoapEnvelopeXml_CallWaiting(service, nddOnt, serviceAssigned, sessionId), out soapResultEnvelopeXmlDocument);
 490:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 491:          }
 492:   
 493:          ////////////////////////////////////////////////////////////////////////////
 494:   
 495:          /// <summary>
 496:          ///
 497:          /// </summary>
 498:          public void DltNgfsAgcfEndpointV2(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 499:          {
 500:              List<Dictionary<string, string>> parameterDictionaryList;
 501:              XmlDocument soapResultEnvelopeXmlDocument;
 502:   
 503:              SendSoapRequestAndReadResponse(DltNgfsAgcfEndpointV2SoapEnvelopeXml(service, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 504:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 505:          }
 506:   
 507:          ////////////////////////////////////////////////////////////////////////////
 508:   
 509:          /// <summary>
 510:          ///
 511:          /// </summary>
 512:          public void DltNgfsAgcfEndpointV2(string service, string primarySwitch, string fsdb, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 513:          {
 514:              List<Dictionary<string, string>> parameterDictionaryList;
 515:              XmlDocument soapResultEnvelopeXmlDocument;
 516:   
 517:              SendSoapRequestAndReadResponse(DltNgfsAgcfEndpointV2SoapEnvelopeXml(service, primarySwitch, fsdb, sessionId), out soapResultEnvelopeXmlDocument);
 518:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 519:          }
 520:   
 521:          /*
 522:          ////////////////////////////////////////////////////////////////////////////
 523:          ////////////////////////////////////////////////////////////////////////////
 524:  
 525:          /// <summary>
 526:          ///
 527:          /// </summary>
 528:          public void EntNgfsSubPartyV2(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 529:          {
 530:              // Not used. Subparty is created and deleted with subscriber
 531:  
 532:              List<Dictionary<string, string>> parameterDictionaryList;
 533:              XmlDocument soapResultEnvelopeXmlDocument;
 534:  
 535:              SendSoapRequestAndReadResponse(EntNgfsSubPartyV2SoapEnvelopeXml(service, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 536:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 537:  
 538:              //resultCode = Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful;
 539:          }
 540:          */
 541:   
 542:          ////////////////////////////////////////////////////////////////////////////
 543:   
 544:          /// <summary>
 545:          ///
 546:          /// </summary>
 547:          public Ia.Ngn.Cl.Model.Nokia.SubParty RtrvNgfsSubPartyV2(string partyId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 548:          {
 549:              XmlDocument soapResultEnvelopeXmlDocument;
 550:              List<Dictionary<string, string>> parameterDictionaryList;
 551:              Ia.Ngn.Cl.Model.Nokia.SubParty subParty;
 552:   
 553:              SendSoapRequestAndReadResponse(RtrvNgfsSubPartyV2SoapEnvelopeXml(partyId, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 554:   
 555:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 556:   
 557:              if (resultCode == Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful)
 558:              {
 559:                  subParty = Ia.Ngn.Cl.Model.Business.Nokia.SubParty.ParseFromDictionary(parameterDictionaryList[0]);
 560:              }
 561:              else subParty = null;
 562:   
 563:              return subParty;
 564:          }
 565:   
 566:          ////////////////////////////////////////////////////////////////////////////
 567:   
 568:          /// <summary>
 569:          ///
 570:          /// </summary>
 571:          public Ia.Ngn.Cl.Model.Nokia.SubParty RtrvNgfsSubPartyV2(string partyId, string primarySwitch, int imsService, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 572:          {
 573:              XmlDocument soapResultEnvelopeXmlDocument;
 574:              List<Dictionary<string, string>> parameterDictionaryList;
 575:              Ia.Ngn.Cl.Model.Nokia.SubParty subParty;
 576:   
 577:              SendSoapRequestAndReadResponse(RtrvNgfsSubPartyV2SoapEnvelopeXml(partyId, primarySwitch, imsService, sessionId), out soapResultEnvelopeXmlDocument);
 578:   
 579:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 580:   
 581:              if (resultCode == Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful)
 582:              {
 583:                  subParty = Ia.Ngn.Cl.Model.Business.Nokia.SubParty.ParseFromDictionary(parameterDictionaryList[0]);
 584:              }
 585:              else subParty = null;
 586:   
 587:              return subParty;
 588:          }
 589:   
 590:          ////////////////////////////////////////////////////////////////////////////
 591:   
 592:          /// <summary>
 593:          ///
 594:          /// </summary>
 595:          public void DltNgfsSubPartyV2(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 596:          {
 597:              // Not used. Subparty is created and deleted with subscriber
 598:              List<Dictionary<string, string>> parameterDictionaryList;
 599:              XmlDocument soapResultEnvelopeXmlDocument;
 600:   
 601:              SendSoapRequestAndReadResponse(DltNgfsSubPartyV2SoapEnvelopeXml(service, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 602:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 603:          }
 604:   
 605:          ////////////////////////////////////////////////////////////////////////////
 606:          ////////////////////////////////////////////////////////////////////////////
 607:   
 608:          /// <summary>
 609:          ///
 610:          /// </summary>
 611:          public void EntNgfsSubscriberAndNgfsSubPartyV2_H248(string service, int gwId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 612:          {
 613:              bool isSip;
 614:              List<Dictionary<string, string>> parameterDictionaryList;
 615:              XmlDocument soapResultEnvelopeXmlDocument;
 616:   
 617:              isSip = false; // this is not SIP
 618:   
 619:              SendSoapRequestAndReadResponse(EntNgfsSubscriberV2SoapEnvelopeXml(service, isSip, gwId, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 620:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 621:          }
 622:   
 623:          ////////////////////////////////////////////////////////////////////////////
 624:   
 625:          /// <summary>
 626:          ///
 627:          /// </summary>
 628:          public void EntNgfsSubscriberAndNgfsSubPartyV2_Sip(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 629:          {
 630:              bool isSip;
 631:              List<Dictionary<string, string>> parameterDictionaryList;
 632:              XmlDocument soapResultEnvelopeXmlDocument;
 633:   
 634:              isSip = true; // this is SIP
 635:   
 636:              SendSoapRequestAndReadResponse(EntNgfsSubscriberV2SoapEnvelopeXml(service, isSip, 0, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 637:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 638:          }
 639:   
 640:          ////////////////////////////////////////////////////////////////////////////
 641:   
 642:          /// <summary>
 643:          ///
 644:          /// </summary>
 645:          public Ia.Ngn.Cl.Model.Nokia.Subscriber RtrvNgfsSubscriberV2(string aid, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 646:          {
 647:              XmlDocument soapResultEnvelopeXmlDocument;
 648:              List<Dictionary<string, string>> parameterDictionaryList;
 649:              Ia.Ngn.Cl.Model.Nokia.Subscriber subscriber;
 650:   
 651:              SendSoapRequestAndReadResponse(RtrvNgfsSubscriberV2SoapEnvelopeXml(aid, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 652:   
 653:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 654:   
 655:              if (resultCode == Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful)
 656:              {
 657:                  subscriber = Ia.Ngn.Cl.Model.Business.Nokia.Subscriber.ParseFromDictionary(parameterDictionaryList[0]);
 658:              }
 659:              else subscriber = null;
 660:   
 661:              return subscriber;
 662:          }
 663:   
 664:          ////////////////////////////////////////////////////////////////////////////
 665:   
 666:          /// <summary>
 667:          ///
 668:          /// </summary>
 669:          public Ia.Ngn.Cl.Model.Nokia.Subscriber RtrvNgfsSubscriberV2(string aid, string primarySwitch, int imsService, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 670:          {
 671:              XmlDocument soapResultEnvelopeXmlDocument;
 672:              List<Dictionary<string, string>> parameterDictionaryList;
 673:              Ia.Ngn.Cl.Model.Nokia.Subscriber subscriber;
 674:   
 675:              SendSoapRequestAndReadResponse(RtrvNgfsSubscriberV2SoapEnvelopeXml(aid, primarySwitch, imsService, sessionId), out soapResultEnvelopeXmlDocument);
 676:   
 677:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 678:   
 679:              if (resultCode == Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful)
 680:              {
 681:                  subscriber = Ia.Ngn.Cl.Model.Business.Nokia.Subscriber.ParseFromDictionary(parameterDictionaryList[0]);
 682:              }
 683:              else subscriber = null;
 684:   
 685:              return subscriber;
 686:          }
 687:   
 688:          ////////////////////////////////////////////////////////////////////////////
 689:   
 690:          /// <summary>
 691:          ///
 692:          /// </summary>
 693:          public void DltNgfsSubscriberAndNgfsSubPartyV2(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 694:          {
 695:              List<Dictionary<string, string>> parameterDictionaryList;
 696:              XmlDocument soapResultEnvelopeXmlDocument;
 697:   
 698:              SendSoapRequestAndReadResponse(DltNgfsSubscriberV2SoapEnvelopeXml(service, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 699:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 700:          }
 701:   
 702:          ////////////////////////////////////////////////////////////////////////////
 703:   
 704:          /// <summary>
 705:          ///
 706:          /// </summary>
 707:          public void DltNgfsSubscriberAndNgfsSubPartyV2(string service, string primarySwitch, string fsdb, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 708:          {
 709:              List<Dictionary<string, string>> parameterDictionaryList;
 710:              XmlDocument soapResultEnvelopeXmlDocument;
 711:   
 712:              SendSoapRequestAndReadResponse(DltNgfsSubscriberV2SoapEnvelopeXml(service, primarySwitch, fsdb, sessionId), out soapResultEnvelopeXmlDocument);
 713:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 714:          }
 715:   
 716:          ////////////////////////////////////////////////////////////////////////////
 717:   
 718:          /// <summary>
 719:          ///
 720:          /// </summary>
 721:          public void EdNgfsSubscriberV2_CallingLineId(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, bool callingLineIdState, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 722:          {
 723:              string xml;
 724:              List<Dictionary<string, string>> parameterDictionaryList;
 725:              XmlDocument soapResultEnvelopeXmlDocument;
 726:   
 727:              xml = CallingLineIdXml(service, callingLineIdState);
 728:   
 729:              SendSoapRequestAndReadResponse(EdNgfsSubscriberV2SoapEnvelopeXml(service, nddOnt, sessionId, xml), out soapResultEnvelopeXmlDocument);
 730:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 731:          }
 732:   
 733:          ////////////////////////////////////////////////////////////////////////////
 734:   
 735:          /// <summary>
 736:          ///
 737:          /// </summary>
 738:          public void EdNgfsSubscriberV2_OneDigitSpeedDial(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, bool oneDigitSpeedDialState, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 739:          {
 740:              string xml;
 741:              List<Dictionary<string, string>> parameterDictionaryList;
 742:              XmlDocument soapResultEnvelopeXmlDocument;
 743:   
 744:              xml = OneDigitSpeedDial(service, oneDigitSpeedDialState);
 745:   
 746:              SendSoapRequestAndReadResponse(EdNgfsSubscriberV2SoapEnvelopeXml(service, nddOnt, sessionId, xml), out soapResultEnvelopeXmlDocument);
 747:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 748:          }
 749:   
 750:          ////////////////////////////////////////////////////////////////////////////
 751:   
 752:          /// <summary>
 753:          ///
 754:          /// </summary>
 755:          public void EdNgfsSubscriberV2_CallForwardingVari(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, bool callForwardingState, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 756:          {
 757:              string xml;
 758:              List<Dictionary<string, string>> parameterDictionaryList;
 759:              XmlDocument soapResultEnvelopeXmlDocument;
 760:   
 761:              xml = CallForwardingVariXml(service, callForwardingState);
 762:   
 763:              SendSoapRequestAndReadResponse(EdNgfsSubscriberV2SoapEnvelopeXml(service, nddOnt, sessionId, xml), out soapResultEnvelopeXmlDocument);
 764:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 765:          }
 766:   
 767:          ////////////////////////////////////////////////////////////////////////////
 768:   
 769:          /// <summary>
 770:          ///
 771:          /// </summary>
 772:          public void EdNgfsSubscriberV2_CallWaiting(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, bool callWaitingState, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 773:          {
 774:              string xml;
 775:              List<Dictionary<string, string>> parameterDictionaryList;
 776:              XmlDocument soapResultEnvelopeXmlDocument;
 777:   
 778:              xml = CallWaitingXml(service, callWaitingState);
 779:   
 780:              SendSoapRequestAndReadResponse(EdNgfsSubscriberV2SoapEnvelopeXml(service, nddOnt, sessionId, xml), out soapResultEnvelopeXmlDocument);
 781:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 782:          }
 783:   
 784:          ////////////////////////////////////////////////////////////////////////////
 785:   
 786:          /// <summary>
 787:          ///
 788:          /// </summary>
 789:          public void EdNgfsSubscriberV2_ConferenceCall(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, bool conferenceCallState, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 790:          {
 791:              string xml;
 792:              List<Dictionary<string, string>> parameterDictionaryList;
 793:              XmlDocument soapResultEnvelopeXmlDocument;
 794:   
 795:              xml = ConferenceCallingXml(service, conferenceCallState);
 796:   
 797:              SendSoapRequestAndReadResponse(EdNgfsSubscriberV2SoapEnvelopeXml(service, nddOnt, sessionId, xml), out soapResultEnvelopeXmlDocument);
 798:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 799:          }
 800:   
 801:          ////////////////////////////////////////////////////////////////////////////
 802:   
 803:          /// <summary>
 804:          ///
 805:          /// </summary>
 806:          public void EdNgfsSubscriberV2_ReminderCall(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, bool reminderCallState, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 807:          {
 808:              string xml;
 809:              List<Dictionary<string, string>> parameterDictionaryList;
 810:              XmlDocument soapResultEnvelopeXmlDocument;
 811:   
 812:              xml = ReminderCallXml(service, reminderCallState);
 813:   
 814:              SendSoapRequestAndReadResponse(EdNgfsSubscriberV2SoapEnvelopeXml(service, nddOnt, sessionId, xml), out soapResultEnvelopeXmlDocument);
 815:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 816:          }
 817:   
 818:          ////////////////////////////////////////////////////////////////////////////
 819:   
 820:          /// <summary>
 821:          ///
 822:          /// </summary>
 823:          public void EdNgfsSubscriberV2_InternationalCalling(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, bool internationalCallingState, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 824:          {
 825:              string xml;
 826:              List<Dictionary<string, string>> parameterDictionaryList;
 827:              XmlDocument soapResultEnvelopeXmlDocument;
 828:   
 829:              xml = InternationalCallingXml(service, internationalCallingState);
 830:   
 831:              SendSoapRequestAndReadResponse(EdNgfsSubscriberV2SoapEnvelopeXml(service, nddOnt, sessionId, xml), out soapResultEnvelopeXmlDocument);
 832:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 833:          }
 834:   
 835:          ////////////////////////////////////////////////////////////////////////////
 836:   
 837:          /// <summary>
 838:          ///
 839:          /// </summary>
 840:          public void EdNgfsSubscriberV2_InternationalCallingUserControlled(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, bool internationalCallBarringState, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 841:          {
 842:              string xml;
 843:              List<Dictionary<string, string>> parameterDictionaryList;
 844:              XmlDocument soapResultEnvelopeXmlDocument;
 845:   
 846:              xml = InternationalCallingUserControlledXml(service, internationalCallBarringState);
 847:   
 848:              SendSoapRequestAndReadResponse(EdNgfsSubscriberV2SoapEnvelopeXml(service, nddOnt, sessionId, xml), out soapResultEnvelopeXmlDocument);
 849:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 850:          }
 851:   
 852:          ////////////////////////////////////////////////////////////////////////////
 853:   
 854:          /// <summary>
 855:          ///
 856:          /// </summary>
 857:          public void EdNgfsSubscriberV2_ServiceSuspension(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, bool serviceSuspensionState, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 858:          {
 859:              string xml;
 860:              List<Dictionary<string, string>> parameterDictionaryList;
 861:              XmlDocument soapResultEnvelopeXmlDocument;
 862:   
 863:              xml = ServiceSuspension(serviceSuspensionState);
 864:   
 865:              SendSoapRequestAndReadResponse(EdNgfsSubscriberV2WithinSubPartySoapEnvelopeXml(service, nddOnt, sessionId, xml), out soapResultEnvelopeXmlDocument);
 866:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 867:          }
 868:   
 869:          ////////////////////////////////////////////////////////////////////////////
 870:   
 871:          /// <summary>
 872:          ///
 873:          /// </summary>
 874:          public void EdNgfsSubscriberAndNgfsSubPartyV2_H248ToSip(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
 875:          {
 876:              List<Dictionary<string, string>> parameterDictionaryList;
 877:              XmlDocument soapResultEnvelopeXmlDocument;
 878:   
 879:              SendSoapRequestAndReadResponse(EdNgfsSubscriberV2_H248ToSipSoapEnvelopeXml(service, nddOnt, sessionId), out soapResultEnvelopeXmlDocument);
 880:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out parameterDictionaryList);
 881:          }
 882:   
 883:          ////////////////////////////////////////////////////////////////////////////
 884:          ////////////////////////////////////////////////////////////////////////////
 885:   
 886:   
 887:   
 888:   
 889:   
 890:   
 891:   
 892:   
 893:          ////////////////////////////////////////////////////////////////////////////
 894:          ////////////////////////////////////////////////////////////////////////////
 895:   
 896:          /// <summary>
 897:          ///
 898:          /// </summary>
 899:          private static XmlDocument ActUserSoapEnvelopeXml(string sessionId)
 900:          {
 901:              XmlDocument soapEnvelopeXml;
 902:              Dictionary<string, string> param;
 903:   
 904:              param = new Dictionary<string, string>();
 905:   
 906:              param.Add("UserName", Ia.Ngn.Cl.Model.Business.Nokia.Ims.UserName);
 907:              param.Add("PassWord", Ia.Ngn.Cl.Model.Business.Nokia.Ims.Password);
 908:   
 909:              soapEnvelopeXml = SoapEnvelopeXml("act-user", param, sessionId, "", "TECICS01", "fsdb0");
 910:   
 911:              return soapEnvelopeXml;
 912:          }
 913:   
 914:          ////////////////////////////////////////////////////////////////////////////
 915:   
 916:          /// <summary>
 917:          ///
 918:          /// <remarks>
 919:          ///   <PlexViewRequest Command="canc-user" SwitchName="" RequestId="" SessionId="test:2012917080">
 920:          ///   </PlexViewRequest>
 921:          /// </remarks>
 922:          /// </summary>
 923:          private static XmlDocument CancUserSoapEnvelopeXml(string sessionId)
 924:          {
 925:              XmlDocument soapEnvelopeXml;
 926:   
 927:              soapEnvelopeXml = SoapEnvelopeXml("canc-user", "", sessionId, "", "TECICS01", "fsdb0");
 928:   
 929:              return soapEnvelopeXml;
 930:          }
 931:   
 932:          /*
 933:          ////////////////////////////////////////////////////////////////////////////
 934:          ////////////////////////////////////////////////////////////////////////////
 935:  
 936:          /// <summary>
 937:          ///
 938:          /// <remarks>
 939:          /// </remarks>
 940:          /// </summary>
 941:          private static XmlDocument EntNgcfAgcfGatewayRecordV2SoapEnvelopeXml(int tableId, int gwId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
 942:          {
 943:              int serviceProfileNumber;
 944:              string xmlContent, puid, ip1, ip2, pridUser, privateId, prsetName, prsetNumber, prsetNum, gwUserId, gwName, agcfSipIaPort;
 945:              XmlDocument soapEnvelopeXml;
 946:  
 947:              puid = "sip:rgw" + gwId;
 948:              pridUser = "rgw" + gwId;
 949:              privateId = "rgw" + gwId;
 950:              prsetName = "rgw" + gwId;
 951:              prsetNumber = gwId.ToString();
 952:              prsetNum = gwId.ToString();
 953:              gwUserId = "rgw" + gwId;
 954:              gwName = "rgw" + gwId;
 955:              ip1 = nddOnt.Ip; // "1.4.150.2";
 956:              ip2 = "0.0.0.0";
 957:  
 958:              serviceProfileNumber = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ServiceProfileNumberAgcfGatewayRecord(nddOnt.Pon.PonGroup.Olt.ImsService);
 959:              agcfSipIaPort = Ia.Ngn.Cl.Model.Business.Nokia.Ims.AgcfSipIaPort(nddOnt.Pon.PonGroup.Olt.ImsService);
 960:  
 961:              xmlContent = @"
 962:      <AgcfGatewayRecord>
 963:      <TableId>" + tableId + @"</TableId>
 964:      <GwId>" + gwId + @"</GwId>
 965:      <GwUserId>" + gwUserId + @"</GwUserId>
 966:      <GwName>" + gwName + @"</GwName>
 967:      <IP1>" + ip1 + @"</IP1>
 968:      <IP2>" + ip2 + @"</IP2>
 969:      <AgcfSipIaPort>" + agcfSipIaPort + @"</AgcfSipIaPort>
 970:      <ConnectionType>UDP/IP</ConnectionType>
 971:      <ContextAudits>Audit Value Based</ContextAudits>
 972:      <GwDigitMapId>1</GwDigitMapId>
 973:      <EnableChannelStatusAudits>false</EnableChannelStatusAudits>
 974:      <GwDomain>ims.moc1.kw</GwDomain>
 975:      <GwPrivId></GwPrivId>
 976:      <LocalTermTypePrefix>td</LocalTermTypePrefix>
 977:      <LocalTermTypeAnalogPrefix>td</LocalTermTypeAnalogPrefix>
 978:      <IsLocalTermTypeTDMAnalog>true</IsLocalTermTypeTDMAnalog>
 979:      <NetTermTypePrefix>RTP/</NetTermTypePrefix>
 980:      <IsNetTermTypeRTPUDP>true</IsNetTermTypeRTPUDP>
 981:      <PhysicalTermIdScheme>Flat Term ID</PhysicalTermIdScheme>
 982:      <SendCompactMessages>true</SendCompactMessages>
 983:      <SendEphemeralPrefix>false</SendEphemeralPrefix>
 984:      <UdpPort>2944</UdpPort>
 985:      <GwVariantId>1</GwVariantId>
 986:      <AreaId>0</AreaId>
 987:      <ComfortNoise>false</ComfortNoise>
 988:      <Dtmf>false</Dtmf>
 989:      <FaxEvents>false</FaxEvents>
 990:      <ModemEvents>false</ModemEvents>
 991:      <TextTelephonyEvents>false</TextTelephonyEvents>
 992:      <AllCodecDataStr>Audio|G.711 - uLaw|20|false</AllCodecDataStr>
 993:      <AgwIuaIpAddress></AgwIuaIpAddress>
 994:      <AgwIuaSctpPort></AgwIuaSctpPort>
 995:      <AgcfLocalSctpPort></AgcfLocalSctpPort>
 996:      <SctpProfile></SctpProfile>
 997:      <IuaIIDMapScheme></IuaIIDMapScheme>
 998:      <LocalTermTypeIsdnPrefix></LocalTermTypeIsdnPrefix>
 999:      <AuditAllActiveIsdnCalls>false</AuditAllActiveIsdnCalls>
1000:      <MateSite>2</MateSite>
1001:      <MateExternalIPAddr>10.16.5.31</MateExternalIPAddr>
1002:      <IsPrimary>true</IsPrimary>
1003:      <AddtionalDigitMapList></AddtionalDigitMapList>
1004:      <AuthTimer>10</AuthTimer>
1005:      <SharedBasNumber>101</SharedBasNumber>
1006:      <SharedPriNumber>523</SharedPriNumber>
1007:      <MgID></MgID>
1008:      <EnnableMD5DigAuteh>false</EnnableMD5DigAuteh>
1009:      <ChannelAudits>Arming Modify and AuditValue done one after another sequentially</ChannelAudits>
1010:      <GroupId>1</GroupId>
1011:      <AgcfGateWayType>RGW/iAD</AgcfGateWayType>
1012:      </AgcfGatewayRecord>
1013:  
1014:      <HSSPrivateId>
1015:          <PridUser>" + pridUser + @"</PridUser>
1016:          <PrsetNumber>" + prsetNumber + @"</PrsetNumber>
1017:          <PuidUserList>
1018:              <HSSPublicId>
1019:                  <Puid>" + puid + @"</Puid>
1020:                  <ServiceProfileNumber>" + serviceProfileNumber + @"</ServiceProfileNumber>
1021:              </HSSPublicId>
1022:          </PuidUserList>
1023:      </HSSPrivateId>
1024:  
1025:  ";
1026:  
1027:              soapEnvelopeXml = SoapEnvelopeXml("ent-ngfs-agcfgatewayrecord-v2", xmlContent, sessionId, "", nddOnt.Pon.PonGroup.Olt.PrimarySwitch, nddOnt.Pon.PonGroup.Olt.ImsFsdb);
1028:  
1029:              return soapEnvelopeXml;
1030:          }
1031:          */
1032:   
1033:          ////////////////////////////////////////////////////////////////////////////
1034:          ////////////////////////////////////////////////////////////////////////////
1035:   
1036:          /// <summary>
1037:          ///
1038:          /// <remarks>
1039:          /// </remarks>
1040:          /// </summary>
1041:          private static XmlDocument EntNgfsAgcfGwCombinedRecV2SoapEnvelopeXml(int tableId, int gwId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
1042:          {
1043:              int serviceProfileNumber;
1044:              string xmlContent, puid, ip1, ip2, mgcIp, mgcSecondaryIp, pridUser, privateId, prsetName, prsetNumber, prsetNum, gwUserId, gwName, agcfSipIaPort;
1045:              XmlDocument soapEnvelopeXml;
1046:   
1047:              puid = "sip:rgw" + gwId;
1048:              pridUser = "rgw" + gwId;
1049:              privateId = "rgw" + gwId;
1050:              prsetName = "rgw" + gwId;
1051:              prsetNumber = gwId.ToString();
1052:              prsetNum = gwId.ToString();
1053:              gwUserId = "rgw" + gwId;
1054:              gwName = "rgw" + gwId;
1055:              ip1 = nddOnt.Ip; // "1.4.150.2";
1056:              ip2 = "0.0.0.0";
1057:              mgcIp = nddOnt.MgcIp;
1058:              mgcSecondaryIp = nddOnt.MgcSecondaryIp;
1059:   
1060:              agcfSipIaPort = Ia.Ngn.Cl.Model.Business.Nokia.Ims.AgcfSipIaPort(nddOnt.ImsService);
1061:              serviceProfileNumber = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ServiceProfileNumberAgcfGatewayRecord(nddOnt.ImsService);
1062:   
1063:              xmlContent = @"
1064:      <AgcfGatewayRecord>
1065:          <NgcfAgcfGatewayRecordAid>" + tableId + "`" + gwId + @"</NgcfAgcfGatewayRecordAid>
1066:          <TableId>" + tableId + @"</TableId>
1067:          <GwId>" + gwId + @"</GwId>
1068:          <AgcfSipIaPort>" + agcfSipIaPort + @"</AgcfSipIaPort>
1069:          <GwUserId>" + gwUserId + @"</GwUserId>
1070:          <GwName>" + gwName + @"</GwName>
1071:          <IP1>" + ip1 + @"</IP1>
1072:          <IP2>" + ip2 + @"</IP2>
1073:          <MateExternalIPAddr>" + mgcSecondaryIp + @"</MateExternalIPAddr>
1074:          <ConnectionType>UDP/IP</ConnectionType>
1075:          <ContextAudits>Audit Value Based</ContextAudits>
1076:          <GwDigitMapId>1</GwDigitMapId>
1077:          <EnableChannelStatusAudits>false</EnableChannelStatusAudits>
1078:          <GwDomain>ims.moc1.kw</GwDomain>
1079:          <GwPrivId></GwPrivId>
1080:          <LocalTermTypePrefix>td</LocalTermTypePrefix>
1081:          <LocalTermTypeAnalogPrefix>td</LocalTermTypeAnalogPrefix>
1082:          <IsLocalTermTypeTDMAnalog>true</IsLocalTermTypeTDMAnalog>
1083:          <NetTermTypePrefix>RTP</NetTermTypePrefix>
1084:          <IsNetTermTypeRTPUDP>true</IsNetTermTypeRTPUDP>
1085:          <PhysicalTermIdScheme>Flat Term ID</PhysicalTermIdScheme>
1086:          <SendCompactMessages>true</SendCompactMessages>
1087:          <SendEphemeralPrefix>false</SendEphemeralPrefix>
1088:          <UdpPort>2944</UdpPort>
1089:          <GwVariantId>1</GwVariantId>
1090:          <AreaId>0</AreaId>
1091:          <ComfortNoise>false</ComfortNoise>
1092:          <Dtmf>false</Dtmf>
1093:          <FaxEvents>false</FaxEvents>
1094:          <ModemEvents>false</ModemEvents>
1095:          <TextTelephonyEvents>false</TextTelephonyEvents>
1096:          <AllCodecDataStr>Audio|G.711 - uLaw|20|false</AllCodecDataStr>
1097:          <AgwIuaIpAddress></AgwIuaIpAddress>
1098:          <AgwIuaSctpPort></AgwIuaSctpPort>
1099:          <AgcfLocalSctpPort></AgcfLocalSctpPort>
1100:          <SctpProfile></SctpProfile>
1101:          <IuaIIDMapScheme></IuaIIDMapScheme>
1102:          <LocalTermTypeIsdnPrefix></LocalTermTypeIsdnPrefix>
1103:          <AuditAllActiveIsdnCalls>false</AuditAllActiveIsdnCalls>
1104:          <MateSite>2</MateSite>
1105:          <IsPrimary>true</IsPrimary>
1106:          <AddtionalDigitMapList></AddtionalDigitMapList>
1107:          <AuthTimer>10</AuthTimer>
1108:          <SharedBasNumber>101</SharedBasNumber>
1109:          <SharedPriNumber>523</SharedPriNumber>
1110:          <MgID></MgID>
1111:          <EnnableMD5DigAuteh>false</EnnableMD5DigAuteh>
1112:          <ChannelAudits>Arming Modify and AuditValue done one after another sequentially</ChannelAudits>
1113:          <GroupId>1</GroupId>
1114:          <AgcfGateWayType>RGW/iAD</AgcfGateWayType>
1115:      </AgcfGatewayRecord>
1116:   
1117:      <HSSPrivateId>
1118:          <PridUser>" + pridUser + @"</PridUser>
1119:          <PrsetNumber>" + prsetNumber + @"</PrsetNumber>
1120:          <PrivPassword>1234</PrivPassword>
1121:          <PridDomainId>0</PridDomainId>
1122:          <PridDomainName>ims.moc1.kw</PridDomainName>
1123:          <ServerCapNumber>0</ServerCapNumber>
1124:          <ProtectionGroupNumber>1</ProtectionGroupNumber>
1125:          <ChargeInfoNum>0</ChargeInfoNum>
1126:          <MediaProfileId>0</MediaProfileId>
1127:          <PuidUserList>
1128:              <HSSPublicId>
1129:                  <Puid>" + puid + @"</Puid>
1130:                  <ServiceProfileNumber>" + serviceProfileNumber + @"</ServiceProfileNumber>
1131:                  <PrivateId>" + privateId + @"</PrivateId>
1132:                  <PuidDomainName>ims.moc1.kw</PuidDomainName>
1133:                  <PridDomainName>ims.moc1.kw</PridDomainName>
1134:                  <IsWildcardPuid>false</IsWildcardPuid>
1135:                  <Barring>true</Barring>
1136:                  <ImplRegSet>1</ImplRegSet>
1137:                  <Authorized>true</Authorized>
1138:                  <SendTelURI>false</SendTelURI>
1139:              </HSSPublicId>
1140:          </PuidUserList>
1141:      </HSSPrivateId>
1142:   
1143:      <HSSPrset>
1144:          <PrsetNum>" + prsetNum + @"</PrsetNum>
1145:          <PridUser>" + pridUser + @"</PridUser>
1146:          <PrsetName>" + prsetName + @"</PrsetName>
1147:          <PridDomain>ims.moc1.kw</PridDomain>
1148:          <ServerCapNum>0</ServerCapNum>
1149:      </HSSPrset>
1150:   
1151:      <GeoRedundancyData>
1152:          <AgcfGatewayRecord>
1153:              <NgcfAgcfGatewayRecordAid>" + tableId + "`" + gwId + @"</NgcfAgcfGatewayRecordAid>
1154:              <TableId>" + tableId + @"</TableId>
1155:              <GwId>" + gwId + @"</GwId>
1156:              <AgcfSipIaPort>" + agcfSipIaPort + @"</AgcfSipIaPort>
1157:              <GwUserId>" + gwUserId + @"</GwUserId>
1158:              <GwName>" + gwName + @"</GwName>
1159:              <IP1>" + ip1 + @"</IP1>
1160:              <IP2>" + ip2 + @"</IP2>
1161:               <MateExternalIPAddr>" + mgcIp + @"</MateExternalIPAddr>
1162:              <ConnectionType>UDP/IP</ConnectionType>
1163:              <ContextAudits>Audit Value Based</ContextAudits>
1164:              <GwDigitMapId>1</GwDigitMapId>
1165:              <EnableChannelStatusAudits>false</EnableChannelStatusAudits>
1166:              <GwDomain>ims.moc1.kw</GwDomain>
1167:              <GwPrivId></GwPrivId>
1168:              <LocalTermTypePrefix>td</LocalTermTypePrefix>
1169:              <LocalTermTypeAnalogPrefix>td</LocalTermTypeAnalogPrefix>
1170:              <IsLocalTermTypeTDMAnalog>true</IsLocalTermTypeTDMAnalog>
1171:              <NetTermTypePrefix>RTP</NetTermTypePrefix>
1172:              <IsNetTermTypeRTPUDP>true</IsNetTermTypeRTPUDP>
1173:              <PhysicalTermIdScheme>Flat Term ID</PhysicalTermIdScheme>
1174:              <SendCompactMessages>true</SendCompactMessages>
1175:              <SendEphemeralPrefix>false</SendEphemeralPrefix>
1176:              <UdpPort>2944</UdpPort>
1177:              <GwVariantId>1</GwVariantId>
1178:              <AreaId>0</AreaId>
1179:              <ComfortNoise>false</ComfortNoise>
1180:              <Dtmf>false</Dtmf>
1181:              <FaxEvents>false</FaxEvents>
1182:              <ModemEvents>false</ModemEvents>
1183:              <TextTelephonyEvents>false</TextTelephonyEvents>
1184:              <AllCodecDataStr>Audio|G.711 - uLaw|20|false</AllCodecDataStr>
1185:              <AgwIuaIpAddress></AgwIuaIpAddress>
1186:              <AgwIuaSctpPort></AgwIuaSctpPort>
1187:              <AgcfLocalSctpPort></AgcfLocalSctpPort>
1188:              <SctpProfile></SctpProfile>
1189:              <IuaIIDMapScheme></IuaIIDMapScheme>
1190:              <LocalTermTypeIsdnPrefix></LocalTermTypeIsdnPrefix>
1191:              <AuditAllActiveIsdnCalls>false</AuditAllActiveIsdnCalls>
1192:              <MateSite>2</MateSite>
1193:              <IsPrimary>false</IsPrimary>
1194:              <AddtionalDigitMapList></AddtionalDigitMapList>
1195:              <AuthTimer>10</AuthTimer>
1196:              <SharedBasNumber>101</SharedBasNumber>
1197:              <SharedPriNumber>523</SharedPriNumber>
1198:              <MgID></MgID>
1199:              <EnnableMD5DigAuteh>false</EnnableMD5DigAuteh>
1200:              <ChannelAudits>Arming Modify and AuditValue done one after another sequentially</ChannelAudits>
1201:              <GroupId>1</GroupId>
1202:              <AgcfGateWayType>RGW/iAD</AgcfGateWayType>
1203:          </AgcfGatewayRecord>
1204:          <HSSPrivateId>
1205:              <PridUser>" + pridUser + @"</PridUser>
1206:              <PrsetNumber>" + prsetNumber + @"</PrsetNumber>
1207:              <PrivPassword>1234</PrivPassword>
1208:              <PridDomainId>0</PridDomainId>
1209:              <PridDomainName>ims.moc1.kw</PridDomainName>
1210:              <ServerCapNumber>0</ServerCapNumber>
1211:              <ProtectionGroupNumber>2</ProtectionGroupNumber>
1212:              <ChargeInfoNum>0</ChargeInfoNum>
1213:              <MediaProfileId>0</MediaProfileId>
1214:              <PuidUserList>
1215:                  <HSSPublicId>
1216:                      <Puid>" + puid + @"</Puid>
1217:                      <PrivateId>" + privateId + @"</PrivateId>
1218:                      <ServiceProfileNumber>" + serviceProfileNumber + @"</ServiceProfileNumber>
1219:                      <PuidDomainName>ims.moc1.kw</PuidDomainName>
1220:                      <PridDomainName>ims.moc1.kw</PridDomainName>
1221:                      <IsWildcardPuid>false</IsWildcardPuid>
1222:                      <Barring>true</Barring>
1223:                      <ImplRegSet>1</ImplRegSet>
1224:                      <Authorized>true</Authorized>
1225:                      <SendTelURI>false</SendTelURI>
1226:                  </HSSPublicId>
1227:              </PuidUserList>
1228:          </HSSPrivateId>
1229:          <HSSPrset>
1230:              <PrsetNum>" + prsetNum + @"</PrsetNum>
1231:              <PridUser>" + pridUser + @"</PridUser>
1232:              <PrsetName>" + prsetName + @"</PrsetName>
1233:              <PridDomain>ims.moc1.kw</PridDomain>
1234:              <ServerCapNum>0</ServerCapNum>
1235:          </HSSPrset>
1236:      </GeoRedundancyData>";
1237:   
1238:              soapEnvelopeXml = SoapEnvelopeXml("ent-ngfs-agcfgwcombinedrec-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1239:   
1240:              return soapEnvelopeXml;
1241:          }
1242:   
1243:          ////////////////////////////////////////////////////////////////////////////
1244:   
1245:          /// <summary>
1246:          ///
1247:          /// <remarks>
1248:          /// </remarks>
1249:          /// </summary>
1250:          private static XmlDocument EdNgfsAgcfGatewayRecordV2_MateExternalIPAddrSoapEnvelopeXml(int tableId, int gwId, string mateExternalIPAddr, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
1251:          {
1252:              string xmlContent;
1253:              XmlDocument soapEnvelopeXml;
1254:   
1255:              xmlContent = @"
1256:          <NgcfAgcfGatewayRecordAid>" + tableId + "`" + gwId + @"</NgcfAgcfGatewayRecordAid>
1257:          <TableId>" + tableId + @"</TableId>
1258:          <GwId>" + gwId + @"</GwId>
1259:          <MateExternalIPAddr>" + mateExternalIPAddr + @"</MateExternalIPAddr>";
1260:   
1261:              soapEnvelopeXml = SoapEnvelopeXml("ed-ngfs-agcfgatewayrecord-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1262:   
1263:              return soapEnvelopeXml;
1264:          }
1265:   
1266:          ////////////////////////////////////////////////////////////////////////////
1267:   
1268:          /// <summary>
1269:          ///
1270:          /// <remarks>
1271:          /// </remarks>
1272:          /// </summary>
1273:          private static XmlDocument EdNgfsAgcfGatewayRecordV2_MateSiteSoapEnvelopeXml(int tableId, int gwId, int mateSite, string primarySwitch, string sessionId)
1274:          {
1275:              string xmlContent;
1276:              XmlDocument soapEnvelopeXml;
1277:   
1278:              xmlContent = @"
1279:          <NgcfAgcfGatewayRecordAid>" + tableId + "`" + gwId + @"</NgcfAgcfGatewayRecordAid>
1280:          <TableId>" + tableId + @"</TableId>
1281:          <GwId>" + gwId + @"</GwId>
1282:          <MateSite>" + mateSite + @"</MateSite>";
1283:   
1284:              soapEnvelopeXml = SoapEnvelopeXml("ed-ngfs-agcfgatewayrecord-v2", xmlContent, sessionId, "", primarySwitch); //, nddOnt.ImsFsdb);
1285:   
1286:              return soapEnvelopeXml;
1287:          }
1288:   
1289:          ////////////////////////////////////////////////////////////////////////////
1290:   
1291:          /// <summary>
1292:          ///
1293:          /// <remarks>
1294:          /// </remarks>
1295:          /// </summary>
1296:          private static XmlDocument EdNgfsAgcfGatewayRecordV2_IP1SoapEnvelopeXml(int tableId, int gwId, string ip1, string primarySwitch, string sessionId)
1297:          {
1298:              string xmlContent;
1299:              XmlDocument soapEnvelopeXml;
1300:   
1301:              xmlContent = @"
1302:          <NgcfAgcfGatewayRecordAid>" + tableId + "`" + gwId + @"</NgcfAgcfGatewayRecordAid>
1303:          <TableId>" + tableId + @"</TableId>
1304:          <GwId>" + gwId + @"</GwId>
1305:          <IP1>" + ip1 + @"</IP1>";
1306:   
1307:              soapEnvelopeXml = SoapEnvelopeXml("ed-ngfs-agcfgatewayrecord-v2", xmlContent, sessionId, "", primarySwitch); //, nddOnt.ImsFsdb);
1308:   
1309:              return soapEnvelopeXml;
1310:          }
1311:   
1312:          ////////////////////////////////////////////////////////////////////////////
1313:   
1314:          /// <summary>
1315:          ///
1316:          /// <remarks>
1317:          /// </remarks>
1318:          /// </summary>
1319:          private static XmlDocument DltNgfsAgcfGwCombinedRecV2SoapEnvelopeXml(int tableId, int gwId, string primarySwitch, string sessionId)
1320:          {
1321:              string xmlContent;
1322:              XmlDocument soapEnvelopeXml;
1323:   
1324:              xmlContent = @"
1325:      <AgcfGatewayRecord>
1326:          <NgcfAgcfGatewayRecordAid>" + tableId + "`" + gwId + @"</NgcfAgcfGatewayRecordAid>
1327:          <TableId>" + tableId + @"</TableId>
1328:          <GwId>" + gwId + @"</GwId>
1329:      </AgcfGatewayRecord>";
1330:   
1331:              soapEnvelopeXml = SoapEnvelopeXml("dlt-ngfs-agcfgwcombinedrec-v2", xmlContent, sessionId, "", primarySwitch); //, nddOnt.ImsFsdb);
1332:   
1333:              return soapEnvelopeXml;
1334:          }
1335:   
1336:          ////////////////////////////////////////////////////////////////////////////
1337:          ////////////////////////////////////////////////////////////////////////////
1338:   
1339:          /// <summary>
1340:          ///
1341:          /// <remarks>
1342:          ///   <PlexViewRequest Command="rtrv-ngfs-agcfgatewayrecord-v2" SwitchName="TECICS01" RequestId="" SessionId="ngnAPI:1086840178" MaxRows="-1">
1343:          ///     <NgcfAgcfGatewayRecordAid>6`2101</NgcfAgcfGatewayRecordAid>
1344:          ///   </PlexViewRequest>
1345:          /// </remarks>
1346:          /// </summary>
1347:          private static XmlDocument RtrvNgcfAgcfGatewayRecordV2SoapEnvelopeXml(int tableId, int gwId, string sessionId)
1348:          {
1349:              XmlDocument soapEnvelopeXml;
1350:              Dictionary<string, string> param;
1351:   
1352:              param = new Dictionary<string, string>();
1353:   
1354:              param.Add("NgcfAgcfGatewayRecordAid", tableId + "`" + gwId);
1355:   
1356:              soapEnvelopeXml = SoapEnvelopeXml("rtrv-ngfs-agcfgatewayrecord-v2", param, sessionId, "", Ia.Ngn.Cl.Model.Business.Nokia.Ims.AnyPrimarySwitch);
1357:   
1358:              return soapEnvelopeXml;
1359:          }
1360:   
1361:          ////////////////////////////////////////////////////////////////////////////
1362:   
1363:          /// <summary>
1364:          /// Read from SKB side
1365:          /// <remarks>
1366:          ///   <PlexViewRequest Command="rtrv-ngfs-agcfgatewayrecord-v2" SwitchName="TECICS01" RequestId="" SessionId="ngnAPI:1086840178" MaxRows="-1">
1367:          ///     <NgcfAgcfGatewayRecordAid>6`2101</NgcfAgcfGatewayRecordAid>
1368:          ///   </PlexViewRequest>
1369:          /// </remarks>
1370:          /// </summary>
1371:          private static XmlDocument RtrvNgcfAgcfGatewayRecordFromSkbV2SoapEnvelopeXml(int tableId, int gwId, string sessionId)
1372:          {
1373:              XmlDocument soapEnvelopeXml;
1374:              Dictionary<string, string> param;
1375:   
1376:              param = new Dictionary<string, string>();
1377:   
1378:              param.Add("NgcfAgcfGatewayRecordAid", tableId + "`" + gwId);
1379:   
1380:              soapEnvelopeXml = SoapEnvelopeXml("rtrv-ngfs-agcfgatewayrecord-v2", param, sessionId, "", Ia.Ngn.Cl.Model.Business.Nokia.Ims.SKB);
1381:   
1382:              return soapEnvelopeXml;
1383:          }
1384:   
1385:          ////////////////////////////////////////////////////////////////////////////
1386:   
1387:          /// <summary>
1388:          ///
1389:          /// <remarks>
1390:          ///   <PlexViewRequest Command="dlt-ngfs-agcfgatewayrecord-v2" SwitchName="TECICS01" RequestId="" SessionId="ngnAPI:1086840178" MaxRows="-1">
1391:          ///     <NgcfAgcfGatewayRecordAid>6`2101</NgcfAgcfGatewayRecordAid>
1392:          ///   </PlexViewRequest>
1393:          /// </remarks>
1394:          /// </summary>
1395:          private static XmlDocument DltNgcfAgcfGatewayRecordV2SoapEnvelopeXml(int tableId, int gwId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
1396:          {
1397:              XmlDocument soapEnvelopeXml;
1398:              Dictionary<string, string> param;
1399:   
1400:              param = new Dictionary<string, string>();
1401:   
1402:              param.Add("NgcfAgcfGatewayRecordAid", tableId + "`" + gwId);
1403:   
1404:              soapEnvelopeXml = SoapEnvelopeXml("dlt-ngfs-agcfgatewayrecord-v2", param, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1405:   
1406:              return soapEnvelopeXml;
1407:          }
1408:   
1409:          ////////////////////////////////////////////////////////////////////////////
1410:          ////////////////////////////////////////////////////////////////////////////
1411:   
1412:          /// <summary>
1413:          ///
1414:          /// <remarks>
1415:          /// </remarks>
1416:          /// </summary>
1417:          private static XmlDocument EntNgfsAgcfEndpointV2SoapEnvelopeXml(string service, int gwId, int flatTermId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
1418:          {
1419:              string xmlContent, prividUser, dn;
1420:              XmlDocument soapEnvelopeXml;
1421:   
1422:              prividUser = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PrividUser(service);
1423:              dn = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Dn(service);
1424:   
1425:              xmlContent = @"
1426:      <PrividUser>" + prividUser + @"</PrividUser>
1427:      <GwId>" + gwId + @"</GwId>
1428:      <Dn>" + dn + @"</Dn>
1429:      <FlatTermID>" + flatTermId + @"</FlatTermID>
1430:      <Slot>0</Slot>
1431:      <Port>0</Port>
1432:      <AdditionalDNs></AdditionalDNs>
1433:      <DomainIndex>0</DomainIndex>
1434:      <FeatureFlag>0</FeatureFlag>
1435:      <DslamId></DslamId>
1436:      <Rack>-1</Rack>
1437:      <Shelf>0</Shelf>
1438:      <SubscriberType>Analog</SubscriberType>
1439:      <ReversePolarity>UPON_DIGIT_COLLECTION_ALWAYS</ReversePolarity>
1440:      <PayphoneMetering>PAYPHONE_PULSE_METERING_16_KHZ</PayphoneMetering>
1441:      <DigitMap1st>0</DigitMap1st>
1442:      <DigitMap2nd>0</DigitMap2nd>
1443:      <DialTone2nd>0</DialTone2nd>
1444:      <CallHoldLc>true</CallHoldLc>
1445:      <CallWaitingLc>false</CallWaitingLc>
1446:      <CallToggleLc>true</CallToggleLc>
1447:      <ThreeWayCallLc>true</ThreeWayCallLc>
1448:      <McidLc>false</McidLc>
1449:      <CallTransferLc>false</CallTransferLc>
1450:  ";
1451:   
1452:              soapEnvelopeXml = SoapEnvelopeXml("ent-ngfs-agcfendpoint-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1453:   
1454:              return soapEnvelopeXml;
1455:          }
1456:   
1457:          ////////////////////////////////////////////////////////////////////////////
1458:   
1459:          /// <summary>
1460:          ///
1461:          /// </summary>
1462:          private static XmlDocument EdNgfsAgcfEndpointV2SoapEnvelopeXml_CallWaiting(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, bool serviceAssigned, string sessionId)
1463:          {
1464:              string xmlContent, prividUser, value;
1465:              XmlDocument soapEnvelopeXml;
1466:   
1467:              prividUser = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PrividUser(service);
1468:              value = Convert.ToString(serviceAssigned).ToLower();
1469:   
1470:              xmlContent = @"
1471:      <PrividUser>" + prividUser + @"</PrividUser>
1472:      <CallWaitingLc>" + value + @"</CallWaitingLc>
1473:  ";
1474:   
1475:              soapEnvelopeXml = SoapEnvelopeXml("ed-ngfs-agcfendpoint-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1476:   
1477:              return soapEnvelopeXml;
1478:          }
1479:   
1480:          ////////////////////////////////////////////////////////////////////////////
1481:   
1482:          /// <summary>
1483:          ///
1484:          /// <remarks>
1485:          ///   <PlexViewRequest Command="rtrv-ngfs-agcfendpoint-v2" SwitchName="TECICS01" Fsdb="fsdb0" RequestId="" SessionId="ngnAPI:1946199540" MaxRows="-1">
1486:          ///   <PrividUser>priv_96522239100</PrividUser>
1487:          ///   </PlexViewRequest>
1488:          /// </remarks>
1489:          /// </summary>
1490:          private static XmlDocument RtrvNgfsAgcfEndpointV2SoapEnvelopeXml(string prividUser, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
1491:          {
1492:              XmlDocument soapEnvelopeXml;
1493:              Dictionary<string, string> param;
1494:   
1495:              param = new Dictionary<string, string>();
1496:   
1497:              param.Add("PrividUser", prividUser);
1498:   
1499:              soapEnvelopeXml = SoapEnvelopeXml("rtrv-ngfs-agcfendpoint-v2", param, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1500:   
1501:              return soapEnvelopeXml;
1502:          }
1503:   
1504:          ////////////////////////////////////////////////////////////////////////////
1505:   
1506:          /// <summary>
1507:          ///
1508:          /// <remarks>
1509:          /// <PlexViewRequest Command="rtrv-ngfs-agcfendpoint-v2" SwitchName="TECICS01" Fsdb="fsdb2" RequestId="" SessionId="ngnAPI:1313903573" MaxRows="4">
1510:          ///   <filter>
1511:          ///     <search>
1512:          ///       <searchby>GwId</searchby>
1513:          ///       <searchstring>2463</searchstring>
1514:          ///       <operation>Equals</operation>
1515:          ///       <caseSensitive>false</caseSensitive>
1516:          ///     </search>
1517:          ///   </filter>
1518:          /// </PlexViewRequest>
1519:          /// </remarks>
1520:          /// </summary>
1521:          private static XmlDocument RtrvNgfsAgcfEndpointV2SoapEnvelopeXml(int gwId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
1522:          {
1523:              string xmlContent;
1524:              XmlDocument soapEnvelopeXml;
1525:   
1526:              xmlContent = @"
1527:      <filter>
1528:          <search>
1529:              <searchby>GwId</searchby>
1530:              <searchstring>" + gwId + @"</searchstring>
1531:              <operation>Equals</operation>
1532:              <caseSensitive>false</caseSensitive>
1533:          </search>
1534:      </filter>
1535:  ";
1536:   
1537:              soapEnvelopeXml = SoapEnvelopeXml("rtrv-ngfs-agcfendpoint-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1538:   
1539:              return soapEnvelopeXml;
1540:          }
1541:   
1542:          ////////////////////////////////////////////////////////////////////////////
1543:   
1544:          /// <summary>
1545:          ///
1546:          /// <remarks>
1547:          /// <PlexViewRequest Command="rtrv-ngfs-agcfendpoint-v2" SwitchName="TECICS01" Fsdb="fsdb2" RequestId="" SessionId="ngnAPI:1313903573" MaxRows="4">
1548:          ///   <filter>
1549:          ///     <search>
1550:          ///       <searchby>GwId</searchby>
1551:          ///       <searchstring>2463</searchstring>
1552:          ///       <operation>Equals</operation>
1553:          ///       <caseSensitive>false</caseSensitive>
1554:          ///     </search>
1555:          ///   </filter>
1556:          /// </PlexViewRequest>
1557:          /// </remarks>
1558:          /// </summary>
1559:          private static XmlDocument RtrvNgfsAgcfEndpointV2SoapEnvelopeXml(int gwId, string primarySwitch, int imsService, string sessionId)
1560:          {
1561:              string xmlContent, imsFsdb;
1562:              XmlDocument soapEnvelopeXml;
1563:   
1564:              imsFsdb = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsFsdb(imsService, primarySwitch);
1565:   
1566:              xmlContent = @"
1567:      <filter>
1568:          <search>
1569:              <searchby>GwId</searchby>
1570:              <searchstring>" + gwId + @"</searchstring>
1571:              <operation>Equals</operation>
1572:              <caseSensitive>false</caseSensitive>
1573:          </search>
1574:      </filter>
1575:  ";
1576:   
1577:              soapEnvelopeXml = SoapEnvelopeXml("rtrv-ngfs-agcfendpoint-v2", xmlContent, sessionId, "", primarySwitch, imsFsdb);
1578:   
1579:              return soapEnvelopeXml;
1580:          }
1581:   
1582:          ////////////////////////////////////////////////////////////////////////////
1583:   
1584:          /// <summary>
1585:          ///
1586:          /// <remarks>
1587:          ///   <PlexViewRequest Command="dlt-ngfs-agcfendpoint-v2" SwitchName="TECICS01" Fsdb="fsdb0" RequestId="" SessionId="ngnAPI:1946199540" MaxRows="-1">
1588:          ///   <PrividUser>priv_96522239100</PrividUser>
1589:          ///   </PlexViewRequest>
1590:          /// </remarks>
1591:          /// </summary>
1592:          private static XmlDocument DltNgfsAgcfEndpointV2SoapEnvelopeXml(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
1593:          {
1594:              string prividUser;
1595:              XmlDocument soapEnvelopeXml;
1596:              Dictionary<string, string> param;
1597:   
1598:              prividUser = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PridUser(service);
1599:   
1600:              param = new Dictionary<string, string>();
1601:   
1602:              param.Add("PrividUser", prividUser);
1603:   
1604:              soapEnvelopeXml = SoapEnvelopeXml("dlt-ngfs-agcfendpoint-v2", param, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1605:   
1606:              return soapEnvelopeXml;
1607:          }
1608:   
1609:          ////////////////////////////////////////////////////////////////////////////
1610:   
1611:          /// <summary>
1612:          ///
1613:          /// <remarks>
1614:          ///   <PlexViewRequest Command="dlt-ngfs-agcfendpoint-v2" SwitchName="TECICS01" Fsdb="fsdb0" RequestId="" SessionId="ngnAPI:1946199540" MaxRows="-1">
1615:          ///   <PrividUser>priv_96522239100</PrividUser>
1616:          ///   </PlexViewRequest>
1617:          /// </remarks>
1618:          /// </summary>
1619:          private static XmlDocument DltNgfsAgcfEndpointV2SoapEnvelopeXml(string service, string primarySwitch, string fsdb, string sessionId)
1620:          {
1621:              string prividUser;
1622:              XmlDocument soapEnvelopeXml;
1623:              Dictionary<string, string> param;
1624:   
1625:              prividUser = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PridUser(service);
1626:   
1627:              param = new Dictionary<string, string>();
1628:   
1629:              param.Add("PrividUser", prividUser);
1630:   
1631:              soapEnvelopeXml = SoapEnvelopeXml("dlt-ngfs-agcfendpoint-v2", param, sessionId, "", primarySwitch, fsdb);
1632:   
1633:              return soapEnvelopeXml;
1634:          }
1635:   
1636:          /*
1637:          ////////////////////////////////////////////////////////////////////////////
1638:          ////////////////////////////////////////////////////////////////////////////
1639:  
1640:          /// <summary>
1641:          ///
1642:          /// <remarks>
1643:          /// </remarks>
1644:          /// </summary>
1645:          private static XmlDocument EntNgfsSubPartyV2SoapEnvelopeXml(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
1646:          {
1647:              // Not used. Subparty is created and deleted with subscriber
1648:  
1649:              int applicationServerId, serviceProfileNumber;
1650:              string xmlContent, partyId, primaryPuid, alternateFsdbFqdn, assocOtasRealm, alternateOtasRealm;
1651:              XmlDocument soapEnvelopeXml;
1652:  
1653:              partyId = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PartyId(service);
1654:              primaryPuid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PrimaryPuid(service);
1655:  
1656:              Ia.Ngn.Cl.Model.Business.Nokia.Ims.AssocAndAlternateOtasRealm(nddOnt.PrimarySwitch, nddOnt.ImsFsdb, out applicationServerId, out assocOtasRealm, out alternateOtasRealm);
1657:  
1658:              serviceProfileNumber = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ServiceProfileNumber(applicationServerId);
1659:  
1660:              alternateFsdbFqdn = Ia.Ngn.Cl.Model.Business.Nokia.Ims.AlternateFsdbFqdn(nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1661:  
1662:              xmlContent = @"
1663:      <PartyId>" + partyId + @"</PartyId>
1664:      <PrimaryPUID>" + primaryPuid + @"</PrimaryPUID>
1665:      <DisplayName>" + service + @"</DisplayName>
1666:      <AssocOtasRealm>" + assocOtasRealm + @"</AssocOtasRealm>
1667:      <AlternateFsdbFqdn>" + alternateFsdbFqdn + @"</AlternateFsdbFqdn>
1668:      <Category>RESIDENTIALSUBSCRIBER_R2</Category>
1669:      <PrimaryPUIDDomainRequired>false</PrimaryPUIDDomainRequired>
1670:      <PrimaryPUIDCPEProfileNumber>0</PrimaryPUIDCPEProfileNumber>
1671:      <PrimaryPUIDFlashable>false</PrimaryPUIDFlashable>
1672:      <NetworkProfileName></NetworkProfileName>
1673:      <NetworkProfileVersion>0</NetworkProfileVersion>
1674:      <ServiceProfileName></ServiceProfileName>
1675:      <ServiceProfileVersion>0</ServiceProfileVersion>
1676:      <IsReducedServiceProfile>false</IsReducedServiceProfile>
1677:      <CallLimit>2</CallLimit>
1678:      <ServiceSuspension>false</ServiceSuspension>
1679:      <OriginationSuspension>false</OriginationSuspension>
1680:      <TerminationSuspension>false</TerminationSuspension>
1681:      <SuspensionNotification>false</SuspensionNotification>
1682:      <UserOrigSuspension>false</UserOrigSuspension>
1683:      <UserTermSuspension>false</UserTermSuspension>
1684:      <AssocWpifRealm></AssocWpifRealm>
1685:      <IddPrefix></IddPrefix>
1686:      <SharedHssData>false</SharedHssData>
1687:      <Pin></Pin>
1688:      <MsnCapability>false</MsnCapability>
1689:      <VideoProhibit>false</VideoProhibit>
1690:      <MaxFwdHops>10</MaxFwdHops>
1691:      <CsdFlavor>TAS_CSD_NONE</CsdFlavor>
1692:      <CsdDynamic>false</CsdDynamic>
1693:      <SipErrorTableId>0</SipErrorTableId>
1694:      <TreatmentTableId>0</TreatmentTableId>
1695:      <Locale></Locale>
1696:      <CliPrefixList></CliPrefixList>
1697:      <IsGroupCPE>false</IsGroupCPE>
1698:      <Receive181Mode>TAS_181_NONE</Receive181Mode>
1699:      <CcNdcLength>0</CcNdcLength>
1700:      <MaxActiveCalls>0</MaxActiveCalls>
1701:      <CallingPartyCategory>CPC_ORDINARY</CallingPartyCategory>
1702:      <PublicUID1></PublicUID1>
1703:      <PublicUID2></PublicUID2>
1704:      <PublicUID3></PublicUID3>
1705:      <PublicUID4></PublicUID4>
1706:      <PublicUID5></PublicUID5>
1707:      <PublicUID6></PublicUID6>
1708:      <PublicUID7></PublicUID7>
1709:      <PublicUID8></PublicUID8>
1710:      <PublicUID9></PublicUID9>
1711:      <PublicUID1DomainRequired>false</PublicUID1DomainRequired>
1712:      <PublicUID2DomainRequired>false</PublicUID2DomainRequired>
1713:      <PublicUID3DomainRequired>false</PublicUID3DomainRequired>
1714:      <PublicUID4DomainRequired>false</PublicUID4DomainRequired>
1715:      <PublicUID5DomainRequired>false</PublicUID5DomainRequired>
1716:      <PublicUID6DomainRequired>false</PublicUID6DomainRequired>
1717:      <PublicUID7DomainRequired>false</PublicUID7DomainRequired>
1718:      <PublicUID8DomainRequired>false</PublicUID8DomainRequired>
1719:      <PublicUID9DomainRequired>false</PublicUID9DomainRequired>
1720:      <WildCardPUIDStr></WildCardPUIDStr>
1721:      <AllowCustomAnnouncement>false</AllowCustomAnnouncement>
1722:      <PtySpareLong1>0</PtySpareLong1>
1723:      <PtySpareString></PtySpareString>
1724:      <PtySpareString2></PtySpareString2>
1725:      <PtySpareShort1>0</PtySpareShort1>
1726:      <PtySpareShort2>0</PtySpareShort2>
1727:      <PtySpareBool1>false</PtySpareBool1>
1728:      <PtySpareBool2>false</PtySpareBool2>
1729:      <PtySpareBool3>false</PtySpareBool3>
1730:      <PtySpareBool4>false</PtySpareBool4>
1731:      <PtySpareBool5>false</PtySpareBool5>
1732:      <PtySpareBool6>false</PtySpareBool6>
1733:      <PtySpareBool7>false</PtySpareBool7>
1734:      <PtySpareBool8>false</PtySpareBool8>
1735:      <TerminatingTableId>0</TerminatingTableId>
1736:      <AllowNonSipTelUri>false</AllowNonSipTelUri>
1737:      <LocationType>None</LocationType>
1738:      <RncID></RncID>
1739:      <LteMcc></LteMcc>
1740:      <LteMnc></LteMnc>
1741:      <LteTac></LteTac>
1742:      <MarketSID></MarketSID>
1743:      <SwitchNumber></SwitchNumber>
1744:      <CallsToWebUserProhibited>false</CallsToWebUserProhibited>
1745:      <IMSI></IMSI>
1746:      <IMSNotSupported>false</IMSNotSupported>
1747:      <ValidateCellID>false</ValidateCellID>
1748:      <OperatorID>0</OperatorID>
1749:      <HomeMTA>0</HomeMTA>
1750:      <ForwardDenyNumbers>false</ForwardDenyNumbers>
1751:      <PlayAnnoFailNotForward>false</PlayAnnoFailNotForward>
1752:      <MrfPoolID>0</MrfPoolID>
1753:      <Custom120x>false</Custom120x>
1754:  ";
1755:  
1756:              soapEnvelopeXml = SoapEnvelopeXml("ent-ngfs-subparty-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1757:  
1758:              return soapEnvelopeXml;
1759:          }
1760:          */
1761:   
1762:          ////////////////////////////////////////////////////////////////////////////
1763:   
1764:          /// <summary>
1765:          ///
1766:          /// <remarks>
1767:          ///   <PlexViewRequest Command="rtrv-ngfs-subscriber-v2" SwitchName="TECICS01" Fsdb="fsdb0" RequestId="" SessionId="ngnAPI:1642424089" MaxRows="-1">
1768:          ///       <SubParty>
1769:          ///               <PartyId>+96522239100</PartyId>
1770:          ///     </SubParty>
1771:          ///   </PlexViewRequest>
1772:          /// </remarks>
1773:          /// </summary>
1774:          private static XmlDocument RtrvNgfsSubPartyV2SoapEnvelopeXml(string partyId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
1775:          {
1776:              string xmlContent;
1777:              XmlDocument soapEnvelopeXml;
1778:   
1779:              xmlContent = @"
1780:      <Aid>" + partyId + @"</Aid>
1781:  ";
1782:   
1783:              soapEnvelopeXml = SoapEnvelopeXml("rtrv-ngfs-subparty-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1784:   
1785:              return soapEnvelopeXml;
1786:          }
1787:   
1788:          ////////////////////////////////////////////////////////////////////////////
1789:   
1790:          /// <summary>
1791:          ///
1792:          /// <remarks>
1793:          ///   <PlexViewRequest Command="rtrv-ngfs-subscriber-v2" SwitchName="TECICS01" Fsdb="fsdb0" RequestId="" SessionId="ngnAPI:1642424089" MaxRows="-1">
1794:          ///       <SubParty>
1795:          ///               <PartyId>+96522239100</PartyId>
1796:          ///     </SubParty>
1797:          ///   </PlexViewRequest>
1798:          /// </remarks>
1799:          /// </summary>
1800:          private static XmlDocument RtrvNgfsSubPartyV2SoapEnvelopeXml(string partyId, string primarySwitch, int imsService, string sessionId)
1801:          {
1802:              string xmlContent, imsFsdb;
1803:              XmlDocument soapEnvelopeXml;
1804:   
1805:              imsFsdb = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsFsdb(imsService, primarySwitch);
1806:   
1807:              xmlContent = @"
1808:      <Aid>" + partyId + @"</Aid>
1809:  ";
1810:   
1811:              soapEnvelopeXml = SoapEnvelopeXml("rtrv-ngfs-subparty-v2", xmlContent, sessionId, "", primarySwitch, imsFsdb);
1812:   
1813:              return soapEnvelopeXml;
1814:          }
1815:   
1816:          ////////////////////////////////////////////////////////////////////////////
1817:   
1818:          /// <summary>
1819:          ///
1820:          /// <remarks>
1821:          ///   <PlexViewRequest Command="dlt-ngfs-subparty-v2" SwitchName="TECICS01" RequestId="" SessionId="ngnAPI:1086840178" MaxRows="-1">
1822:          ///     <PartyId>+96522239100</PartyId>
1823:          ///   </PlexViewRequest>
1824:          /// </remarks>
1825:          /// </summary>
1826:          private static XmlDocument DltNgfsSubPartyV2SoapEnvelopeXml(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
1827:          {
1828:              // Not used. Subparty is created and deleted with subscriber
1829:   
1830:              string xmlContent, partyId;
1831:              XmlDocument soapEnvelopeXml;
1832:   
1833:              partyId = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PartyId(service);
1834:   
1835:              xmlContent = @"
1836:      <Aid>" + partyId + @"</Aid>
1837:  ";
1838:   
1839:              soapEnvelopeXml = SoapEnvelopeXml("dlt-ngfs-subparty-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1840:   
1841:              return soapEnvelopeXml;
1842:          }
1843:   
1844:          ////////////////////////////////////////////////////////////////////////////
1845:          ////////////////////////////////////////////////////////////////////////////
1846:   
1847:          /// <summary>
1848:          ///
1849:          /// </summary>
1850:          private static XmlDocument EntNgfsSubscriberV2SoapEnvelopeXml(string service, bool isSip, int gwId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
1851:          {
1852:              bool sendTelURI;
1853:              int applicationServerId, prsetNumber, serviceProfileNumber, primaryPUIDCPEProfileNumber;
1854:              string xmlContent, partyId, primaryPuid, domainName, alternateFsdbFqdn, assocOtasRealm, alternateOtasRealm;
1855:              XmlDocument soapEnvelopeXml;
1856:   
1857:              domainName = "ims.moc1.kw";
1858:              sendTelURI = true;
1859:   
1860:              partyId = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PartyId(service);
1861:              primaryPuid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PrimaryPuid(service);
1862:   
1863:              if (isSip)
1864:              {
1865:                  prsetNumber = 0;
1866:                  primaryPUIDCPEProfileNumber = Ia.Ngn.Cl.Model.Business.Nokia.Ims.PrimaryPUIDCPEProfileNumberForSip;
1867:              }
1868:              else // if H.248
1869:              {
1870:                  prsetNumber = gwId;
1871:                  primaryPUIDCPEProfileNumber = Ia.Ngn.Cl.Model.Business.Nokia.Ims.PrimaryPUIDCPEProfileNumberForH248;
1872:              }
1873:   
1874:              Ia.Ngn.Cl.Model.Business.Nokia.Ims.AssocAndAlternateOtasRealm(nddOnt.PrimarySwitch, nddOnt.ImsFsdb, out applicationServerId, out assocOtasRealm, out alternateOtasRealm);
1875:   
1876:              serviceProfileNumber = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ServiceProfileNumber(applicationServerId);
1877:   
1878:              alternateFsdbFqdn = Ia.Ngn.Cl.Model.Business.Nokia.Ims.AlternateFsdbFqdn(nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1879:   
1880:              /*
1881:  <SubParty>
1882:      <PartyId>" + partyId + @"</PartyId>
1883:      <PrimaryPUID>" + primaryPuid + @"</PrimaryPUID>
1884:      <AssocOtasRealm>" + assocOtasRealm + @"</AssocOtasRealm>
1885:      <Category>RESIDENTIALSUBSCRIBER_R2</Category>
1886:  </SubParty>
1887:              */
1888:   
1889:              xmlContent = @"    
1890:      <SubParty>
1891:          <PartyId>" + partyId + @"</PartyId>
1892:          <PrimaryPUID>" + primaryPuid + @"</PrimaryPUID>
1893:          <DisplayName>" + service + @"</DisplayName>
1894:          <AssocOtasRealm>" + assocOtasRealm + @"</AssocOtasRealm>
1895:          <AlternateFsdbFqdn>" + alternateFsdbFqdn + @"</AlternateFsdbFqdn>
1896:          <PrimaryPUIDCPEProfileNumber>" + primaryPUIDCPEProfileNumber + @"</PrimaryPUIDCPEProfileNumber>
1897:          <Category>RESIDENTIALSUBSCRIBER_R2</Category>
1898:          <CallLimit>3</CallLimit>
1899:          <MaxFwdHops>5</MaxFwdHops>
1900:          <MaxActiveCalls>3</MaxActiveCalls>
1901:          <CliPrefixList>965</CliPrefixList>
1902:      </SubParty>
1903:      <AlternateOtasRealm>" + alternateOtasRealm + @"</AlternateOtasRealm>"
1904:                                                + InternationalCallingXml(service, false)
1905:                                                + DialingPlanXml(service)
1906:                                                + HSSPrivateIdXml(service, prsetNumber, domainName, serviceProfileNumber, sendTelURI)
1907:                                                + GeoRedundancyDataXml(service, prsetNumber, domainName, serviceProfileNumber, sendTelURI)
1908:                                                ;
1909:   
1910:              soapEnvelopeXml = SoapEnvelopeXml("ent-ngfs-subscriber-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1911:   
1912:              return soapEnvelopeXml;
1913:          }
1914:   
1915:          ////////////////////////////////////////////////////////////////////////////
1916:          ////////////////////////////////////////////////////////////////////////////
1917:   
1918:          /// <summary>
1919:          ///
1920:          /// <remarks>
1921:          /// </remarks>
1922:          /// </summary>
1923:          private static XmlDocument EdNgfsSubscriberV2SoapEnvelopeXml(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId, string xml)
1924:          {
1925:              string partyId, xmlContent;
1926:              XmlDocument soapEnvelopeXml;
1927:   
1928:              partyId = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PartyId(service);
1929:   
1930:              xmlContent = @"
1931:      <SubParty>
1932:          <PartyId>" + partyId + @"</PartyId>
1933:      </SubParty>
1934:  "
1935:                                                + xml
1936:                                                ;
1937:   
1938:              soapEnvelopeXml = SoapEnvelopeXml("ed-ngfs-subscriber-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1939:   
1940:              return soapEnvelopeXml;
1941:          }
1942:   
1943:          ////////////////////////////////////////////////////////////////////////////
1944:   
1945:          /// <summary>
1946:          ///
1947:          /// <remarks>
1948:          /// </remarks>
1949:          /// </summary>
1950:          private static XmlDocument EdNgfsSubscriberV2_H248ToSipSoapEnvelopeXml(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
1951:          {
1952:              bool sendTelURI;
1953:              int applicationServerId, prsetNumber, serviceProfileNumber, primaryPUIDCPEProfileNumber;
1954:              string xmlContent, partyId, domainName, assocOtasRealm, alternateOtasRealm;
1955:              XmlDocument soapEnvelopeXml;
1956:   
1957:              domainName = "ims.moc1.kw";
1958:              sendTelURI = true;
1959:   
1960:              partyId = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PartyId(service);
1961:   
1962:              prsetNumber = 0;
1963:              primaryPUIDCPEProfileNumber = Ia.Ngn.Cl.Model.Business.Nokia.Ims.PrimaryPUIDCPEProfileNumberForSip;
1964:   
1965:              Ia.Ngn.Cl.Model.Business.Nokia.Ims.AssocAndAlternateOtasRealm(nddOnt.PrimarySwitch, nddOnt.ImsFsdb, out applicationServerId, out assocOtasRealm, out alternateOtasRealm);
1966:   
1967:              serviceProfileNumber = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ServiceProfileNumber(applicationServerId);
1968:   
1969:              xmlContent = @"    
1970:      <SubParty>
1971:          <PartyId>" + partyId + @"</PartyId>
1972:          <PrimaryPUIDCPEProfileNumber>" + primaryPUIDCPEProfileNumber + @"</PrimaryPUIDCPEProfileNumber>
1973:      </SubParty>"
1974:   
1975:                                                + HSSPrivateIdXml(service, prsetNumber, domainName, serviceProfileNumber, sendTelURI)
1976:                                                ;
1977:   
1978:              soapEnvelopeXml = SoapEnvelopeXml("ed-ngfs-subscriber-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
1979:   
1980:              return soapEnvelopeXml;
1981:          }
1982:   
1983:          ////////////////////////////////////////////////////////////////////////////
1984:   
1985:          /// <summary>
1986:          ///
1987:          /// <remarks>
1988:          /// </remarks>
1989:          /// </summary>
1990:          private static XmlDocument EdNgfsSubscriberV2WithinSubPartySoapEnvelopeXml(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId, string xml)
1991:          {
1992:              string partyId, xmlContent;
1993:              XmlDocument soapEnvelopeXml;
1994:   
1995:              partyId = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PartyId(service);
1996:   
1997:              xmlContent = @"
1998:      <SubParty>
1999:          <PartyId>" + partyId + @"</PartyId>"
2000:                     + xml + @"
2001:      </SubParty>";
2002:   
2003:              soapEnvelopeXml = SoapEnvelopeXml("ed-ngfs-subscriber-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
2004:   
2005:              return soapEnvelopeXml;
2006:          }
2007:   
2008:          ////////////////////////////////////////////////////////////////////////////
2009:          ////////////////////////////////////////////////////////////////////////////
2010:   
2011:          /// <summary>
2012:          ///
2013:          /// <remarks>
2014:          /// <PlexViewRequest Command="rtrv-ngfs-subscriber-v2" SwitchName="TECICS01" RequestId="" SessionId="ngnAPI:148964391" MaxRows="-1">
2015:          ///  <aid>+96522239501</aid>
2016:          /// </PlexViewRequest>
2017:          /// </remarks>
2018:          /// </summary>
2019:          private static XmlDocument RtrvNgfsSubscriberV2SoapEnvelopeXml(string partyId, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
2020:          {
2021:              string xmlContent;
2022:              XmlDocument soapEnvelopeXml;
2023:   
2024:              xmlContent = @"
2025:      <SubParty>
2026:          <PartyId>" + partyId + @"</PartyId>
2027:      </SubParty>
2028:  ";
2029:   
2030:              soapEnvelopeXml = SoapEnvelopeXml("rtrv-ngfs-subscriber-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
2031:   
2032:              return soapEnvelopeXml;
2033:          }
2034:   
2035:          ////////////////////////////////////////////////////////////////////////////
2036:   
2037:          /// <summary>
2038:          ///
2039:          /// <remarks>
2040:          /// <PlexViewRequest Command="rtrv-ngfs-subscriber-v2" SwitchName="TECICS01" RequestId="" SessionId="ngnAPI:148964391" MaxRows="-1">
2041:          ///  <aid>+96522239501</aid>
2042:          /// </PlexViewRequest>
2043:          /// </remarks>
2044:          /// </summary>
2045:          private static XmlDocument RtrvNgfsSubscriberV2SoapEnvelopeXml(string partyId, string primarySwitch, int imsService, string sessionId)
2046:          {
2047:              string xmlContent, imsFsdb;
2048:              XmlDocument soapEnvelopeXml;
2049:   
2050:              imsFsdb = Ia.Ngn.Cl.Model.Business.Nokia.Ims.ImsFsdb(imsService, primarySwitch);
2051:   
2052:              xmlContent = @"
2053:      <SubParty>
2054:          <PartyId>" + partyId + @"</PartyId>
2055:      </SubParty>
2056:  ";
2057:   
2058:              soapEnvelopeXml = SoapEnvelopeXml("rtrv-ngfs-subscriber-v2", xmlContent, sessionId, "", primarySwitch, imsFsdb);
2059:   
2060:              return soapEnvelopeXml;
2061:          }
2062:   
2063:          ////////////////////////////////////////////////////////////////////////////
2064:   
2065:          /// <summary>
2066:          ///
2067:          /// <remarks>
2068:          ///   <PlexViewRequest Command="dlt-ngfs-subscriber-v2" SwitchName="TECICS01" RequestId="" SessionId="ngnAPI:1086840178" MaxRows="-1">
2069:          ///   <SubParty>
2070:          ///     <PartyId>+96522239100</PartyId>
2071:          ///    </SubParty>
2072:          ///   </PlexViewRequest>
2073:          /// </remarks>
2074:          /// </summary>
2075:          private static XmlDocument DltNgfsSubscriberV2SoapEnvelopeXml(string service, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt, string sessionId)
2076:          {
2077:              string partyId, xmlContent;
2078:              XmlDocument soapEnvelopeXml;
2079:   
2080:              partyId = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PartyId(service);
2081:   
2082:              xmlContent = @"
2083:      <SubParty>
2084:          <PartyId>" + partyId + @"</PartyId>
2085:      </SubParty>
2086:  ";
2087:   
2088:              soapEnvelopeXml = SoapEnvelopeXml("dlt-ngfs-subscriber-v2", xmlContent, sessionId, "", nddOnt.PrimarySwitch, nddOnt.ImsFsdb);
2089:   
2090:              return soapEnvelopeXml;
2091:          }
2092:   
2093:          ////////////////////////////////////////////////////////////////////////////
2094:   
2095:          /// <summary>
2096:          ///
2097:          /// <remarks>
2098:          ///   <PlexViewRequest Command="dlt-ngfs-subscriber-v2" SwitchName="TECICS01" RequestId="" SessionId="ngnAPI:1086840178" MaxRows="-1">
2099:          ///   <SubParty>
2100:          ///     <PartyId>+96522239100</PartyId>
2101:          ///    </SubParty>
2102:          ///   </PlexViewRequest>
2103:          /// </remarks>
2104:          /// </summary>
2105:          private static XmlDocument DltNgfsSubscriberV2SoapEnvelopeXml(string service, string primarySwitch, string fsdb, string sessionId)
2106:          {
2107:              string partyId, xmlContent;
2108:              XmlDocument soapEnvelopeXml;
2109:   
2110:              partyId = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PartyId(service);
2111:   
2112:              xmlContent = @"
2113:      <SubParty>
2114:          <PartyId>" + partyId + @"</PartyId>
2115:      </SubParty>
2116:  ";
2117:   
2118:              soapEnvelopeXml = SoapEnvelopeXml("dlt-ngfs-subscriber-v2", xmlContent, sessionId, "", primarySwitch, fsdb);
2119:   
2120:              return soapEnvelopeXml;
2121:          }
2122:   
2123:          ////////////////////////////////////////////////////////////////////////////
2124:          ////////////////////////////////////////////////////////////////////////////
2125:   
2126:   
2127:   
2128:   
2129:   
2130:   
2131:   
2132:          ////////////////////////////////////////////////////////////////////////////
2133:          ////////////////////////////////////////////////////////////////////////////
2134:   
2135:          /// <summary>
2136:          /// DialingPlan XML
2137:          /// <param name="publicUid">+96522239100@ims.moc1.kw</param>
2138:          /// </summary>
2139:          private static string DialingPlanXml(string service)
2140:          {
2141:              string publicUid, xml;
2142:   
2143:              publicUid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PublicUid(service);
2144:   
2145:              xml = @"
2146:      <DialingPlan>
2147:      <PublicUID>" + publicUid + @"</PublicUID>
2148:      <Assigned>true</Assigned>
2149:      <PerPuid>false</PerPuid>
2150:      <PrefixandFeatureCode>1000</PrefixandFeatureCode>
2151:      <E164NormAndCodeConv>1001</E164NormAndCodeConv>
2152:          <CallBarringLocal>0</CallBarringLocal>
2153:          <ESRN1></ESRN1>
2154:          <ESRN2></ESRN2>
2155:          <ESRN3></ESRN3>
2156:          <ESRN4></ESRN4>
2157:          <ESRN5></ESRN5>
2158:          <PrivateDialingPlan>0</PrivateDialingPlan>
2159:      </DialingPlan>
2160:  ";
2161:              return xml;
2162:          }
2163:   
2164:          ////////////////////////////////////////////////////////////////////////////
2165:   
2166:          /// <summary>
2167:          /// SetTZPath XML
2168:          /// <param name="publicUid">+96522239100@ims.moc1.kw</param>
2169:          /// </summary>
2170:          private static string SetTZPathXml(string publicUid)
2171:          {
2172:              string xml;
2173:   
2174:              xml = @"
2175:      <SetTZPath>
2176:          <PublicUID>" + publicUid + @"</PublicUID>
2177:          <Assigned>true</Assigned>
2178:          <PerPuid>false</PerPuid>
2179:          <TZPath>Asia/Kuwait</TZPath>
2180:      </SetTZPath>
2181:  ";
2182:              return xml;
2183:          }
2184:   
2185:          ////////////////////////////////////////////////////////////////////////////
2186:   
2187:          /// <summary>
2188:          /// HSSPrivateId XML
2189:          /// <param name="service">22239100</param>
2190:          /// <param name="prsetNumber">2101</param>
2191:          /// <param name="domainName">ims.moc1.kw</param>
2192:          /// </summary>
2193:          private static string HSSPrivateIdXml(string service, int prsetNumber, string domainName, int serviceProfileNumber, bool sendTelURI)
2194:          {
2195:              string xml, pridUser, puid, sendTelURIString;
2196:   
2197:              pridUser = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PridUser(service);
2198:              puid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Puid(service);
2199:   
2200:              sendTelURIString = Convert.ToString(sendTelURI).ToLower();
2201:   
2202:              // <PridDomainId>0</PridDomainId>
2203:   
2204:              xml = @"
2205:      <HSSPrivateId>
2206:          <PridDomainName>" + domainName + @"</PridDomainName>
2207:          <PridUser>" + pridUser + @"</PridUser>
2208:          <PrsetNumber>" + prsetNumber + @"</PrsetNumber>
2209:          <PrivPassword>1234</PrivPassword>
2210:          <ServerCapNumber>0</ServerCapNumber>
2211:          <ProtectionGroupNumber>0</ProtectionGroupNumber>
2212:          <ChargeInfoNum>0</ChargeInfoNum>
2213:          <MediaProfileId>0</MediaProfileId>
2214:          <PuidUserList>
2215:              <HSSPublicId>
2216:                  <PuidDomainName>" + domainName + @"</PuidDomainName>
2217:                  <PridDomainName>" + domainName + @"</PridDomainName>
2218:                  <PrivateId>" + pridUser + @"</PrivateId>
2219:                  <Puid>" + puid + @"</Puid>
2220:                  <IsWildcardPuid>false</IsWildcardPuid>
2221:                  <Barring>false</Barring>
2222:                  <ImplRegSet>1</ImplRegSet>
2223:                  <ServiceProfileNumber>" + serviceProfileNumber + @"</ServiceProfileNumber>
2224:                  <Authorized>true</Authorized>
2225:                  <SendTelURI>" + sendTelURIString + @"</SendTelURI>
2226:              </HSSPublicId>
2227:          </PuidUserList>
2228:      </HSSPrivateId>
2229:  ";
2230:              return xml;
2231:          }
2232:   
2233:          ////////////////////////////////////////////////////////////////////////////
2234:   
2235:          /// <summary>
2236:          /// GeoRedundancyData XML
2237:          /// <param name="service">22239100</param>
2238:          /// <param name="prsetNumber">2101</param>
2239:          /// <param name="domainName">ims.moc1.kw</param>
2240:          /// </summary>
2241:          private static string GeoRedundancyDataXml(string service, int prsetNumber, string domainName, int serviceProfileNumber, bool sendTelURI)
2242:          {
2243:              string xml, pridUser, puid, sendTelURIString;
2244:   
2245:              pridUser = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PridUser(service);
2246:              puid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Puid(service);
2247:   
2248:              sendTelURIString = Convert.ToString(sendTelURI).ToLower();
2249:   
2250:              xml = @"
2251:      <GeoRedundancyData>
2252:          <HSSPrivateId>
2253:              <PridDomainName>" + domainName + @"</PridDomainName>
2254:              <PridUser>" + pridUser + @"</PridUser>
2255:              <PrsetNumber>" + prsetNumber + @"</PrsetNumber>
2256:              <PrivPassword>1234</PrivPassword>
2257:              <ServerCapNumber>0</ServerCapNumber>
2258:              <ProtectionGroupNumber>0</ProtectionGroupNumber>
2259:              <ChargeInfoNum>0</ChargeInfoNum>
2260:              <MediaProfileId>0</MediaProfileId>
2261:              <PuidUserList>
2262:                  <HSSPublicId>
2263:                      <PuidDomainName>" + domainName + @"</PuidDomainName>
2264:                      <PridDomainName>" + domainName + @"</PridDomainName>
2265:                      <PrivateId>" + pridUser + @"</PrivateId>
2266:                      <Puid>" + puid + @"</Puid>
2267:                      <IsWildcardPuid>false</IsWildcardPuid>
2268:                      <Barring>false</Barring>
2269:                      <ImplRegSet>1</ImplRegSet>
2270:                      <ServiceProfileNumber>" + serviceProfileNumber + @"</ServiceProfileNumber>
2271:                      <Authorized>true</Authorized>
2272:                      <SendTelURI>" + sendTelURIString + @"</SendTelURI>
2273:                  </HSSPublicId>
2274:              </PuidUserList>
2275:          </HSSPrivateId>
2276:      </GeoRedundancyData>
2277:  ";
2278:              return xml;
2279:          }
2280:   
2281:          ////////////////////////////////////////////////////////////////////////////
2282:   
2283:          /// <summary>
2284:          /// OneDigitSpeedDial XML
2285:          /// <param name="publicUid">+96522239100@ims.moc1.kw</param>
2286:          /// </summary>
2287:          private static string OneDigitSpeedDialXml(string publicUid)
2288:          {
2289:              string xml;
2290:   
2291:              xml = @"
2292:      <OneDigitSpeedDial>
2293:          <PublicUID>" + publicUid + @"</PublicUID>
2294:          <Assigned>true</Assigned>
2295:          <PerPuid>false</PerPuid>
2296:          <DialCodesEntries>2^^^^^^^</DialCodesEntries>
2297:          <DNEntries>22334455^^^^^^^</DNEntries>
2298:      </OneDigitSpeedDial>
2299:  ";
2300:              return xml;
2301:          }
2302:   
2303:          ////////////////////////////////////////////////////////////////////////////
2304:   
2305:          /// <summary>
2306:          /// CallingLineId XML
2307:          /// <param name="service">22239100</param>
2308:          /// <param name="serviceAssigned">true</param>
2309:          /// </summary>
2310:          private static string CallingLineIdXml(string service, bool serviceAssigned)
2311:          {
2312:              string publicUid, xml, value;
2313:   
2314:              publicUid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PublicUid(service);
2315:   
2316:              value = Convert.ToString(serviceAssigned).ToLower();
2317:   
2318:              xml = @"
2319:      <CallingLineId>
2320:          <PublicUID>" + publicUid + @"</PublicUID>
2321:          <CallingLineIdPresentation>" + value + @"</CallingLineIdPresentation>
2322:          <ConnectedLinePresentation>" + value + @"</ConnectedLinePresentation>
2323:          <Assigned>true</Assigned>
2324:          <PerPuid>false</PerPuid>
2325:          <CallingLineIdRestriction>PERM_PUBLIC</CallingLineIdRestriction>
2326:          <CLIREditAllowed>false</CLIREditAllowed>
2327:          <CallingNamePresentation>false</CallingNamePresentation>
2328:          <RestrictionOverride>false</RestrictionOverride>
2329:          <ConnectedLineRestriction>false</ConnectedLineRestriction>
2330:          <ConnectedLineRestrictionOverride>false</ConnectedLineRestrictionOverride>
2331:          <CallingNumScreen>0</CallingNumScreen>
2332:          <ConnectedNumScreen>0</ConnectedNumScreen>
2333:          <PDPExtensionDisplay>false</PDPExtensionDisplay>
2334:          <COLREditAllowed>false</COLREditAllowed>
2335:          <OrigLineIdRestrictionLevel>NONE</OrigLineIdRestrictionLevel>
2336:          <OIPEditAllowed>false</OIPEditAllowed>
2337:          <BlockPerCallOverride>false</BlockPerCallOverride>
2338:          <SuppressCLIPonCallWaiting>false</SuppressCLIPonCallWaiting>
2339:          <QueCalNameSer>OMITTED</QueCalNameSer>
2340:          <Typ2CanSer>false</Typ2CanSer>
2341:          <CalNameSerUrl>0</CalNameSerUrl>
2342:          <CompanyNameQuery>false</CompanyNameQuery>
2343:          <OrigCallingNameQuery>false</OrigCallingNameQuery>
2344:      </CallingLineId>
2345:  ";
2346:              return xml;
2347:          }
2348:   
2349:          ////////////////////////////////////////////////////////////////////////////
2350:   
2351:          /// <summary>
2352:          /// CallForwardingVari XML
2353:          /// <param name="service">22239100</param>
2354:          /// <param name="serviceAssigned">true</param>
2355:          /// </summary>
2356:          private static string CallForwardingVariXml(string service, bool serviceAssigned)
2357:          {
2358:              string publicUid, xml, value;
2359:   
2360:              publicUid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PublicUid(service);
2361:   
2362:              value = Convert.ToString(serviceAssigned).ToLower();
2363:   
2364:              xml = @"
2365:      <CallForwardingVari>
2366:          <PublicUID>" + publicUid + @"</PublicUID>
2367:          <Assigned>" + value + @"</Assigned>
2368:          <PerPuid>false</PerPuid>
2369:          <ForwardToDN></ForwardToDN>
2370:          <PingRing>false</PingRing>
2371:          <ForwardToType>FORWARD_TO_DN</ForwardToType>
2372:          <EditPermission>EDIT_FULL</EditPermission>
2373:          <ForwardVoiceCalls>true</ForwardVoiceCalls>
2374:          <ForwardDataCalls>true</ForwardDataCalls>
2375:          <ReceiveNotify>false</ReceiveNotify>
2376:          <PlayAnnouncement>false</PlayAnnouncement>
2377:          <PinRequired>false</PinRequired>
2378:          <Send181Mode>TAS_181_NONE</Send181Mode>
2379:          <RestrictIdForward>false</RestrictIdForward>
2380:          <RestrictIdBackward>false</RestrictIdBackward>
2381:          <DataForwardToType>USE_VOICE</DataForwardToType>
2382:          <DataForwardToDN></DataForwardToDN>
2383:          <Activated>false</Activated>
2384:      </CallForwardingVari>
2385:  ";
2386:              return xml;
2387:          }
2388:   
2389:          ////////////////////////////////////////////////////////////////////////////
2390:   
2391:          /// <summary>
2392:          /// CallWaiting XML
2393:          /// <param name="service">22239100</param>
2394:          /// <param name="serviceAssigned">true</param>
2395:          /// </summary>
2396:          private static string CallWaitingXml(string service, bool serviceAssigned)
2397:          {
2398:              string publicUid, xml, value;
2399:   
2400:              publicUid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PublicUid(service);
2401:   
2402:              value = Convert.ToString(serviceAssigned).ToLower();
2403:   
2404:              xml = @"
2405:      <CallWaiting>
2406:          <PublicUID>" + publicUid + @"</PublicUID>
2407:          <Assigned>" + value + @"</Assigned>
2408:          <PerPuid>false</PerPuid>
2409:          <PlayAnnouncement>false</PlayAnnouncement>
2410:          <IsAlternateCallWaiting>false</IsAlternateCallWaiting>
2411:          <Programmable>false</Programmable>
2412:          <Activated>false</Activated>
2413:      </CallWaiting>
2414:  ";
2415:              return xml;
2416:          }
2417:   
2418:          ////////////////////////////////////////////////////////////////////////////
2419:   
2420:          /// <summary>
2421:          /// ConferenceCalling XML
2422:          /// <param name="service">22239100</param>
2423:          /// <param name="serviceAssigned">true</param>
2424:          /// </summary>
2425:          private static string ConferenceCallingXml(string service, bool serviceAssigned)
2426:          {
2427:              string publicUid, xml, value;
2428:   
2429:              publicUid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PublicUid(service);
2430:   
2431:              value = Convert.ToString(serviceAssigned).ToLower();
2432:   
2433:              xml = @"
2434:      <ConferenceCalling>
2435:          <PublicUID>" + publicUid + @"</PublicUID>
2436:          <Assigned>" + value + @"</Assigned>
2437:          <PerPuid>false</PerPuid>
2438:          <Transfer>false</Transfer>
2439:          <ConfSize>3</ConfSize>
2440:      </ConferenceCalling>
2441:  ";
2442:              return xml;
2443:          }
2444:   
2445:          ////////////////////////////////////////////////////////////////////////////
2446:   
2447:          /// <summary>
2448:          /// ReminderCall XML
2449:          /// <param name="service">22239100</param>
2450:          /// <param name="serviceAssigned">true</param>
2451:          /// </summary>
2452:          private static string ReminderCallXml(string service, bool serviceAssigned)
2453:          {
2454:              string publicUid, xml, value;
2455:   
2456:              publicUid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PublicUid(service);
2457:   
2458:              value = Convert.ToString(serviceAssigned).ToLower();
2459:   
2460:              xml = @"
2461:      <ReminderCall>
2462:          <PublicUID>" + publicUid + @"</PublicUID>
2463:          <Assigned>" + value + @"</Assigned>
2464:          <PerPuid>false</PerPuid>
2465:          <RetryCounter>5</RetryCounter>
2466:          <NoAnswerTimer>0</NoAnswerTimer>
2467:      </ReminderCall>
2468:  ";
2469:              return xml;
2470:          }
2471:   
2472:          ////////////////////////////////////////////////////////////////////////////
2473:   
2474:          /// <summary>
2475:          /// OneDigitSpeedDial XML
2476:          /// <param name="service">22239100</param>
2477:          /// <param name="serviceAssigned">true</param>
2478:          /// </summary>
2479:          private static string OneDigitSpeedDial(string service, bool serviceAssigned)
2480:          {
2481:              string publicUid, xml, value;
2482:   
2483:              publicUid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PublicUid(service);
2484:   
2485:              value = Convert.ToString(serviceAssigned).ToLower();
2486:   
2487:              xml = @"
2488:      <OneDigitSpeedDial>
2489:          <PublicUID>" + publicUid + @"</PublicUID>
2490:          <Assigned>" + value + @"</Assigned>
2491:          <PerPuid>false</PerPuid>
2492:      </OneDigitSpeedDial>
2493:  ";
2494:              return xml;
2495:          }
2496:   
2497:          ////////////////////////////////////////////////////////////////////////////
2498:   
2499:          /// <summary>
2500:          /// InternationalCalling XML
2501:          /// <param name="service">22239100</param>
2502:          /// <param name="serviceAssigned">true</param>
2503:          /// </summary>
2504:          private static string InternationalCallingXml(string service, bool serviceAssigned)
2505:          {
2506:              string publicUid, xml, serviceAssignedString;
2507:   
2508:              publicUid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PublicUid(service);
2509:   
2510:              serviceAssignedString = Convert.ToString(!serviceAssigned).ToLower(); // see !
2511:   
2512:              //         <Assigned>" + serviceAssignedString + @"</Assigned>
2513:              // <Assigned>false</Assigned> will set the whole CallBarring tag to null
2514:   
2515:              xml = @"
2516:      <CallBarring>
2517:          <PublicUID>" + publicUid + @"</PublicUID>
2518:          <International>" + serviceAssignedString + @"</International>
2519:          <Assigned>" + serviceAssignedString + @"</Assigned>
2520:          <PerPuid>false</PerPuid>
2521:          <CallBarringAll>false</CallBarringAll>
2522:          <Local>false</Local>
2523:          <IntraLataToll>false</IntraLataToll>
2524:          <InterLataToll>false</InterLataToll>
2525:          <National>false</National>
2526:          <PremiumServ>false</PremiumServ>
2527:          <Emergency>false</Emergency>
2528:          <TollFree>false</TollFree>
2529:          <FGDDialedCarrier>false</FGDDialedCarrier>
2530:          <FGBDialedCarrier>false</FGBDialedCarrier>
2531:          <DirectoryAssist>false</DirectoryAssist>
2532:          <NXXCalls>false</NXXCalls>
2533:          <User1>false</User1>
2534:          <User2>false</User2>
2535:          <User3>false</User3>
2536:          <User4>false</User4>
2537:          <User5>false</User5>
2538:          <User6>false</User6>
2539:          <User7>false</User7>
2540:          <User8>false</User8>
2541:          <User9>false</User9>
2542:          <User10>false</User10>
2543:          <User11>false</User11>
2544:          <User12>false</User12>
2545:          <User13>false</User13>
2546:          <NonE164>false</NonE164>
2547:          <Mobile>false</Mobile>
2548:          <CntrlCallBarringAll>false</CntrlCallBarringAll>
2549:          <CntrlDirectoryAssist>false</CntrlDirectoryAssist>
2550:          <CntrlEmergency>false</CntrlEmergency>
2551:          <CntrlFGBDialedCarrier>false</CntrlFGBDialedCarrier>
2552:          <CntrlFGDDialedCarrier>false</CntrlFGDDialedCarrier>
2553:          <CntrlInterLataToll>false</CntrlInterLataToll>
2554:          <CntrlInternational>false</CntrlInternational>
2555:          <CntrlIntraLataToll>false</CntrlIntraLataToll>
2556:          <CntrlLocal>false</CntrlLocal>
2557:          <CntrlNational>false</CntrlNational>
2558:          <CntrlNXXCalls>false</CntrlNXXCalls>
2559:          <CntrlPremiumServ>false</CntrlPremiumServ>
2560:          <CntrlTollFree>false</CntrlTollFree>
2561:          <CntrlUser1>false</CntrlUser1>
2562:          <CntrlUser2>false</CntrlUser2>
2563:          <CntrlUser3>false</CntrlUser3>
2564:          <CntrlUser4>false</CntrlUser4>
2565:          <CntrlUser5>false</CntrlUser5>
2566:          <CntrlUser6>false</CntrlUser6>
2567:          <CntrlUser7>false</CntrlUser7>
2568:          <CntrlUser8>false</CntrlUser8>
2569:          <CntrlUser9>false</CntrlUser9>
2570:          <CntrlUser10>false</CntrlUser10>
2571:          <CntrlUser11>false</CntrlUser11>
2572:          <CntrlUser12>false</CntrlUser12>
2573:          <CntrlUser13>false</CntrlUser13>
2574:          <ReceiveNotify>false</ReceiveNotify>
2575:          <CntrlUserCallLock>false</CntrlUserCallLock>
2576:          <LockSet>0</LockSet>
2577:          <CntrlNonE164>false</CntrlNonE164>
2578:          <CntrlMobile>false</CntrlMobile>
2579:      </CallBarring>";
2580:   
2581:              return xml;
2582:          }
2583:   
2584:          ////////////////////////////////////////////////////////////////////////////
2585:   
2586:          /// <summary>
2587:          /// InternationalCallingUserControlled XML
2588:          /// <param name="service">22239100</param>
2589:          /// <param name="serviceAssigned">true</param>
2590:          /// </summary>
2591:          private static string InternationalCallingUserControlledXml(string service, bool serviceAssigned)
2592:          {
2593:              string publicUid, xml, value;
2594:   
2595:              publicUid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.PublicUid(service);
2596:   
2597:              value = Convert.ToString(serviceAssigned).ToLower();
2598:   
2599:              xml = @"
2600:      <OutgoingCallBarring>
2601:          <PublicUID>" + publicUid + @"</PublicUID>
2602:          <Assigned>" + value + @"</Assigned>
2603:          <AdminActive>false</AdminActive>
2604:          <AdminProgram>0</AdminProgram>
2605:          <UserCtrl>true</UserCtrl>
2606:          <UserActive>true</UserActive>
2607:          <UserProgram>1</UserProgram>
2608:          <ReceiveNotify>false</ReceiveNotify>
2609:          <PerPuid>false</PerPuid>
2610:      </OutgoingCallBarring>";
2611:   
2612:              return xml;
2613:          }
2614:   
2615:          ////////////////////////////////////////////////////////////////////////////
2616:   
2617:          /// <summary>
2618:          /// ServiceSuspension XML
2619:          /// <param name="serviceSuspensionState"
2620:          /// </summary>
2621:          private static string ServiceSuspension(bool serviceSuspensionState)
2622:          {
2623:              string xml, value;
2624:   
2625:              value = Convert.ToString(serviceSuspensionState).ToLower();
2626:   
2627:              xml = @"
2628:      <ServiceSuspension>" + value + @"</ServiceSuspension>
2629:  ";
2630:              return xml;
2631:          }
2632:   
2633:          ////////////////////////////////////////////////////////////////////////////
2634:   
2635:          /// <summary>
2636:          /// PinService XML
2637:          /// <param name="publicUid">+96522239100@ims.moc1.kw</param>
2638:          /// </summary>
2639:          private static string PinServiceXml(string publicUid)
2640:          {
2641:              string xml;
2642:   
2643:              xml = @"
2644:      <PinService>
2645:          <PublicUID>" + publicUid + @"</PublicUID>
2646:          <Assigned>true</Assigned>
2647:          <PerPuid>false</PerPuid>
2648:          <Pin>0000</Pin>
2649:          <PinFrozen>false</PinFrozen>
2650:      </PinService>
2651:  ";
2652:              return xml;
2653:          }
2654:   
2655:          ////////////////////////////////////////////////////////////////////////////
2656:          ////////////////////////////////////////////////////////////////////////////
2657:   
2658:   
2659:   
2660:   
2661:   
2662:   
2663:   
2664:   
2665:   
2666:   
2667:          ////////////////////////////////////////////////////////////////////////////
2668:          ////////////////////////////////////////////////////////////////////////////
2669:   
2670:          /// <summary>
2671:          ///
2672:          /// </summary>
2673:          private static XmlDocument SoapEnvelopeXml(string command, string xmlContent, string sessionId, string requestId, string switchName, string fsdb)
2674:          {
2675:              string s;
2676:              XmlDocument soapEnvelopeXml = new XmlDocument();
2677:   
2678:              s = @"<?xml version=""1.0"" encoding=""UTF-8""?>
2679:  <soap-env:Envelope xmlns:soap-env=""http://schemas.xmlsoap.org/soap/envelope/"">
2680:      <soap-env:Header />
2681:      <soap-env:Body>
2682:          <PlexViewRequest Command=""" + command + @""" SwitchName=""" + switchName + @""" Fsdb=""" + fsdb + @""" RequestId=""" + requestId + @""" SessionId=""" + sessionId + @""" MaxRows=""32"">";
2683:   
2684:              s += xmlContent;
2685:   
2686:              s += @"
2687:          </PlexViewRequest>
2688:      </soap-env:Body>
2689:  </soap-env:Envelope>";
2690:   
2691:              soapEnvelopeXml.LoadXml(s);
2692:   
2693:              // below: To avoid XML shorthand closing tag you can set the IsEmpty property to false for all elements not having any child nodes:
2694:              //foreach (XmlElement el in soapEnvelopeXml.SelectNodes("descendant::*[not(node())]")) el.IsEmpty = false;
2695:   
2696:              return soapEnvelopeXml;
2697:          }
2698:   
2699:          ////////////////////////////////////////////////////////////////////////////
2700:   
2701:          /// <summary>
2702:          ///
2703:          /// </summary>
2704:          private static XmlDocument SoapEnvelopeXml(string command, string xmlContent, string sessionId, string requestId, string switchName)
2705:          {
2706:              string s;
2707:              XmlDocument soapEnvelopeXml = new XmlDocument();
2708:   
2709:              s = @"<?xml version=""1.0"" encoding=""UTF-8""?>
2710:  <soap-env:Envelope xmlns:soap-env=""http://schemas.xmlsoap.org/soap/envelope/"">
2711:      <soap-env:Header />
2712:      <soap-env:Body>
2713:          <PlexViewRequest Command=""" + command + @""" SwitchName=""" + switchName + @""" RequestId=""" + requestId + @""" SessionId=""" + sessionId + @""" MaxRows=""32"">";
2714:   
2715:              s += xmlContent;
2716:   
2717:              s += @"
2718:          </PlexViewRequest>
2719:      </soap-env:Body>
2720:  </soap-env:Envelope>";
2721:   
2722:              soapEnvelopeXml.LoadXml(s);
2723:   
2724:              // below: To avoid XML shorthand closing tag you can set the IsEmpty property to false for all elements not having any child nodes:
2725:              //foreach (XmlElement el in soapEnvelopeXml.SelectNodes("descendant::*[not(node())]")) el.IsEmpty = false;
2726:   
2727:              return soapEnvelopeXml;
2728:          }
2729:   
2730:          ////////////////////////////////////////////////////////////////////////////
2731:   
2732:          /// <summary>
2733:          ///
2734:          /// </summary>
2735:          private static XmlDocument SoapEnvelopeXml(string command, Dictionary<string, string> param, string sessionId, string requestId, string switchName)
2736:          {
2737:              string s, name, value;
2738:              XmlDocument soapEnvelopeXml = new XmlDocument();
2739:   
2740:              s = @"<?xml version=""1.0"" encoding=""UTF-8""?>
2741:  <soap-env:Envelope xmlns:soap-env=""http://schemas.xmlsoap.org/soap/envelope/"">
2742:      <soap-env:Header />
2743:      <soap-env:Body>
2744:          <PlexViewRequest Command=""" + command + @""" SwitchName=""" + switchName + @""" RequestId=""" + requestId + @""" SessionId=""" + sessionId + @""" MaxRows=""-1"">";
2745:   
2746:              if (param != null)
2747:              {
2748:                  foreach (KeyValuePair<string, string> u in param)
2749:                  {
2750:                      name = u.Key;
2751:                      value = u.Value;
2752:   
2753:                      s += @"            <" + name + @">" + value + @"</" + name + @">";
2754:                  }
2755:              }
2756:   
2757:              s += @"
2758:          </PlexViewRequest>
2759:      </soap-env:Body>
2760:  </soap-env:Envelope>";
2761:   
2762:              soapEnvelopeXml.LoadXml(s);
2763:   
2764:              return soapEnvelopeXml;
2765:          }
2766:   
2767:          ////////////////////////////////////////////////////////////////////////////
2768:   
2769:          /// <summary>
2770:          ///
2771:          /// </summary>
2772:          private static XmlDocument SoapEnvelopeXml(string command, Dictionary<string, string> param, string sessionId, string requestId, string switchName, string fsdb)
2773:          {
2774:              string s, name, value;
2775:              XmlDocument soapEnvelopeXml = new XmlDocument();
2776:   
2777:              s = @"<?xml version=""1.0"" encoding=""UTF-8""?>
2778:  <soap-env:Envelope xmlns:soap-env=""http://schemas.xmlsoap.org/soap/envelope/"">
2779:      <soap-env:Header />
2780:      <soap-env:Body>
2781:          <PlexViewRequest Command=""" + command + @""" SwitchName=""" + switchName + @""" Fsdb=""" + fsdb + @""" RequestId=""" + requestId + @""" SessionId=""" + sessionId + @""" MaxRows=""-1"">";
2782:   
2783:              if (param != null)
2784:              {
2785:                  foreach (KeyValuePair<string, string> u in param)
2786:                  {
2787:                      name = u.Key;
2788:                      value = u.Value;
2789:   
2790:                      s += @"            <" + name + @">" + value + @"</" + name + @">";
2791:                  }
2792:              }
2793:   
2794:              s += @"
2795:          </PlexViewRequest>
2796:      </soap-env:Body>
2797:  </soap-env:Envelope>";
2798:   
2799:              soapEnvelopeXml.LoadXml(s);
2800:   
2801:              return soapEnvelopeXml;
2802:          }
2803:   
2804:          ////////////////////////////////////////////////////////////////////////////
2805:   
2806:          /// <summary>
2807:          ///
2808:          /// </summary>
2809:          private void SendSoapRequestAndReadResponse(XmlDocument soapEnvelopeXml, out XmlDocument soapResultXmlDocument)
2810:          {
2811:              string url, action;
2812:              string soapResult;
2813:              HttpWebRequest request;
2814:   
2815:              sessionId = "";
2816:              soapResultXmlDocument = new XmlDocument();
2817:   
2818:              url = Ia.Ngn.Cl.Model.Business.Nokia.Ims.BaseAddress + "/" + Ia.Ngn.Cl.Model.Business.Nokia.Ims.ServiceUrl;
2819:              action = "PlexViewRequest";
2820:   
2821:              request = CreateWebRequest(url, action);
2822:   
2823:              byte[] bytes;
2824:              bytes = System.Text.Encoding.ASCII.GetBytes(soapEnvelopeXml.OuterXml);
2825:              request.ContentType = "text/xml; encoding='utf-8'";
2826:              request.ContentLength = bytes.Length;
2827:              request.Method = "POST";
2828:   
2829:              try
2830:              {
2831:                  using (Stream stream = request.GetRequestStream())
2832:                  {
2833:                      stream.Write(bytes, 0, bytes.Length);
2834:                      //soapEnvelopeXml.Save(stream);
2835:                  }
2836:   
2837:                  using (WebResponse response = request.GetResponse())
2838:                  {
2839:                      using (StreamReader rd = new StreamReader(response.GetResponseStream()))
2840:                      {
2841:                          soapResult = rd.ReadToEnd();
2842:   
2843:                          soapResultXmlDocument.LoadXml(soapResult);
2844:                      }
2845:                  }
2846:              }
2847:              catch (Exception ex)
2848:              {
2849:              }
2850:          }
2851:   
2852:          ////////////////////////////////////////////////////////////////////////////
2853:   
2854:          /// <summary>
2855:          ///
2856:          /// </summary>
2857:          private void ParseSoapResultXml(XmlDocument soapResultXmlDocument, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode)
2858:          {
2859:              List<Dictionary<string, string>> parameterDictionaryList;
2860:   
2861:              ParseSoapResultXml(soapResultXmlDocument, out resultCode, out parameterDictionaryList);
2862:          }
2863:   
2864:          ////////////////////////////////////////////////////////////////////////////
2865:   
2866:          /// <summary>
2867:          ///
2868:          /// </summary>
2869:          private void ParseSoapResultXml(XmlDocument soapResultXmlDocument, out Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode resultCode, out List<Dictionary<string, string>> parameterDictionaryList)
2870:          {
2871:              string failureReason, failureCode;
2872:              Dictionary<string, string> parameterDictionary;
2873:              XmlNode xn;
2874:   
2875:              parameterDictionary = new Dictionary<string, string>();
2876:              parameterDictionaryList = new List<Dictionary<string, string>>(32);
2877:   
2878:              if (soapResultXmlDocument.DocumentElement != null)
2879:              {
2880:                  xn = soapResultXmlDocument.DocumentElement.ChildNodes[1].FirstChild;
2881:   
2882:                  commandInLower = xn.Attributes["Command"].Value.ToLower();
2883:                  switchName = xn.Attributes["SwitchName"].Value;
2884:                  //fsdb = (xn.Attributes["Fsdb"] != null) ? xn.Attributes["Fsdb"].Value : null;
2885:                  requestId = xn.Attributes["RequestId"].Value;
2886:                  sessionId = xn.Attributes["SessionId"].Value;
2887:                  success = xn.Attributes["Status"].Value == "SUCCESS" ? true : false;
2888:   
2889:                  if (success)
2890:                  {
2891:                      if (commandInLower == "rtrv-ngfs-agcfendpoint-v2" || commandInLower == "dlt-ngfs-agcfendpoint-v2" ||
2892:                          commandInLower == "rtrv-ngfs-agcfgatewayrecord-v2" || commandInLower == "dlt-ngfs-agcfgatewayrecord-v2" ||
2893:                          commandInLower == "rtrv-ngfs-subparty-v2" || commandInLower == "dlt-ngfs-subparty-v2"
2894:                          )
2895:                      {
2896:                          if (soapResultXmlDocument.DocumentElement.ChildNodes[1].FirstChild.FirstChild != null)
2897:                          {
2898:                              foreach (XmlNode xn2 in soapResultXmlDocument.DocumentElement.ChildNodes[1].FirstChild.ChildNodes)
2899:                              {
2900:                                  parameterDictionary = CollectXmlNodeChildNodesValuesIntoDictionary(xn2);
2901:   
2902:                                  parameterDictionaryList.Add(parameterDictionary);
2903:                              }
2904:   
2905:                              resultCode = Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful;
2906:                          }
2907:                          else
2908:                          {
2909:                              resultCode = Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.SuccessfulButNoParameters;
2910:                          }
2911:                      }
2912:                      else /*if(commandInLower == "rtrv-ngfs-subscriber-v2" || commandInLower == "dlt-ngfs-subscriber-v2" )*/
2913:                      {
2914:                          if (soapResultXmlDocument.DocumentElement.ChildNodes[1].FirstChild != null)
2915:                          {
2916:                              parameterDictionary = CollectXmlNodeChildNodesValuesIntoDictionary(soapResultXmlDocument.DocumentElement.ChildNodes[1].FirstChild);
2917:   
2918:                              parameterDictionaryList.Add(parameterDictionary);
2919:   
2920:                              resultCode = Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.Successful;
2921:                          }
2922:                          else
2923:                          {
2924:                              resultCode = Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.SuccessfulButNoParameters;
2925:                          }
2926:                      }
2927:   
2928:                      // below: if command is act-user we will read the sessionId from the parameters
2929:                      if (commandInLower == "act-user") sessionId = parameterDictionary["SessionId"].ToString();
2930:                      // below: if command is canc-user we will null the sessionId
2931:                      else if (commandInLower == "canc-user" && success) sessionId = "";
2932:                  }
2933:                  else
2934:                  {
2935:                      failureReason = xn.Attributes["FailureReason"].Value;
2936:                      failureCode = xn.Attributes["FailureCode"].Value;
2937:   
2938:                      // below:
2939:                      resultCode = (Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode)int.Parse(failureCode);
2940:                  }
2941:              }
2942:              else
2943:              {
2944:                  resultCode = Ia.Ngn.Cl.Model.Client.Nokia.Ims.ResultCode.DocumentElementIsNull;
2945:              }
2946:          }
2947:   
2948:          ////////////////////////////////////////////////////////////////////////////
2949:   
2950:          /// <summary>
2951:          ///
2952:          /// </summary>
2953:          /// <returns></returns>
2954:          private Dictionary<string, string> CollectXmlNodeChildNodesValuesIntoDictionary(XmlNode xn)
2955:          {
2956:              Dictionary<string, string> parameterDictionary;
2957:   
2958:              parameterDictionary = new Dictionary<string, string>();
2959:   
2960:              foreach (XmlElement xe in xn.ChildNodes)
2961:              {
2962:                  // below: if the node has children(?) we will treat it as an XDocument and add its name to a top level tag
2963:                  if (xe.ChildNodes.Count > 1) parameterDictionary.Add(xe.Name, xe.OuterXml);
2964:                  else parameterDictionary.Add(xe.Name, xe.InnerText);
2965:              }
2966:   
2967:              return parameterDictionary;
2968:          }
2969:   
2970:          ////////////////////////////////////////////////////////////////////////////
2971:   
2972:          /// <summary>
2973:          /// Create a soap webrequest to [Url]
2974:          /// </summary>
2975:          /// <see cref="http://www.roelvanlisdonk.nl/?p=1893"/>
2976:          /// <returns></returns>
2977:          private HttpWebRequest CreateWebRequest(string url, string action)
2978:          {
2979:              HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
2980:   
2981:              webRequest.Headers.Add(@"SOAP:" + action);
2982:              webRequest.ContentType = "text/xml;charset=\"utf-8\"";
2983:              webRequest.Accept = "text/xml";
2984:              webRequest.Method = "POST";
2985:   
2986:              return webRequest;
2987:          }
2988:   
2989:          ////////////////////////////////////////////////////////////////////////////
2990:          ////////////////////////////////////////////////////////////////////////////
2991:      }
2992:   
2993:      ////////////////////////////////////////////////////////////////////////////
2994:      ////////////////////////////////////////////////////////////////////////////
2995:  }