Thanks again, Rao.
My API script contains a few XML requests and below is the response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:changeSdmDataResponse resultCode="0" message="success" xmlns:ns2="http://www.abcnumber.com/titan/sdm/soap/types">
<sdmDataResponse flowId="1">
<ns2:changeImsiDataResponse resultCode="0" message="success"/>
</sdmDataResponse>
<sdmDataResponse flowId="2">
<ns2:changeMsisdnDataResponse resultCode="0" message="success"/>
</sdmDataResponse>
<sdmDataResponse flowId="3">
<ns2:changeImsSubscriberDataResponse resultCode="0" message="success"/>
</sdmDataResponse>
<sdmDataResponse flowId="4">
<ns2:changeImsPrivateUserDataResponse resultCode="0" message="success"/>
</sdmDataResponse>
<sdmDataResponse flowId="5">
<ns2:changeImsPublicUserDataResponse resultCode="0" message="success"/>
</sdmDataResponse>
<sdmDataResponse flowId="6">
<ns2:changeImsPublicUserDataResponse resultCode="0" message="success"/>
</sdmDataResponse>
<sdmDataResponse flowId="7">
<ns2:changeImsPublicUserDataResponse resultCode="0" message="success"/>
</sdmDataResponse>
<sdmDataResponse flowId="8">
<ns2:changeImsSubscriberDataResponse resultCode="0" message="success"/>
</sdmDataResponse>
</ns2:changeSdmDataResponse>
</soap:Body>
My Groovy:
...
...
def xmlResponse = tStep.getPropertyValue("Response")
def holder = groovyUtils.getXmlHolder(xmlResponse)
def xml = new XmlSlurper().parseText(xmlResponse)
def MESSAGE1 = xml.Body.changeSdmDataResponse.@resultCode.text()
def MESSAGE2 = xml.Body.changeSdmDataResponse.sdmDataResponse.changeImsiDataResponse.@resultCode.text()
def MESSAGE3 = xml.Body.changeSdmDataResponse.sdmDataResponse.changeMsisdnDataResponse.@resultCode.text()
def MESSAGE4 = xml.Body.changeSdmDataResponse.sdmDataResponse.changeImsSubscriberDataResponse.@resultCode.text()
def MESSAGE5 = xml.Body.changeSdmDataResponse.sdmDataResponse.changeImsPrivateUserDataResponse.@resultCode.text()
def MESSAGE6 = xml.Body.changeSdmDataResponse.sdmDataResponse.changeImsPublicUserDataResponse.@resultCode.text()
log.info " Seq="+i+" "+data[0]+", "+data[1]+" Result: ["+MESSAGE1+"] "+MESSAGE2+" "+MESSAGE3+" "+MESSAGE4+" "+MESSAGE5+" "+MESSAGE6
...
...
In the request, I have to execute changeImsPublicUserData 3 times and changeImsSubscriberDataResponse 2 times (in a specific sequence but with different values).
Log record: Tue Jun 22 21:05:02 EDT 2021:INFO: Seq=0 302330000006120, 12313140097 Result: [0] 0 0 00 0 000
In the response, since the 3 changeImsPublicUserData requests were all successfully, the log file show "000" (Zero means success).
Since there is no distinction of the 3 responses of changeImsPublicUserData, I guess there is no way to display it in a better way, right?
Ideally, I like to see Result: [0] 0 0 0 0 0 0 0 0 or Result: [0] 0 0 0-0 0 0-0-0
Any suggestions?