DetailsTeld.java 1.81 KB
Newer Older
ED-DRIF committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
/*
 * package com.fractalite.hermes.teldar.parsers;
 * 
 * import java.io.IOException; import java.net.URL; import
 * java.security.NoSuchAlgorithmException;
 * 
 * import com.gekko_holding.webservice.Availability.GetHotelDetails; import
 * com.gekko_holding.webservice.Availability.HotelCode; import
 * com.gekko_holding.webservice.Availability.HotelCodes; import
 * com.gekko_holding.webservice.Availability.Identification;
 * 
 * public class DetailsTeld {
 * 
 * public static final String CLIENTID = "atlasvoyages/master/test"; public
 * static final String PASSWORD = "p*TE*kH!e8$%dS"; public static final String
 * CUSTOMERKEY = "atlasvoyages/test";
 * 
 * static { System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2"); }
 * 
 * public static void main(String[] args) throws NoSuchAlgorithmException { //
 * TODO Auto-generated method stub
 * 
 * try { String endpoint =
 * "https://api.teldartravel.com/gekko-front/ws/v2_4/AvailabilityService";
 * 
 * URL url = new URL(endpoint);
 * 
 * GetHotelDetails gethoteldetails = new GetHotelDetails();
 * gethoteldetails.setLanguage("FR"); Identification identification = new
 * Identification(); identification.setClientId(CLIENTID);
 * identification.setPassword(PASSWORD);
 * gethoteldetails.setIdentification(identification);
 * 
 * gethoteldetails.setCityCodeStandard("locode");
 * 
 * HotelCodes hotelcodes = new HotelCodes(); HotelCode hotelcode = new
 * HotelCode(); HotelCode hotelcodeprime = new HotelCode();
 * hotelcode.setCode("FR008538"); hotelcodeprime.setCode("FR037763");
 * hotelcodes.getHotelCode().add(hotelcode);
 * hotelcodes.getHotelCode().add(hotelcodeprime);
 * gethoteldetails.setHotelCodes(hotelcodes); Utils.constructXml(url,
 * gethoteldetails, CLIENTID, PASSWORD);
 * 
 * } catch (IOException e) { System.out.println("the errors : " +
 * e.getMessage()); } } }
 */