0

Below are the sample output:

er : [com.rbsg.digital.platform.model.persistence.entity.EntityAddressDTO.individuals#263660]
2019-04-13 05:00:19.924 DEBUG LENDING_DIGITAL_CERT_STAFF_LBZ5_PROD_MM [http-bio-0.0.0.0-55405-exec-14 - AbstractPersistenceService] Customer reasons for pausing application: []
2019-04-13 05:00:20.016 DEBUG LENDING_DIGITAL_CERT_STAFF_LBZ5_PROD_MM [http-bio-0.0.0.0-55405-exec-14 - AbstractPersistenceService] Customer reasons for pausing application: []
2019-04-13 05:00:22.063 INFO  LENDING_DIGITAL_CERT_STAFF_LBZ5_PROD_MM [pool-4-thread-2 - OUGWService] Inbound Message
----------------------------
ID: 2
Response-Code: 200
Encoding: ISO-8859-1
Content-Type: text/xml
Headers: {connection=[Keep-Alive], content-type=[text/xml], Date=[Sat, 13 Apr 2019 04:00:21 GMT], Server=[Jetty(8.1.17.v20150415)], transfer-encoding=[chunked], X-Backside-Transport=[OK OK,OK OK], X-Client-IP=[11.130.9.244], X-Global-Transaction-ID=[1842674815]}
Payload: <?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:ougWSResponse xmlns:ns2="http://ougwebcomponent.components.oug.osgi.scorex.com/"><data_flux><item>return status</item><item>OK</item></data_flux><data_flux><item>return code</item><item>0</item></data_flux><data_flux><item>workflow_name</item><item>NewApplication</item></data_flux><data_flux><item>bps.output</item><item>&lt;?xml version="1.0" encoding="UTF-8"?>&lt;Output>&#13;
&lt;ApplicationDetails>&#13;
&lt;PowerCurveID>BBBC000000189110&lt;/PowerCurveID>&#13;
&lt;ApplicationID>BT00241267&lt;/ApplicationID>&#13;
&lt;DecisionDate>20190413&lt;/DecisionDate>&#13;
&lt;DecisionTime>05:00:13&lt;/DecisionTime>&#13;
&lt;/ApplicationDetails>&#13;
&lt;DecisionDetails>&#13;
&lt;DecisionText>Accept&lt;/DecisionText>&#13;
&lt;AffordabilityPass>I&lt;/AffordabilityPass>&#13;
&lt;EnhancedBLEDecision>A&lt;/EnhancedBLEDecision>&#13;
&lt;ExistingBusMonthlyLoanRep>3000.00&lt;/ExistingBusMonthlyLoanRep>&#13;
&lt;ExistingBusODAveDebitBal>5000.00&lt;/ExistingBusODAveDebitBal>&#13;
&lt;PolicyMessages>&#13;
&lt;PolicyMessage>ENHANCED BLE ACCEPT (A)&lt;/PolicyMessage>&#13;
&lt;PolicyMessage>AFFORDABILITY PASS (A)&lt;/PolicyMessage>&#13;
&lt;/PolicyMessages>&#13;
&lt;ReasonCodes>&#13;
&lt;ReasonCode>AS02&lt;/ReasonCode>&#13;
&lt;ReasonCode>AA01&lt;/ReasonCode>&#13;
&lt;/ReasonCodes>&#13;
&lt;Applicants>&#13;
&lt;Applicant>&#13;
&lt;CustomerCin>1857419365&lt;/CustomerCin>&#13;
&lt;Derivation>&#13;
&lt;ExistingPersMonthlyLoanRep>0.00&lt;/ExistingPersMonthlyLoanRep>&#13;
&lt;ExistingPersODandCCDebitAveBal>0.00&lt;/ExistingPersODandCCDebitAveBal>&#13;
&lt;/Derivation>&#13;
&lt;/Applicant>&#13;
&lt;/Applicants>&#13;
&lt;/DecisionDetails>&#13;
&lt;/Output>&#13;
</item></data_flux></ns2:ougWSResponse></soap:Body></soap:Envelope>
--------------------------------------
2019-04-13 05:00:22.065 DEBUG LENDING_DIGITAL_CERT_STAFF_LBZ5_PROD_MM [pool-4-thread-2 - PowerCurveRiskDecisionClient] PowerCurve Response for application BT00241267 XML = <?xml version="1.0" encoding="UTF-8"?><Output>
<ApplicationDetails>
<PowerCurveID>BBBC000000189110</PowerCurveID>
<ApplicationID>BT00241267</ApplicationID>
<DecisionDate>20190413</DecisionDate>
<DecisionTime>05:00:13</DecisionTime>
</ApplicationDetails>
<DecisionDetails>
<DecisionText>Accept</DecisionText>
<AffordabilityPass>I</AffordabilityPass>
<EnhancedBLEDecision>A</EnhancedBLEDecision>
<ExistingBusMonthlyLoanRep>3000.00</ExistingBusMonthlyLoanRep>
<ExistingBusODAveDebitBal>5000.00</ExistingBusODAveDebitBal>
<PolicyMessages>
<PolicyMessage>ENHANCED BLE ACCEPT (A)</PolicyMessage>
<PolicyMessage>AFFORDABILITY PASS (A)</PolicyMessage>
</PolicyMessages>
<ReasonCodes>
<ReasonCode>AS02</ReasonCode>
<ReasonCode>AA01</ReasonCode>
</ReasonCodes>
<Applicants>
<Applicant>
<CustomerCin>1857419365</CustomerCin>
<Derivation>
<ExistingPersMonthlyLoanRep>0.00</ExistingPersMonthlyLoanRep>
<ExistingPersODandCCDebitAveBal>0.00</ExistingPersODandCCDebitAveBal>
</Derivation>
</Applicant>
</Applicants>
</DecisionDetails>
</Output>

2019-04-13 05:00:22.113 DEBUG LENDING_DIGITAL_CERT_STAFF_LBZ5_PROD_MM [pool-4-thread-2 - PowerCurveService] Powercurve check completed for applicationId = BT00241267 Time taken 17652

I want to extract only XML message

I am using this command right now :

grep -v 'RemoteRequestContextValve]' | grep -v 'SQL]' | grep -v 'CriteriaQueryImpl]' |grep -v 'AbstractFlushingEventListener' | grep -v 'Collection' | grep -v 'HikariPool]' | grep -v 'PoolBase]' | grep -v 'TwoPhaseLoad]' | grep -v 'CriteriaQueryImpl]' | grep -v 'Loader]' | grep -v 'Hibernate:' | grep -v 'UserPrincipal' | grep -v 'AffirmativeVoter]' | grep -v 'SpringSecurityMethod' | grep -v 'PersistenceServiceImpl]' | grep -v 'EntityPrinter]' | grep -v 'TransactionImpl]' | grep -v JdbcCoordinatorImpl] | grep -v 'TransactionImpl]' | grep -v 'SequenceStructure]' | grep -v 'ResourceRegistryStandardImpl]' | grep -v 'AbstractSaveEventListener]' | grep -v 'CXFProperties]' | grep -v 'GenericCXFHelper'  

But I want a little bit short command

  • can u share ur desired output? – msp9011 Apr 15 at 8:59
  • None of the strings you grep for are in your output. – Panki Apr 15 at 9:03
  • @msp9011 the OP called it "sample output", but I can see where the confusion comes from: the scripts output is greps input. – Panki Apr 15 at 9:13
  • It reads like you want to drop everything before the <?xml... right? But your script doesn't remove all that. Can there also be unwanted text after the XML part? And finally: Is it intended that some opening < are coded as &lt;? – Philippos Apr 16 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.