Hi, I have rephrased my requirement.
My request below will write BillingAccountNumber to another application. Since we are not storing BillingAccountNumber anywhere, I need to store in another remote XML file which I need to use later. The common fields in request and the remote XML file is BillAccountNodeId,BillAccountNodeType and BillingAccountNumber . That is these 3 attributes will be present in request and remote XML. Now my requirement is to compare BillAccountNodeId of Request
with Remote XML And if matches, then write BillingAccountNumber from Request to Remote XML file. After writing to remote XML, I can use this for another transation. I have Request , mock Response and sample Remote XML below.
Note: This request will come multiple times with different BillAccountNodeId and BillingAccountNumber and still it should write to Remote XML after comparing BillAccountNodeId
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<p109:setBillAccountMigrRequest xmlns:p882="http://cio.ttt.com/commonheader/v3" xmlns:p109="http://edb.ttt.com/dppco/billaccountinsertupdatemigr/v2">
<p882:WSHeader/>
<p109:tttContractNumber>NBI0147477</p109:tttContractNumber>
<p109:BillAccount>
<p109:BillAccountNodeId>119372</p109:BillAccountNodeId>
<p109:BillAccountNodeType>C</p109:BillAccountNodeType>
<p109:BillingAccountNumber>2562</p109:BillingAccountNumber>
</p109:BillAccount>
<p109:BillAccount>
<p109:BillAccountNodeId>119373</p109:BillAccountNodeId>
<p109:BillAccountNodeType>H</p109:BillAccountNodeType>
<p109:BillingAccountNumber>3928</p109:BillingAccountNumber>
<p109:Statustype>HierarchyCreation</p109:Statustype>
<p109:Status>Success</p109:Status>
<p109:StatusErrorCode/>
<p109:StatusErrorDescription/>
</p109:BillAccount>
<p109:BillAccount>
<p109:BillAccountNodeId>119374</p109:BillAccountNodeId>
<p109:BillAccountNodeType>BA</p109:BillAccountNodeType>
<p109:BillingAccountNumber>8310000221925</p109:BillingAccountNumber>
</p109:BillAccount>
<p109:BillAccount>
<p109:BillAccountNodeId>119375</p109:BillAccountNodeId>
<p109:BillAccountNodeType>I</p109:BillAccountNodeType>
<p109:BillingAccountNumber>8310000221927</p109:BillingAccountNumber>
</p109:BillAccount>
<p109:BillAccount>
<p109:BillAccountNodeAlias>000001</p109:BillAccountNodeAlias>
<p109:BillAccountNodeType>G</p109:BillAccountNodeType>
<p109:BillingAccountNumber>000001</p109:BillingAccountNumber>
</p109:BillAccount>
<p109:BillAccount>
<p109:BillAccountNodeId>119376</p109:BillAccountNodeId>
<p109:BillAccountNodeType>SA</p109:BillAccountNodeType>
<p109:BillingAccountNumber>8310000221930</p109:BillingAccountNumber>
<p109:GamsId>BEPLAGEN</p109:GamsId>
<p109:BillGroup>VAP</p109:BillGroup>
</p109:BillAccount>
<p109:BillAccount>
<p109:BillAccountNodeId>119377</p109:BillAccountNodeId>
<p109:BillAccountNodeType>SA</p109:BillAccountNodeType>
<p109:BillingAccountNumber>8310000221932</p109:BillingAccountNumber>
<p109:GamsId>BES00B</p109:GamsId>
<p109:BillGroup>VAQ</p109:BillGroup>
</p109:BillAccount>
</p109:setBillAccountMigrRequest>
</soapenv:Body>
</soapenv:Envelope>
Remote XML as below
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<p35:getBillAccountPackageMigrResponse xmlns:p414662882="http://cio.ttt.com/commonheader/v3" xmlns:p35="http://edb.ttt.com/dppco/billaccountquerymigr/v2">
<p414662882:WSResponseHeader/>
<p35:Customer xmlns:p65="http://edb.ttt.com/dppco/bcicommon/v2">
<p65:CustName>Customer 312 Batch 9</p65:CustName>
<p65:Addr1>8433 QUIVIRA RD</p65:Addr1>
<p65:City>Lenexa</p65:City>
<p65:State>KS</p65:State>
<p65:PostalCode>66215</p65:PostalCode>
<p65:IsoCountryCode>US</p65:IsoCountryCode>
<p65:SubmittedByUserID>mp2012</p65:SubmittedByUserID>
<p65:MANumber>20110902-0178UA</p65:MANumber>
<p65:Contact>
<p65:ContactType>Sales</p65:ContactType>
<p65:tttuid>mp2012</p65:tttuid>
</p65:Contact>
</p35:Customer>
<p35:BillAccount xmlns:p65="http://edb.ttt.com/dppco/bcicommon/v2">
<p65:BillAccountNodeId>119372</p65:BillAccountNodeId>
<p65:BillAccountNodeType>C</p65:BillAccountNodeType>
<p65:BillingAccountNumber>2562</p65:BillingAccountNumber>
<p65:ContractedBusinessCustomerType>O</p65:ContractedBusinessCustomerType>
</p35:BillAccount>
<p35:BillAccount xmlns:p65="http://edb.ttt.com/dppco/bcicommon/v2">
<p65:ActivityType>Add</p65:ActivityType>
<p65:BillAccountNodeId>119373</p65:BillAccountNodeId>
<p65:BillAccountNodeType>H</p65:BillAccountNodeType>
<p65:BillingAccountNumber>11812</p65:BillingAccountNumber>
<p65:ParentBillAccountNodeID>143460</p65:ParentBillAccountNodeID>
<p65:CountryCode>US</p65:CountryCode>
<p65:CustomerLegalName>CLINICAL REFERENCE LABORATORY, INC.</p65:CustomerLegalName>
<p65:tttLegalEntityCode>US</p65:tttLegalEntityCode>
<p65:BillCycle>1</p65:BillCycle>
</p35:BillAccount>
<p35:BillAccount xmlns:p65="http://edb.ttt.com/dppco/bcicommon/v2">
<p65:BillAccountNodeId>119374</p65:BillAccountNodeId>
<p65:BillAccountNodeType>BA</p65:BillAccountNodeType>
<p65:BillingAccountNumber>8310000221925</p65:BillingAccountNumber>
<p65:ParentBillAccountNodeID>143461</p65:ParentBillAccountNodeID>
</p35:BillAccount>
<p35:BillAccount xmlns:p65="http://edb.ttt.com/dppco/bcicommon/v2">
<p65:BillAccountNodeId>119375</p65:BillAccountNodeId>
<p65:BillAccountNodeType>I</p65:BillAccountNodeType>
<p65:BillingAccountNumber>8310000037320</p65:BillingAccountNumber>
<p65:ParentBillAccountNodeID>143462</p65:ParentBillAccountNodeID>
<p65:SolutionsBilledCustomerInd>N</p65:SolutionsBilledCustomerInd>
<p65:BillingName>CLINICAL REFERENCE LABORATORY, INC.</p65:BillingName>
<p65:InvoiceCurrency>USD</p65:InvoiceCurrency>
<p65:Fan>VP0B30</p65:Fan>
<p65:AdvanceArrearsIndicator>1</p65:AdvanceArrearsIndicator>
<p65:BillingAddress>
<p65:TypeOfAddress>Billing</p65:TypeOfAddress>
<p65:Addr1>8433 QUIVIRA RD</p65:Addr1>
<p65:City>LENEXA</p65:City>
<p65:State>KS</p65:State>
<p65:PostalCode>66215</p65:PostalCode>
<p65:County>JOHNSON</p65:County>
<p65:IsoCountryCode>US</p65:IsoCountryCode>
<p65:GeoCode>0117091090000</p65:GeoCode>
</p65:BillingAddress>
<p65:BillingAddress>
<p65:TypeOfAddress>BillingTax</p65:TypeOfAddress>
<p65:Addr1>8433 QUIVIRA RD</p65:Addr1>
<p65:City>LENEXA</p65:City>
<p65:State>KS</p65:State>
<p65:PostalCode>66215</p65:PostalCode>
<p65:County>JOHNSON</p65:County>
<p65:IsoCountryCode>US</p65:IsoCountryCode>
<p65:GeoCode>0117091090000</p65:GeoCode>
</p65:BillingAddress>
</p35:BillAccount>
<p35:BillAccount xmlns:p65="http://edb.ttt.com/dppco/bcicommon/v2">
<p65:BillAccountNodeId>144525</p65:BillAccountNodeId>
<p65:BillAccountNodeType>G</p65:BillAccountNodeType>
<p65:BillingAccountNumber>000001</p65:BillingAccountNumber>
<p65:ParentBillAccountNodeID>143463</p65:ParentBillAccountNodeID>
</p35:BillAccount>
<p35:BillAccount xmlns:p65="http://edb.ttt.com/dppco/bcicommon/v2">
<p65:BillAccountNodeId>119376</p65:BillAccountNodeId>
<p65:BillAccountNodeType>SA</p65:BillAccountNodeType>
<p65:BillingAccountNumber>8310000044619</p65:BillingAccountNumber>
<p65:ParentBillAccountNodeID>144521</p65:ParentBillAccountNodeID>
<p65:Mcn>075603</p65:Mcn>
<p65:Soc>H6</p65:Soc>
<p65:BillGroup>VAE</p65:BillGroup>
<p65:TypeOfTriplet>S</p65:TypeOfTriplet>
<p65:GamsId>VP0B30</p65:GamsId>
</p35:BillAccount>
<p35:BillAccount xmlns:p65="http://edb.ttt.com/dppco/bcicommon/v2">
<p65:ActivityType>Add</p65:ActivityType>
<p65:BillAccountNodeId>143461</p65:BillAccountNodeId>
<p65:BillAccountNodeType>H</p65:BillAccountNodeType>
<p65:BillingAccountNumber>11812</p65:BillingAccountNumber>
<p65:ParentBillAccountNodeID>143460</p65:ParentBillAccountNodeID>
<p65:CountryCode>US</p65:CountryCode>
<p65:CustomerLegalName>CLINICAL REFERENCE LABORATORY, INC.</p65:CustomerLegalName>
<p65:tttLegalEntityCode>US</p65:tttLegalEntityCode>
<p65:BillCycle>1</p65:BillCycle>
</p35:BillAccount>
<p35:BillAccount xmlns:p65="http://edb.ttt.com/dppco/bcicommon/v2">
<p65:BillAccountNodeId>143462</p65:BillAccountNodeId>
<p65:BillAccountNodeType>BA</p65:BillAccountNodeType>
<p65:BillingAccountNumber>BA_NUM</p65:BillingAccountNumber>
<p65:ParentBillAccountNodeID>143461</p65:ParentBillAccountNodeID>
</p35:BillAccount>
<p35:BillAccount xmlns:p65="http://edb.ttt.com/dppco/bcicommon/v2">
<p65:BillAccountNodeId>143463</p65:BillAccountNodeId>
<p65:BillAccountNodeType>I</p65:BillAccountNodeType>
<p65:BillingAccountNumber>8310000037320</p65:BillingAccountNumber>
<p65:ParentBillAccountNodeID>143462</p65:ParentBillAccountNodeID>
<p65:SolutionsBilledCustomerInd>N</p65:SolutionsBilledCustomerInd>
<p65:BillingName>CLINICAL REFERENCE LABORATORY, INC.</p65:BillingName>
<p65:InvoiceCurrency>USD</p65:InvoiceCurrency>
<p65:Fan>VP0B30</p65:Fan>
<p65:AdvanceArrearsIndicator>1</p65:AdvanceArrearsIndicator>
<p65:BillingAddress>
<p65:TypeOfAddress>Billing</p65:TypeOfAddress>
<p65:Addr1>8433 QUIVIRA RD</p65:Addr1>
<p65:City>LENEXA</p65:City>
<p65:State>KS</p65:State>
<p65:PostalCode>66215</p65:PostalCode>
<p65:County>JOHNSON</p65:County>
<p65:IsoCountryCode>US</p65:IsoCountryCode>
<p65:GeoCode>0117091090000</p65:GeoCode>
</p65:BillingAddress>
<p65:BillingAddress>
<p65:TypeOfAddress>BillingTax</p65:TypeOfAddress>
<p65:Addr1>8433 QUIVIRA RD</p65:Addr1>
<p65:City>LENEXA</p65:City>
<p65:State>KS</p65:State>
<p65:PostalCode>66215</p65:PostalCode>
<p65:County>JOHNSON</p65:County>
<p65:IsoCountryCode>US</p65:IsoCountryCode>
<p65:GeoCode>0117091090000</p65:GeoCode>
</p65:BillingAddress>
</p35:BillAccount>
<p35:BillAccount xmlns:p65="http://edb.ttt.com/dppco/bcicommon/v2">
<p65:BillAccountNodeId>144525</p65:BillAccountNodeId>
<p65:BillAccountNodeType>G</p65:BillAccountNodeType>
<p65:BillingAccountNumber>000001</p65:BillingAccountNumber>
<p65:ParentBillAccountNodeID>143463</p65:ParentBillAccountNodeID>
</p35:BillAccount>
<p35:BillAccount xmlns:p65="http://edb.ttt.com/dppco/bcicommon/v2">
<p65:BillAccountNodeId>143464</p65:BillAccountNodeId>
<p65:BillAccountNodeType>SA</p65:BillAccountNodeType>
<p65:BillingAccountNumber>8310000044619</p65:BillingAccountNumber>
<p65:ParentBillAccountNodeID>144521</p65:ParentBillAccountNodeID>
<p65:Mcn>075603</p65:Mcn>
<p65:Soc>H6</p65:Soc>
<p65:BillGroup>VAE</p65:BillGroup>
<p65:TypeOfTriplet>S</p65:TypeOfTriplet>
<p65:GamsId>VP0B30</p65:GamsId>
</p35:BillAccount>
</p35:getBillAccountPackageMigrResponse>
</env:Body>
</env:Envelope>
My Mock Response as below
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<p109:setBillAccountMigrResponse xmlns:p882="http://cio.ttt.com/commonheader/v3" xmlns:p109="http://edb.ttt.com/dppco/billaccountinsertupdatemigr/v2">
<p882:WSResponseHeader/>
<p109:BillAccount>
<p109:BillAccountNodeId>119372</p109:BillAccountNodeId>
<p109:BillAccountNodeType>C</p109:BillAccountNodeType>
</p109:BillAccount>
<p109:BillAccount>
<p109:BillAccountNodeId>119373</p109:BillAccountNodeId>
<p109:BillAccountNodeType>H</p109:BillAccountNodeType>
</p109:BillAccount>
<p109:BillAccount>
<p109:BillAccountNodeId>119374</p109:BillAccountNodeId>
<p109:BillAccountNodeType>BA</p109:BillAccountNodeType>
</p109:BillAccount>
<p109:BillAccount>
<p109:BillAccountNodeId>119375</p109:BillAccountNodeId>
<p109:BillAccountNodeType>I</p109:BillAccountNodeType>
</p109:BillAccount>
<p109:BillAccount>
<p109:BillAccountNodeId>173806</p109:BillAccountNodeId>
<p109:BillAccountNodeType>G</p109:BillAccountNodeType>
</p109:BillAccount>
<p109:BillAccount>
<p109:BillAccountNodeId>119376</p109:BillAccountNodeId>
<p109:BillAccountNodeType>SA</p109:BillAccountNodeType>
</p109:BillAccount>
<p109:BillAccount>
<p109:BillAccountNodeId>119377</p109:BillAccountNodeId>
<p109:BillAccountNodeType>SA</p109:BillAccountNodeType>
</p109:BillAccount>
</p109:setBillAccountMigrResponse>
</env:Body>
</env:Envelope>