Forum Discussion
groovy script don’t have a response value, they have a result value. You might have to check the step type (e.g. request or groovy script) and then decide whether to look for #response or #result.
- dinojadhav4 years agoOccasional Contributor
Hi Chris,
I am a bit new to groovy and correct me if I am wrong here. Below is the sameple request and response :
Here Add Itinerary is my Test Step Name and which execute 01Y5 command and the line " 1 ET 105Y......" is the response of that command. In my case I am getting result as " Add Itinerary : NULL" means the command is not captured :
Add Itinerary : 01Y5
Add Itinerary : 1 ET 105Y 07JUN M MQXADD SS1 255P 420P /E
ARR-TERMINAL 1- ChrisAdams4 years agoChampion Level 3
Hi,
Is the below code snippet the part that is not working?
def RSholder = groovyUtils.getXmlHolder(StepName.toString()+"#Response") RSholder.namespaces["xmlns"] = "http://webservices.sabre.com/sabreXML/2003/07" def nodeRS = RSholder.getNodeValue("//xmlns:SabreCommandLLSRS/xmlns:Response")
Do you have other requests that go down this branch and if so, do they return the response?
- dinojadhav4 years agoOccasional Contributor
I guess this is code which is not working :
else{
def RQHolder = groovyUtils.getXmlHolder(StepName.toString()+"#Request")
RQHolder.namespaces["xmlns"] = "http://webservices.sabre.com/sabreXML/2003/07"
def nodeRQ = RQHolder.getNodeValue("//xmlns:SabreCommandLLSRQ/xmlns:Request/xmlns:HostCommand")
Related Content
- 3 years ago
- 12 years ago
Recent Discussions
- 15 years ago