)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Skip Navigation LinksHome » Code Library » Ims

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

Optical Fiber Network's Operations Support System Management Intranet (OFN OSS) client support class for Nokia's Optical Fiber Network (OFN) client model.

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