)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Ims (Ia.Ftn.Cl.Models.Client.Nokia)

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

Fixed Telecommunications Network's Operations Support System Management Intranet (FTN OSS) client support class for Nokia's Fixed Telecommunications Network (FTN) client model.

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