Click here to Skip to main content
14,241,400 members
Rate this:
Please Sign up or sign in to vote.
See more:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fin="http://google.com/FinancialTxnService">
   <soapenv:Header/>
   <soapenv:Body>
      <fin:UtilityBillPaymentRes>
         <fin:ResHdr>
            <ConsumerContext>
               <RequesterID>IB</RequesterID>
               <TerminalID>10.9.73.71</TerminalID>
            </ConsumerContext>
            <ServiceContext>
               <ServiceName>UtilityBillPayment</ServiceName>
               <ReqRefNum>1401981498236</ReqRefNum>
               <ReqRefTimeStamp>2014-06-05T19:14:50.814</ReqRefTimeStamp>
               <ServiceVersionNo>1.0</ServiceVersionNo>
               <LogLevel>1</LogLevel>
            </ServiceContext>
            <ProviderContext>
               <ProviderID>NWR</ProviderID>
               <RequestType>FTIUTIL</RequestType>
            </ProviderContext>
            <ServiceResponse>
               <EsbResNum>10000229917</EsbResNum>
               <EsbResTimeStamp>2014-07-23T19:19:28.795102</EsbResTimeStamp>
               <EsbResStatus>1</EsbResStatus>
            </ServiceResponse>
            <ErrorDetails>
               <ErrorInfo>
                  <ErrSrc>NWR</ErrSrc>
                  <EsbErrCode>NWR201000</EsbErrCode>
                  <EsbErrLongDesc>Payment Gateway internal error</EsbErrLongDesc>
                  <EsbErrShortDesc/>
                  <HostErrCode>NWR201000</HostErrCode>
                  <HostErrDesc/>
                  <ErrType/>
               </ErrorInfo>
            </ErrorDetails>
            <UserContext>
               <UserID>KXP</UserID>
            </UserContext>
         </fin:ResHdr>
         <fin:XferRec>
            <XferId>FT14204069798352</XferId>
            <XferType>ACB5</XferType>
            <AmtDebited>OMR10.000</AmtDebited>
            <AmtCredited>OMR10.000</AmtCredited>
            <DebitAmt>10.000</DebitAmt>
            <AvlblBalance>81.6</AvlblBalance>
         </fin:XferRec>
         <fin:DebitAccInfo>
            <AcctId>0322003785730032</AcctId>
            <AcctIdType/>
            <AcctType/>
            <AcctKey/>
            <AcctCcy/>
         </fin:DebitAccInfo>
         <fin:DebitInfo>
            <CustomerID>378573</CustomerID>
            <ChkEnteredAmt>10.000</ChkEnteredAmt>
            <DebitDate>2014-07-23</DebitDate>
            <DebitCcy>OMR</DebitCcy>
            <DebitCompCode>OM0010322</DebitCompCode>
            <LocalAmtDebited>10.000</LocalAmtDebited>
            <DebitAdvReq>N</DebitAdvReq>
            <CcyMktDr>1</CcyMktDr>
         </fin:DebitInfo>
         <fin:CreditAccInfo>
            <AcctId>0423011147890018</AcctId>
            <AcctIdType/>
            <AcctType/>
            <AcctKey/>
            <AcctCcy/>
         </fin:CreditAccInfo>
         <fin:CreditInfo>
            <CustomerID>1114789</CustomerID>
            <CreditDate>2014-07-23</CreditDate>
            <CreditCcy>OMR</CreditCcy>
            <CreditCompCode>OM0010423</CreditCompCode>
            <LocalAmtCredit>10.000</LocalAmtCredit>
            <CreditAdvReq>N</CreditAdvReq>
            <CreditCcyMkt>1</CreditCcyMkt>
         </fin:CreditInfo>
         <fin:ChequeInfo>
            <ProcessDate>2014-07-23</ProcessDate>
         </fin:ChequeInfo>
         <fin:ChrgInfo>
            <AcctId>0322003785730032</AcctId>
            <DisplayCom>NO</DisplayCom>
            <ChargeCode>DEBIT PLUS CHARGES</ChargeCode>
            <TotalRecordCharge>0</TotalRecordCharge>
            <CustomerID>1114789</CustomerID>
            <TotalRecChargeLCL>0</TotalRecChargeLCL>
            <TotalRecChargeCcy>0</TotalRecChargeCcy>
            <TotalSendChargeCcy>0.000</TotalSendChargeCcy>
         </fin:ChrgInfo>
         <fin:PaymentInfo>
            <CommisionDetails>
               <CommissionCode>DEBIT PLUS CHARGES</CommissionCode>
               <CommissionInfo/>
            </CommisionDetails>
            <ProfitCentreCust>378573</ProfitCentreCust>
            <ReturnToDept>NO</ReturnToDept>
            <FEDFunds>NO</FEDFunds>
            <PositionType>TR</PositionType>
            <TotalRecComm>0</TotalRecComm>
            <TotalRecCommLCL>0</TotalRecCommLCL>
            <RateFixing>NO</RateFixing>
            <ContractNum>04329798</ContractNum>
            <ServiceProviderCode>0102</ServiceProviderCode>
            <UtilityCode>002</UtilityCode>
            <OrderingBank>BM</OrderingBank>
            <CustGrpLvl>12</CustGrpLvl>
            <CcyCode>1</CcyCode>
            <inputUser>59433_ESBUSER1__OFS_ESB.OFS.SOURCE</inputUser>
            <Authoriser>59433_ESBUSER1_OFS_ESB.OFS.SOURCE</Authoriser>
            <COCode>OM0010322</COCode>
            <DeptCode>1</DeptCode>
         </fin:PaymentInfo>
         <fin:ForexInfo>
            <CcyCode/>
            <CcyConvertRule/>
         </fin:ForexInfo>
         <fin:FTAddInfo>
            <AuthenticationDate>2014-07-23</AuthenticationDate>
            <BmVersionInp>FUNDS.TRANSFER,BM.UTIL.ESB</BmVersionInp>
         </fin:FTAddInfo>
         <fin:UtilityProviderPayInfo>
            <fin:BillerRefNum/>
            <fin:BillerPaymentTransId/>
            <fin:ActBal/>
            <fin:ValidForResubmit>true</fin:ValidForResubmit>
            <fin:CommandName/>
            <fin:ResponseCode>-1000</fin:ResponseCode>
            <fin:ResponseMessage>Payment Gateway internal error</fin:ResponseMessage>
         </fin:UtilityProviderPayInfo>
      </fin:UtilityBillPaymentRes>
   </soapenv:Body>
