shivashish
13 years agoOccasional Contributor
Creating a SOAP request for webservices testing through script
Hi,
I want to create a soap request as shown below. As you can see from the code below, the method Request1RQ takes an object as in input parameter and then provides the response back. I am creating a SOAP request through TC as shown in the link (http://support.smartbear.com/viewarticle/18902/). However , i am not able to pass the values(CFU) into the parameter HotelCityCode. The parameter can be accessed by the following line
TypeFactory.HotelSearchCriterionType.HotelRef.HotelCityCode = "CFU"
My question is, how can i Specify the values for the HotelCityCode method through TestComplete code? Can someone please help me with this? I feel that it has a very simple solution , but for some reason i am not able to get this working inspite of trying this for the past two days:(
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<authentication xmlns="http://xmlota.wspan.com/webservice/">
<userid>userone</userid>
<password>nicole1</password>
</authentication>
</soap:Header>
<soap:Body>
<Request1RQ xmlns="http://XXXXXXXX/2003/05" Version="1">
<AvailRequestSegments>
<AvailRequestSegment>
<StayDateRange Start="2012-08-14" End="2012-08-21"/>
<RoomStayCandidates>
<RoomStayCandidate>
<GuestCounts>
<GuestCount Count="2" AgeQualifyingCode="10"/>
</GuestCounts>
</RoomStayCandidate>
</RoomStayCandidates>
<HotelSearchCriteria>
<Criterion>
<HotelRef HotelCityCode="CFU"/>
</Criterion>
</HotelSearchCriteria>
</AvailRequestSegment>
</AvailRequestSegments>
</OTA_HotelAvailRQ>
</soap:Body>
</soap:Envelope>
I want to create a soap request as shown below. As you can see from the code below, the method Request1RQ takes an object as in input parameter and then provides the response back. I am creating a SOAP request through TC as shown in the link (http://support.smartbear.com/viewarticle/18902/). However , i am not able to pass the values(CFU) into the parameter HotelCityCode. The parameter can be accessed by the following line
TypeFactory.HotelSearchCriterionType.HotelRef.HotelCityCode = "CFU"
My question is, how can i Specify the values for the HotelCityCode method through TestComplete code? Can someone please help me with this? I feel that it has a very simple solution , but for some reason i am not able to get this working inspite of trying this for the past two days:(
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<authentication xmlns="http://xmlota.wspan.com/webservice/">
<userid>userone</userid>
<password>nicole1</password>
</authentication>
</soap:Header>
<soap:Body>
<Request1RQ xmlns="http://XXXXXXXX/2003/05" Version="1">
<AvailRequestSegments>
<AvailRequestSegment>
<StayDateRange Start="2012-08-14" End="2012-08-21"/>
<RoomStayCandidates>
<RoomStayCandidate>
<GuestCounts>
<GuestCount Count="2" AgeQualifyingCode="10"/>
</GuestCounts>
</RoomStayCandidate>
</RoomStayCandidates>
<HotelSearchCriteria>
<Criterion>
<HotelRef HotelCityCode="CFU"/>
</Criterion>
</HotelSearchCriteria>
</AvailRequestSegment>
</AvailRequestSegments>
</OTA_HotelAvailRQ>
</soap:Body>
</soap:Envelope>