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\">\n <soapenv:Header/>\n <soapenv:Body>\n <p109:setBillAccountMigrRequest xmlns:p882=\"http://cio.ttt.com/commonheader/v3\" xmlns:p109=\"http://edb.ttt.com/dppco/billaccountinsertupdatemigr/v2\">\n <p882:WSHeader/>\n <p109:tttContractNumber>NBI0147477</p109:tttContractNumber>\n <p109:BillAccount>\n <p109:BillAccountNodeId>119372</p109:BillAccountNodeId>\n <p109:BillAccountNodeType>C</p109:BillAccountNodeType>\n <p109:BillingAccountNumber>2562</p109:BillingAccountNumber>\n </p109:BillAccount>\n <p109:BillAccount>\n <p109:BillAccountNodeId>119373</p109:BillAccountNodeId>\n <p109:BillAccountNodeType>H</p109:BillAccountNodeType>\n <p109:BillingAccountNumber>3928</p109:BillingAccountNumber>\n <p109:Statustype>HierarchyCreation</p109:Statustype>\n <p109:Status>Success</p109:Status>\n <p109:StatusErrorCode/>\n <p109:StatusErrorDescription/>\n </p109:BillAccount>\n <p109:BillAccount>\n <p109:BillAccountNodeId>119374</p109:BillAccountNodeId>\n <p109:BillAccountNodeType>BA</p109:BillAccountNodeType>\n <p109:BillingAccountNumber>8310000221925</p109:BillingAccountNumber>\n </p109:BillAccount>\n <p109:BillAccount>\n <p109:BillAccountNodeId>119375</p109:BillAccountNodeId>\n <p109:BillAccountNodeType>I</p109:BillAccountNodeType>\n <p109:BillingAccountNumber>8310000221927</p109:BillingAccountNumber>\n </p109:BillAccount>\n <p109:BillAccount>\n <p109:BillAccountNodeAlias>000001</p109:BillAccountNodeAlias>\n <p109:BillAccountNodeType>G</p109:BillAccountNodeType>\n <p109:BillingAccountNumber>000001</p109:BillingAccountNumber>\n </p109:BillAccount>\n <p109:BillAccount>\n <p109:BillAccountNodeId>119376</p109:BillAccountNodeId>\n <p109:BillAccountNodeType>SA</p109:BillAccountNodeType>\n <p109:BillingAccountNumber>8310000221930</p109:BillingAccountNumber>\n <p109:GamsId>BEPLAGEN</p109:GamsId>\n <p109:BillGroup>VAP</p109:BillGroup>\n </p109:BillAccount>\n <p109:BillAccount>\n <p109:BillAccountNodeId>119377</p109:BillAccountNodeId>\n <p109:BillAccountNodeType>SA</p109:BillAccountNodeType>\n <p109:BillingAccountNumber>8310000221932</p109:BillingAccountNumber>\n <p109:GamsId>BES00B</p109:GamsId>\n <p109:BillGroup>VAQ</p109:BillGroup>\n </p109:BillAccount>\n </p109:setBillAccountMigrRequest>\n </soapenv:Body>\n</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/\">","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"203","kudosSumWeight":0,"postTime":"2017-03-14T11:37:11.400-07:00","lastPublishTime":"2017-03-14T11:42:30.303-07:00","metrics":{"__typename":"MessageMetrics","views":3829},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjUuNHwyLjF8b3wxfDE0OjAsMzk6MXwx","node":{"__ref":"ForumReplyMessage:message:138157"}}]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"ModerationData:moderation_data:138157":{"__typename":"ModerationData","id":"moderation_data:138157","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:138157":{"__typename":"ForumReplyMessage","author":{"__ref":"User:user:68898"},"id":"message:138157","entityType":"FORUM_REPLY","eventPath":"category:soapui-os-community/community:nwkab66374board:SoapUI_OS/message:137915/message:138157","revisionNum":1,"uid":138157,"depth":4,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:SoapUI_OS"},"parent":{"__ref":"ForumReplyMessage:message:138034"},"conversation":{"__ref":"Conversation:conversation:137915"},"subject":"Re: Need help in writing content of request (selected attributes) to external XML file.","moderationData":{"__ref":"ModerationData:moderation_data:138157"},"body":"
<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>
\n
Hi, Any update on my query please ?
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"37","kudosSumWeight":0,"repliesCount":6,"postTime":"2017-03-16T07:46:52.995-07:00","lastPublishTime":"2017-03-16T07:46:52.995-07:00","metrics":{"__typename":"MessageMetrics","views":3805},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}}}}},"page":"/forums/ForumMessagePage/ForumMessagePage","query":{"boardId":"soapui_os","messageSubject":"need-help-in-writing-content-of-request-selected-attributes-to-external-xml-file","messageId":"137915","replyId":"137919"},"buildId":"3XH0qYWYCnEYycuN5W4S8","runtimeConfig":{"buildInformationVisible":false,"logLevelApp":"info","logLevelMetrics":"info","surveysEnabled":true,"openTelemetry":{"clientEnabled":false,"configName":"smartbear","serviceVersion":"25.4.0","universe":"prod","collector":"http://localhost:4318","logLevel":"error","routeChangeAllowedTime":"5000","headers":"","enableDiagnostic":"false","maxAttributeValueLength":"4095"},"apolloDevToolsEnabled":false,"quiltLazyLoadThreshold":"3"},"isFallback":false,"isExperimentalCompile":false,"dynamicIds":["components_seo_QAPageSchema","components_community_Navbar_NavbarWidget","components_community_Breadcrumb_BreadcrumbWidget","components_messages_TopicWithThreadedReplyListWidget","components_messages_MessageListForNodeByRecentActivityWidget","components_messages_RelatedContentWidget","components_customComponent_CustomComponent","components_messages_MessageView_MessageViewStandard","components_messages_EscalatedMessageBanner","shared_client_components_common_List_UnstyledList","components_messages_MessageView","components_messages_MessageView_MessageViewInline","shared_client_components_common_Pager_PagerLoadMore","components_customComponent_CustomComponentContent_TemplateContent"],"appGip":true,"scriptLoader":[]}