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