How to capture multiple lines response using groovy script
Hello All,
I have below xml response and want to capture/store all the data from same using groovy script.
I dont know how to store it. Can anyone please help me a bit new to coding. I want to capture each element like C14, J0 and so on.
<Response>ADDCAN 788 C14 J0 D2 P0 Z0 I0 R0 Y0
G0 S0 X0 B0 M2 K0 L0 V3
H9 U4 Q0 T0 W0 E0 O0 N0
TTL 34</Response>
Below is the response :
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader eb:version="1.0" soap-env:mustUnderstand="1" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader">
<eb:From>
<eb:PartyId eb:type="URI">Server</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="URI">Client</eb:PartyId>
</eb:To>
<eb:CPAId>IPCC</eb:CPAId>
<eb:ConversationId>9DB7_921682_1204548352874</eb:ConversationId>
<eb:Service>SabreCommandLLSRQ</eb:Service>
<eb:Action>SabreCommandLLSRS</eb:Action>
<eb:MessageData>
<eb:MessageId>362528217345300870</eb:MessageId>
<eb:Timestamp>2019-09-25T06:02:14</eb:Timestamp>
<eb:RefToMessageId>mid:1</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/STSB!ICESMSLB\/STS.LB!-2970499087114656116!453481!0</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<SabreCommandLLSRS Version="1.0" xmlns="http://webservices.sabre.com/sabreXML/2003/07">
<Response>ADDCAN 788 C14 J0 D2 P0 Z0 I0 R0 Y0
G0 S0 X0 B0 M2 K0 L0 V3
H9 U4 Q0 T0 W0 E0 O0 N0
TTL 34</Response>
</SabreCommandLLSRS>
</soap-env:Body>
</soap-env:Envelope>
Thanks in advance .....
Dinesh