Forum Discussion
Solution will dependent on that.
- satishdurugu5 years agoNew Contributor
Hi NMRao,
Here is full request. I would like to take control of whole request into groovy script and replace some element values with Custom Properties defined at Test Suite level. When I am executing the groovy script now its returning null value. I have attached my groovy script.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.united.com/merch/services">
<soapenv:Header/>
<soapenv:Body>
<MerchOfferRequest TransactionIdentifier="55678" TransactionLog="true">
<RequestCriterion>
<OriginDestinationOptions Id="OD1">
<FlightSegment ActiveInd="Y" Id="1">
<DepartureAirport LocationCode="IAH"/>
<ArrivalAirport LocationCode="DEN"/>
<DepartureDateTime>dfdf</DepartureDateTime>
<ArrivalDateTime>2020-12-01T19:00:00</ArrivalDateTime>
<FlightNumber>863</FlightNumber>
<OperatingAirline>UA</OperatingAirline>
<MarketingAirline>UA</MarketingAirline>
<SegmentNumber>1</SegmentNumber>
<ClassOfService>Y</ClassOfService>
<TripIndicator>C</TripIndicator>
<SegmentStatus>HK</SegmentStatus>
<IsSeatMapPricing>false</IsSeatMapPricing>
</FlightSegment>
</OriginDestinationOptions>
<TravelerInfo>
<Traveler HostIndex="1.1">
<Id>1</Id>
<GivenName>THREESILVER</GivenName>
<Surname>TESTER</Surname>
<PassengerTypeCode>ADT</PassengerTypeCode>
<!--<TravelerCategory>MET</TravelerCategory>-->
<Gender>Unknown</Gender>
<TicketingDate>2020-03-25T00:00:00</TicketingDate>
<TicketNumber/>
</Traveler>
</TravelerInfo>
<IncludeExcludeOffers>
<ServiceFilterCode ServiceCode="BAG" ResultAction="Include"/>
</IncludeExcludeOffers>
<!--<BookingReferenceIds BookingReferenceId="CDBZ7L"/>-->
</RequestCriterion>
<Requestor ChannelId="101" CurrencyCode="" ChannelName="OBE" CountryCode="US" TicketingCountryCode="US"/>
</MerchOfferRequest>
</soapenv:Body>
</soapenv:Envelope>- nmrao5 years agoChampion Level 3
Thanks for adding request.
However, not sure what you mean by "take control of whole request into groovy script"?
The question is not clear whether you want to retrieve data or youo want to replace the data.
Also do specify which fields (or data) that needs to be worked on.
Or please give high level view of your use case or what you are trying to achieve?
- sonya_m5 years agoSmartBear Alumni (Retired)
Hi satishdurugu, it looks like you replied to the email - this way your answer won't reach the Community. Please copy the answer here, thank you!
Related Content
- 5 years ago
- 12 months ago
Recent Discussions
- 15 years ago