</soapenv:Envelope>


* i want to fetch data from this soap requestxml i tried xml node xpath but didn't
work.Please help to fetch data .
Posted
Comments
Krunal Rohit 6-Nov-15 6:14am
   
You need to parse the XML.

-KR
Naveen Singh 8-Nov-15 6:41am
   
hi Krunal thanks for yours response but i am getting :-

System.Xml.XmlException' occurred in System.Xml.dll

error.
Rate this:
Please Sign up or sign in to vote.

Solution 1

You need to parse the XML first.
Check the following link-
Extract XML from SOAP envelope in c#[^]

Hope, it helps :)
   
Comments
Naveen Singh 8-Nov-15 5:22am
   
hi suvendu thanks for yours response but i am getting :-

System.Xml.XmlException' occurred in System.Xml.dll

error.
Rate this:
Please Sign up or sign in to vote.

Solution 2

public void decodexml()
{
string soapmessage = "xml"; // put yours xml which needs to be data to extracted.
XmlDocument document = new XmlDocument();
document.LoadXml(soapmessage);
XmlNamespaceManager manager = new XmlNamespaceManager(document.NameTable);
manager.AddNamespace("out";, "name space url here");
XmlNodeList xnList = document.SelectNodes(@"node from which data is setted";, manager);
int nodes = xnList.Count;
XmlNode ResHdr = null;
XmlNode ResHdr1 = null;
XmlNode ResHdr2 = null;
XmlNode ResHdr3 = null;

Hashtable hdr = new Hashtable();
foreach (XmlNode xn in xnList)
{
ResHdr = xn.ChildNodes[0].ChildNodes[0];
ResHdr1 = xn.ChildNodes[1].ChildNodes[0];
ResHdr3 = xn.ChildNodes[0].ChildNodes[3];

variable 1 = ResHdr.SelectSingleNode("node which hold data u need extract").InnerXml;
variable 2 = ResHdr.SelectSingleNode("node which hold data u need extract").InnerXml;
variable 3 = ResHdr1.InnerText;
variable 4 = ResHdr3.SelectSingleNode("node which hold data u need extract").InnerXml;
if (EsbResNum != &quot;0&quot;)
{
variable 5 = xn.ChildNodes[0].ChildNodes[4].ChildNodes[0];
variable 6 = ResHdr2.SelectSingleNode("node which hold data u need extract").InnerXml;
}

}

}
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100