Forum Discussion
saravananramamo
13 years agoContributor
Hi
Sorry for the late response.
Steps:
1. Find the primary element of the complex type I_XX_GET_PRICE_IN_TBL_ITEM.
2. using the element get the the corresponding I_XX_GET_PRICE_IN_TBL_ITEM complex type
3. fetch the PRODUCT element.
Let me know if u need more details
Sorry for the late response.
Steps:
1. Find the primary element of the complex type I_XX_GET_PRICE_IN_TBL_ITEM.
2. using the element get the the corresponding I_XX_GET_PRICE_IN_TBL_ITEM complex type
3. fetch the PRODUCT element.
//initialization.
def reqxml = new XmlParser().parseText(messageExchange.requestContent)
def typ= new groovy.xml.Namespace("ur namespace")
// get the list
def productitems = reqxml[typ.I_XX_GET_PRICE_IN_TBL_ITEM]
// fetch the unique I_XX_GET_PRICE_IN_TBL_ITEM complextype using I_REFERRAL_LINE_ID
def first = productitems.find{it[typ.I_REFERRAL_LINE_ID].text()=="2180188"}
//do it for second and third
//then do assertions based on first,second and third.
Let me know if u need more details