Janine_Billings
16 years agoOccasional Contributor
context.expand for a ws response element returns no value
Hi
I'm trying to extract the element from a response in a groovy script using the following (context menu getData functionality)
def response = context.expand( '${GAP_T1#Response#//ns1:GetApplicableProductsResponse[1]/Products[1]/Product[1]/ProductCode[1]}' )
This element does have a value populated in the response
When using log.info to validate the response variable is empty
When using the property transfer functionality to extract the productCode and then transfer to the desired request the product code is correctly populated and passed.
I'm not sure how to resolve and why I get different results for the same thing?
I would like to use the groovy script to transfer as I need to populate multiple requests and don't want to have multiple property transfers for each request
Thanks
Christopher
I'm trying to extract the element from a response in a groovy script using the following (context menu getData functionality)
def response = context.expand( '${GAP_T1#Response#//ns1:GetApplicableProductsResponse[1]/Products[1]/Product[1]/ProductCode[1]}' )
This element does have a value populated in the response
When using log.info to validate the response variable is empty
When using the property transfer functionality to extract the productCode and then transfer to the desired request the product code is correctly populated and passed.
I'm not sure how to resolve and why I get different results for the same thing?
I would like to use the groovy script to transfer as I need to populate multiple requests and don't want to have multiple property transfers for each request
Thanks
Christopher