Forum Discussion

Janine_Billings's avatar
Janine_Billings
Occasional Contributor
16 years ago

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

4 Replies

  • Hi,

    there have been some improvements for this in the latest builds, which version/build are you using?

    regards!

    /Ole
    eviware.com
  • Janine_Billings's avatar
    Janine_Billings
    Occasional Contributor
    Hi Ole
    I'm using 3.0.1, I should really update to the latest version!

    Thanks
    Christopher
  • Hi,

    ok.. please do that just to make sure that this isn't an issue that has been fixed already.. Let me know!

    regards,

    /Ole
    eviware.com
  • Janine_Billings's avatar
    Janine_Billings
    Occasional Contributor
    Hi Ole
    Sorry for the late reply.
    This now functions as expected with latest version

    Thanks
    Christopher