none
Writing envolpe xml document RRS feed

  • Question

  • HI Friends,

    I have question.I have webservice which reads This service takes xml data input from seeByond and persist in the database.

    Which is reading each xml document passing one record.I need to change the service which is writing envolpe schema.

    [WebService(Namespace = "http://abc.com/claimsgateway")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class ClaimsGatewayService : System.Web.Services.WebService
    {
        public ClaimsGatewayService()
        {

            //Uncomment the following line if using designed components
            //InitializeComponent();
        }

        private const string xsdFile = "docs/xsdGwClaimData.xsd";

        const string fieldDelimiter = "|";
        const string recordDelimiter = "]";

        private string xmlResponse;
        public bool isXmlValid = true;
        //static ;

        private string xFileSeq = string.Empty;
        private string xClaimSeq = string.Empty;
        private string logDetails = string.Empty;

        [WebMethod(Description = "This service takes xml data input from seeByond and persist in the database")]
        public string ClaimsGatewayPersistanceService(string p_in_XMLDOC)
        {

            DAL dal = new DAL();
            XmlDataDocument xmlDoc = new XmlDataDocument();
            try
            {
                isXmlValid = true;
                XmlReaderSettings xmlSettings = new XmlReaderSettings();
                xmlSettings.ValidationType = ValidationType.Schema;

                XmlSchemaSet schemas = new XmlSchemaSet();
                schemas.Add("http://localhost:13000/repository/CAPSREP/prjGateway/CAPSREP12807c9:114f4d896cd:-7ffe/XSDDefinition1", Server.MapPath(xsdFile));

                xmlSettings.Schemas = schemas;

                xmlSettings.ValidationEventHandler += new ValidationEventHandler(ValidationCallback);


                if (p_in_XMLDOC == "")
                {

                    //string document = "docs/sampleClaimData1.xml";
                    //string document = "docs/payload20823.xml";

                    string document = "docs/sampleClaims.xml";
                    p_in_XMLDOC = Server.MapPath(document);
                    XmlReader xr = XmlReader.Create(p_in_XMLDOC, xmlSettings);
                    //xmlDoc.Load(XmlReader.Create(p_in_XMLDOC, xmlSettings));
                    xmlDoc.Load(xr);
                    xr.Close();
                }
                else
                {

                    XmlTextReader textReader = new XmlTextReader(new StringReader(p_in_XMLDOC));
                    xmlDoc.Load(XmlReader.Create(textReader, xmlSettings));
                    string TEMP = xmlDoc.OuterXml;

                }

                logDetails = logDetails + "Claim Load Time: " + DateTime.Now.ToLongTimeString() + "     ";

                //FileInfo node data

                StringBuilder sbFileInfo = new StringBuilder("");
                sbFileInfo.Append(xmlDoc.SelectSingleNode("//fileInfo/sourceServer").InnerText + fieldDelimiter);
                sbFileInfo.Append(xmlDoc.SelectSingleNode("//fileInfo/sourcePath").InnerText + fieldDelimiter);
                sbFileInfo.Append(xmlDoc.SelectSingleNode("//fileInfo/fileSequence").InnerText + fieldDelimiter);
                sbFileInfo.Append(xmlDoc.SelectSingleNode("//fileInfo/fileName").InnerText + fieldDelimiter);
                sbFileInfo.Append(xmlDoc.SelectSingleNode("//fileInfo/dateModified").InnerText + fieldDelimiter);
                sbFileInfo.Append(xmlDoc.SelectSingleNode("//fileInfo/processDate").InnerText + fieldDelimiter);
                sbFileInfo.Append(xmlDoc.SelectSingleNode("//fileInfo/totCharges").InnerText + fieldDelimiter);
                sbFileInfo.Append(xmlDoc.SelectSingleNode("//fileInfo/totClmCnt").InnerText + fieldDelimiter);
                sbFileInfo.Append(xmlDoc.SelectSingleNode("//fileInfo/clmCntr").InnerText + fieldDelimiter);
                sbFileInfo.Append(xmlDoc.SelectSingleNode("//fileInfo/senderIdIsa06").InnerText + fieldDelimiter);
                sbFileInfo.Append(xmlDoc.SelectSingleNode("//fileInfo/controlNoIsa13").InnerText + fieldDelimiter);
                xFileSeq = xmlDoc.SelectSingleNode("//fileInfo/fileSequence").InnerText;
                logDetails = logDetails + " FILE SEQ: " + xFileSeq;
                //TransInfo

                StringBuilder sbTransInfo = new StringBuilder("");

                sbTransInfo.Append(xmlDoc.SelectSingleNode("//transInfo/submBatNumBht03").InnerText + fieldDelimiter);
                sbTransInfo.Append(xmlDoc.SelectSingleNode("//transInfo/submDateBht04").InnerText + fieldDelimiter);
                sbTransInfo.Append(xmlDoc.SelectSingleNode("//transInfo/submTimeBht05").InnerText + fieldDelimiter);
                sbTransInfo.Append(xmlDoc.SelectSingleNode("//transInfo/submNameNm103").InnerText + fieldDelimiter);
                sbTransInfo.Append(xmlDoc.SelectSingleNode("//transInfo/submIdNm109").InnerText + fieldDelimiter);


                //BillProvInfo

                StringBuilder sbBillProvInfo = new StringBuilder("");

                sbBillProvInfo.Append(xmlDoc.SelectSingleNode("//billProvInfo/billProvIndOrgInd102").InnerText + fieldDelimiter);
                sbBillProvInfo.Append(xmlDoc.SelectSingleNode("//billProvInfo/billProvLnameNm103").InnerText + fieldDelimiter);
                sbBillProvInfo.Append(xmlDoc.SelectSingleNode("//billProvInfo/billProvFnameNm104").InnerText + fieldDelimiter);
                sbBillProvInfo.Append(xmlDoc.SelectSingleNode("//billProvInfo/billProvMnameNm105").InnerText + fieldDelimiter);
                sbBillProvInfo.Append(xmlDoc.SelectSingleNode("//billProvInfo/billProvIdTypeNm108").InnerText + fieldDelimiter);
                sbBillProvInfo.Append(xmlDoc.SelectSingleNode("//billProvInfo/billProvIdNm109").InnerText + fieldDelimiter);
                sbBillProvInfo.Append(xmlDoc.SelectSingleNode("//billProvInfo/billProvAddrN301").InnerText + fieldDelimiter);
                sbBillProvInfo.Append(xmlDoc.SelectSingleNode("//billProvInfo/billProvCityN401").InnerText + fieldDelimiter);
                sbBillProvInfo.Append(xmlDoc.SelectSingleNode("//billProvInfo/billProvStateN402").InnerText + fieldDelimiter);
                sbBillProvInfo.Append(xmlDoc.SelectSingleNode("//billProvInfo/billProvZipN403").InnerText + fieldDelimiter);
                sbBillProvInfo.Append(xmlDoc.SelectSingleNode("//billProvInfo/billProvTaxIdRef02").InnerText + fieldDelimiter);
                sbBillProvInfo.Append(xmlDoc.SelectSingleNode("//billProvInfo/billProvLegacyId").InnerText + fieldDelimiter);


                //subscriberInfo

                StringBuilder sbSubscriberInfo = new StringBuilder("");

                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/payorCobSeqSbr01").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/patRelCodeSbr02").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/filingIndSbr09").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/subLnameNm103").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/subFnameNm104").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/subMnameNm105").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/subIdTypeNm108").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/subIdNm109").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/subAddrN301").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/subCityN401").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/subStateN402").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/subZipN403").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/subBirthDateDmg02").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/subGenderDmg03").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/payorNameNm103").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/payorIdTypeNm108").InnerText + fieldDelimiter);
                sbSubscriberInfo.Append(xmlDoc.SelectSingleNode("//subscriberInfo/payorIdNm109").InnerText + fieldDelimiter);


                //dependentInfo

                StringBuilder sbDependentInfoNode = new StringBuilder("");

                sbDependentInfoNode.Append(xmlDoc.SelectSingleNode("//dependentInfo/depRelCodePat01").InnerText + fieldDelimiter);
                sbDependentInfoNode.Append(xmlDoc.SelectSingleNode("//dependentInfo/depLnameNm103").InnerText + fieldDelimiter);
                sbDependentInfoNode.Append(xmlDoc.SelectSingleNode("//dependentInfo/depFnameNm104").InnerText + fieldDelimiter);
                sbDependentInfoNode.Append(xmlDoc.SelectSingleNode("//dependentInfo/depMnameNm105").InnerText + fieldDelimiter);
                sbDependentInfoNode.Append(xmlDoc.SelectSingleNode("//dependentInfo/depIdTypeNm108").InnerText + fieldDelimiter);
                sbDependentInfoNode.Append(xmlDoc.SelectSingleNode("//dependentInfo/depIdNm109").InnerText + fieldDelimiter);
                sbDependentInfoNode.Append(xmlDoc.SelectSingleNode("//dependentInfo/depAddrN301").InnerText + fieldDelimiter);
                sbDependentInfoNode.Append(xmlDoc.SelectSingleNode("//dependentInfo/depCityN401").InnerText + fieldDelimiter);
                sbDependentInfoNode.Append(xmlDoc.SelectSingleNode("//dependentInfo/depStateN402").InnerText + fieldDelimiter);
                sbDependentInfoNode.Append(xmlDoc.SelectSingleNode("//dependentInfo/depZipN403").InnerText + fieldDelimiter);
                sbDependentInfoNode.Append(xmlDoc.SelectSingleNode("//dependentInfo/depBirthDateDmg02").InnerText + fieldDelimiter);
                sbDependentInfoNode.Append(xmlDoc.SelectSingleNode("//dependentInfo/depGenderDmg03").InnerText + fieldDelimiter);


                //claimInfo

                StringBuilder sbClaimInfo = new StringBuilder("");

                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/remClaimGenKey").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/patCntrlNumClm01").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/totChargesClm02").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/placeClm051").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/typeClm053").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/provSignClm06").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/provAccptAssgnClm07").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/patPaidAmt02").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/claimIdNoRef02").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/kickoutNte02").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/diagHi01").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/diagHi02").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/diagHi03").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/diagHi04").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/diagHi05").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/diagHi06").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/diagHi07").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/diagHi08").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/rendProvIndOrgIndNm102").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/rendProvLnameNm103").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/rendProvFnameNm104").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/rendProvMnameNm105").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/rendProvIdTypeNm108").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/rendProvIdNm109").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/rendAddrN301").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/rendCityN401").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/rendStateN402").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/rendZipN403").InnerText + fieldDelimiter + "");
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/rendProvTaxIdRef02").InnerText + fieldDelimiter);
                sbClaimInfo.Append(xmlDoc.SelectSingleNode("//claimInfo/rendProvLegacyId").InnerText + fieldDelimiter);
               
                xClaimSeq = xmlDoc.SelectSingleNode("//claimInfo/remClaimGenKey").InnerText;
                logDetails = logDetails + " CLAIM SEQ: " + xClaimSeq;
                //claimInfo/COBInfo

                XmlNodeList xmlClaimInfoNodeList = xmlDoc.SelectNodes("//claimInfo/cobInfo");

                StringBuilder sbCobInfo = new StringBuilder("");

                foreach (XmlNode cobInfoNodeList in xmlClaimInfoNodeList)
                {
                    sbCobInfo.Append(recordDelimiter);

                    sbCobInfo.Append(cobInfoNodeList.SelectSingleNode("cobSbr01").InnerText + fieldDelimiter);
                    sbCobInfo.Append(cobInfoNodeList.SelectSingleNode("cobSbr09").InnerText + fieldDelimiter);
                    sbCobInfo.Append(cobInfoNodeList.SelectSingleNode("cobPayorPaidAmt02").InnerText + fieldDelimiter);
                    sbCobInfo.Append(cobInfoNodeList.SelectSingleNode("cobIdRef01F8Ref02").InnerText + fieldDelimiter);
                    sbCobInfo.Append(cobInfoNodeList.SelectSingleNode("cobTotDedAdj").InnerText + fieldDelimiter);
                    sbCobInfo.Append(cobInfoNodeList.SelectSingleNode("cobPatRespAmt02").InnerText + fieldDelimiter);

                }

                //claimInfo/serviceInfo
                xmlClaimInfoNodeList = xmlDoc.SelectNodes("//claimInfo/serviceInfo");

                string sbServiceInfo1 = string.Empty;
                string sbServiceInfo2 = string.Empty;
                string sbServiceInfo3 = string.Empty;

                int ServiceCounter = 0;

                foreach (XmlNode serviceInfoNode in xmlClaimInfoNodeList)
                {

                    if (ServiceCounter < 26)
                    {

                        sbServiceInfo1 = sbServiceInfo1 + ServiceLineInfoNodesParsing(serviceInfoNode);

                    }
                    else if (ServiceCounter > 25 && ServiceCounter < 51)
                    {

                        sbServiceInfo2 = sbServiceInfo2 + ServiceLineInfoNodesParsing(serviceInfoNode);

                    }

                    else if (ServiceCounter > 51 && ServiceCounter < 76)
                    {

                        sbServiceInfo3 = sbServiceInfo3 + ServiceLineInfoNodesParsing(serviceInfoNode);
                    }

                    ServiceCounter++;

                }

                int isPersisted = 0;

                //dal.CreateCommandAndConnection("SP_CLAIMSGATEWAY_INTEGRATION", CommandType.StoredProcedure);
                dal.CreateCommandAndConnection("SP_CLAIMS_PERSISTANCE", CommandType.StoredProcedure);

                dal.AddStrPar("p_in_FileInfo_rec", sbFileInfo.ToString());
                dal.AddStrPar("p_in_TransInfo_rec", sbTransInfo.ToString());
                dal.AddStrPar("p_in_BillProvInfo_rec", sbBillProvInfo.ToString());
                dal.AddStrPar("p_in_SubscriberInfo_rec", sbSubscriberInfo.ToString());
                dal.AddStrPar("p_in_DependentInfoNode_rec", sbDependentInfoNode.ToString());
                dal.AddStrPar("p_in_ClaimInfo_rec", sbClaimInfo.ToString());
                dal.AddStrPar("p_in_CobInfo_rec", sbCobInfo.ToString());

                dal.AddStrPar("p_in_ServiceInfo_rec1", sbServiceInfo1);
                dal.AddStrPar("p_in_ServiceInfo_rec2", sbServiceInfo2);
                dal.AddStrPar("p_in_ServiceInfo_rec3", sbServiceInfo3);

                dal.AddStrPar("p_in_Field_Delimiter", fieldDelimiter);
                dal.AddStrPar("p_in_Rec_Delimiter", recordDelimiter);
                dal.AddOutIntPar("isPersisted");

                //Log

                System.Diagnostics.Debug.WriteLine("p_in_FileInfo_rec : " + sbFileInfo.ToString());
                System.Diagnostics.Debug.WriteLine("p_in_TransInfo_rec : " + sbTransInfo.ToString());
                System.Diagnostics.Debug.WriteLine("p_in_BillProvInfo_rec : " + sbBillProvInfo.ToString());
                System.Diagnostics.Debug.WriteLine("p_in_SubscriberInfo_rec : " + sbSubscriberInfo.ToString());
                System.Diagnostics.Debug.WriteLine("p_in_DependentInfoNode_rec : " + sbDependentInfoNode.ToString());
                System.Diagnostics.Debug.WriteLine("p_in_ClaimInfo_rec : " + sbClaimInfo.ToString());
                System.Diagnostics.Debug.WriteLine("p_in_CobInfo_rec : ", sbCobInfo.ToString());

                System.Diagnostics.Debug.WriteLine("p_in_ServiceInfo_rec1 : " + sbServiceInfo1);
                System.Diagnostics.Debug.WriteLine("p_in_ServiceInfo_rec2 : " + sbServiceInfo2);
                System.Diagnostics.Debug.WriteLine("p_in_ServiceInfo_rec3 : " + sbServiceInfo3);

                System.Diagnostics.Debug.WriteLine("p_in_Field_Delimiter : " + fieldDelimiter);
                System.Diagnostics.Debug.WriteLine("p_in_Rec_Delimiter : " + recordDelimiter);

                //LogEntry.log1 = new LogEntry();
                //log1.ProcessName = "Persistence WebService";
                //log1.Title = "Persistence WebService";
                //log1.Message = "Updating Database : " + logDetails;
                //log1.Categories.Add("Trace");
                //Logger.Write(log1);

                try
                {

                    dal.Standard_NonQuery_Block();
                    isPersisted = Int32.Parse(dal.xCommand.Parameters["isPersisted"].Value.ToString());

                }
                catch (Exception e)
                {
                    //LogEntry.log2 = new LogEntry();
                    //log2.ProcessName = e.Source;
                    //log2.Title = "Class:ClaimsGatewayService - Method:Persistence.IntegrationProcess";
                    //log2.Message = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString() + " | " + e.Message;
                    //log2.Categories.Add("Trace");
                    //Logger.Write(log2);
                    xmlResponse = "<Response type='E'><Message>" + e.Message + "</Message></Response>";

                }
                finally
                {
                    try
                    {
                        dal.CloseConnection();
                        dal.Disconnect();
                    }
                    catch { }

                }

                if (isXmlValid)
                {

                    if (isPersisted == 1)
                    {
                        xmlResponse = "<Response type='A'><Message>accepted</Message></Response>";

                        try
                        {
                            //xmlResponse = "ReachedIntegrationService";
                            //return xmlResponse;
                        string claimProcessed = CallIntegrationService(xmlDoc.OuterXml);
                        }
                        catch (Exception ex)
                        {
                            //LogEntry.log3 = new LogEntry();
                            //log3.ProcessName = ex.Source;
                            //log3.Title = "Class:ClaimsGatewayService";
                            //log3.Message = logDetails + "     " + ex.Message;
                            //log3.Categories.Add("Trace");
                            //Logger.Write(log3);
                        }
                    }
                    else
                    {
                        if (isPersisted == 0)
                        {
                            xmlResponse = "<Response type='E'><Message>Can not persist the claim, failed to write to DB - FileSeq = " + xFileSeq + " Claim Seq = " + xClaimSeq + "</Message></Response>";
                        }
                        else
                        {
                            //Duplicate submission -- claim already in TDS
                            xmlResponse = "<Response type='A'><Message>accepted</Message></Response>";

                            //LogEntry.log3 = new LogEntry();
                            //log3.Title = "Class:ClaimsGatewayService";
                            //log3.Message = logDetails + "     " + "DUPLICATE SUBMISSION FROM SEEBEYOND. CLAIM NOT SENT TO INTEGRATION.";
                            //log3.Categories.Add("Trace");
                            //Logger.Write(log3);

                        }
                       
                    }

                }
                else
                {
                    xmlResponse = "<Response type='E'><Message>Can not persist the claim, XML INVALID - FileSeq = " + xFileSeq + " Claim Seq = " + xClaimSeq + "</Message></Response>";
                }

            }
            catch (Exception ex)
            {

                ////LogEntry.log4 = new LogEntry();
                ////log4.ProcessName = ex.Source;
                ////log4.Title = "Class:ClaimsGatewayService - Invalid XML";
                ////log4.Message = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString() + " | " + ex.Message + "\n " + p_in_XMLDOC + " \n";
                ////log4.Categories.Add("Trace");
                ////Logger.Write(log4);

                xmlResponse = "";
                xmlResponse = "<Response type='E'><Message>";
                xmlResponse += ex.Message;
                xmlResponse += "</Message></Response>";

            }

            return xmlResponse;
        }

        /// <summary>
        /// ServiceInfo Nodes concatenation
        /// </summary>


    hk

    Monday, July 22, 2013 1:49 PM

Answers

  • Hi hkmd79,

    It seems the webservice method will accept some plain string parameter and use XmlDataDocument to parse it. For XML data exchanging in ASP.NET webservice or WCF service, we'd recommend that we define the input or output parameter as XmlElement or XElement (linq to XML type) instead of using plain string type.

    Also, for the webmethod you provided, is there any problem occured when the method is invoked at runtime? If possible, you can try simplify the webmethod (such as break it into multiple parts) for further troubleshooting.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, July 23, 2013 9:48 AM
    Moderator

All replies

  • Hi,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Best Regards.

    Amy Peng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.






    Tuesday, July 23, 2013 3:11 AM
    Moderator
  • Hi hkmd79,

    It seems the webservice method will accept some plain string parameter and use XmlDataDocument to parse it. For XML data exchanging in ASP.NET webservice or WCF service, we'd recommend that we define the input or output parameter as XmlElement or XElement (linq to XML type) instead of using plain string type.

    Also, for the webmethod you provided, is there any problem occured when the method is invoked at runtime? If possible, you can try simplify the webmethod (such as break it into multiple parts) for further troubleshooting.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, July 23, 2013 9:48 AM
    Moderator