KML not loading into google maps API v3 - google-maps-api-3

I have gone over this code for the last couple of hours and I can not figure out why it is not working. It was working until i started adding more place markers. When I run it though a KML validator i get the following error "Unable to read content from xxxx.kml. Are the file format and character encoding correct?"
Does anyone know what I am doing wrong?
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<document>
<Placemark>
<name>The Stables Bar</name>
<description>888 Hay St, Perth WA 6000</description>
<Point>
<coordinates>115.853097,-31.952223,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Laneway Lounge</name>
<description>414A Murray Street Perth WA 6000</description>
<Point>
<coordinates>115.853839,-31.951099,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Choo Choo's</name>
<description>125 St Georges Terrace, Perth, Western Australia 6000</description>
<Point>
<coordinates>115.854628,-31.954883,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Apple Daily</name>
<description>125 St Georges Terrace, Perth, Western Australia 6000</description>
<Point>
<coordinates>115.854738,-31.954855,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Bar de Halcyon</name>
<description>Wolf Lane Perth, WA 6000</description>
<Point>
<coordinates>115.855933,-31.952619,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Bob's Bar at Print Hall</name>
<description>125 St Georges Terrace, Perth, Western Australia 6000</description>
<Point>
<coordinates>115.855170,-31.954918,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Bar Lafayette</name>
<description>125 St Georges Terrace, Perth, Western Australia 6000</description>
<Point>
<coordinates>115.854679,-31.954819,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>1907 Restaurant and Cocktail Bar</name>
<description>26 Queen St, Perth</description>
<Point>
<coordinates>115.856590,-31.951334,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Lalla Rookh</name>
<description>77 St Georges Terrace, Perth WA 6000</description>
<Point>
<coordinates>115.858371,-31.955540,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Bar One</name>
<description>250 St Georges Terrace, Perth WA 6000</description>
<Point>
<coordinates>115.850572,-31.952616,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Cheeky Sparrow</name>
<description>Shop 1/317 Murray St Perth WA 6000</description>
<Point>
<coordinates>115.855964,-31.952298,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Sasellas Bar & Bistro</name>
<description>Upper Hay Street Level, Carillon City Arcade, Perth WA 6000</description>
<Point>
<coordinates>115.858865,-31.953137,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Sentinel Bar & Grill Restaurant</name>
<description>111 St Georges Terrace, Perth WA 6000</description>
<Point>
<coordinates>115.855805,-31.954909,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Boheme</name>
<description>300 Murray St, Perth WA 6000</description>
<Point>
<coordinates>115.857400,-31.952189,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Conservatory Rooftop Bar</name>
<description>365 Murray St, Perth WA 6000</description>
<Point>
<coordinates>115.854993,-31.951568,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Greenhouse</name>
<description>100 St Georges Terrace, Perth WA 6000</description>
<Point>
<coordinates>115.857670,-31.954887,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Trustee Bar and Bistro</name>
<description>133 St Georges Tce, Perth WA 6000</description>
<Point>
<coordinates>115.855176,-31.954423,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Tiger,Tiger</name>
<description>329 Murray St, Perth WA 6000</description>
<Point>
<coordinates>115.855975,-31.952062,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Venn Bar + Cafe</name>
<description>16 Queen St, Perth WA 6000</description>
<Point>
<coordinates>115.856495,-31.951748,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Wolf Lane Bar</name>
<description>Wolf Lane 321 Murray St, Perth WA 6000</description>
<Point>
<coordinates>115.855748,-31.952510,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Butterworth Bar & Kitchen</name>
<description>Ground Floor, Exchange Plaza, Perth WA 6000</description>
<Point>
<coordinates>115.858659,-31.956595,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Canton Lounge Bar</name>
<description>532 Hay St, Perth WA 6000</description>
<Point>
<coordinates>115.862666,-31.955345,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Etro Bar</name>
<description>49 King St, Perth WA 6000</description>
<Point>
<coordinates>115.855095,-31.951920,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Varnish on King</name>
<description>75 King St, Perth WA 6000</description>
<Point>
<coordinates>115.855543,-31.950993,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Lost Society</name>
<description>918 Hay St, Perth WA 6000</description>
<Point>
<coordinates>115.852335,-31.951861,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Mechanic Institute</name>
<description>222 William St, Northbridge WA 6000</description>
<Point>
<coordinates>115.859842,-31.948820,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Universal Bar</name>
<description>221 William St, Perth WA 6003</description>
<Point>
<coordinates>115.859543,-31.948670,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Frisk Small Bar</name>
<description>31/103-105 Francis St, Perth WA 6003</description>
<Point>
<coordinates>115.856724,-31.946700,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Pica Bar and Cafe</name>
<description>Perth Cultural Centre, James St, Northbridge WA 6000</description>
<Point>
<coordinates>115.860328,-31.949734,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Ellington Jazz Club</name>
<description>191 Beaufort St, Perth WA 6000</description>
<Point>
<coordinates>115.864292,-31.946683,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Moon Cafe</name>
<description>Shop 2/323 William St, Northbridge WA 6003</description>
<Point>
<coordinates>115.861155,-31.946033,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Brown Fox</name>
<description>72 Outram St, West Perth WA 6005</description>
<Point>
<coordinates>115.840356,-31.947353,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Hula Bula Bar</name>
<description>12 Victoria Ave, Perth WA 6000</description>
<Point>
<coordinates>115.865790,-31.956914,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Andaluz Bar & Tapas</name>
<description>321 Howard St, Perth WA 6000</description>
<Point>
<coordinates>115.857228,-31.955534,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Ezra Pound</name>
<description>189 William St, Northbridge WA 6003</description>
<Point>
<coordinates>115.858998,-31.949364,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Bird</name>
<description>181 William St, Northbridge WA 6003</description>
<Point>
<coordinates>115.858844,-31.949706,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The George</name>
<description>216 St Georges Terrace, Perth WA 6000</description>
<Point>
<coordinates>115.852535,-31.953275,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Amphoras Bar</name>
<description>1303 Hay St, West Perth WA 6005</description>
<Point>
<coordinates>115.839396,-31.947948,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Ya-Ya's</name>
<description>147 James St, Northbridge WA 6003</description>
<Point>
<coordinates>115.856888,-31.948061,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Bivouac Canteen & Bar</name>
<description>198 William St, Northbridge WA 6003</description>
<Point>
<coordinates>115.859211,-31.949395,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Bobeche</name>
<description>131 St Georges Terrace, Perth WA 6000</description>
<Point>
<coordinates>115.855194,-31.954401,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>The Aviary</name>
<description>1/140 William St, Perth, WA 6000</description>
<Point>
<coordinates>115.857878,-31.952255,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>399 Bar</name>
<description>399 William St, Perth WA 6000</description>
<Point>
<coordinates>115.862158,-31.944359,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Helvetica Bar</name>
<description>101 St Georges Terrace, Perth WA 6000</description>
<Point>
<coordinates>115.856947,-31.955478,0</coordinates>
</Point>
</Placemark>
</document>
</kml>

Basically KML is XML. In XML the & may only be used to define a character entity reference. When you want to use the & as character you must encode it as &
Your KML contains multiple non-encoded &
You may easy validate the KML as XML by giving it the extension .xml and opening it in any browser. When there are XML-errors the browser will give you a message.

Related

OTA_HotelResRQ Fails with GUARANTEE NOT ACCEPTED

We have a reservation failing with "GUARANTEE NOT ACCEPTED" in the OTA_HotelResRQ response. The RoomRate node does indeed say GuaranteeSurchargeRequired = "D". So we pass "GDPST". All other reservations in our system appear to flow just fine by either passing GC for "G" and GDPST for "D". For this particular hotel, GDPST is listed asa deposit type in HotelPropertyDescriptionRS. Sabre, very confusing as always.
The odd thing is we do get a Success node back, but there is no confirmation number from the hotel, which is generally found at OTA_HotelResRS.Hotel.BasicPropertyInfo.ConfirmationNumber. We also see a Status of "UC" in the Success node, but I am unsure what that means. Perhaps "unconfirmed?"
OTA_HotelResRQ & OTA_HotelResRS:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<MessageHeader xmlns="http://www.ebxml.org/namespaces/messageHeader">
<From>
<PartyId type="urn:x12.org:IO5:01">REDACTED</PartyId>
</From>
<To>
<PartyId type="urn:x12.org:IO5:01">Sabre webservices.havail.sabre.com</PartyId>
</To>
<CPAId>REDACTED</CPAId>
<ConversationId>1540952619</ConversationId>
<Service type="sabreXML">OTA_HotelResLLSRQ</Service>
<Action>OTA_HotelResLLSRQ</Action>
<MessageData>
<MessageId>1540952619</MessageId>
<Timestamp>2018-10-30T20:23:39</Timestamp>
<TimeToLive>2018-10-30T21:23:39</TimeToLive>
</MessageData>
</MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/12/utility">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">REDACTED</wsse:BinarySecurityToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<OTA_HotelResRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" ReturnHostCommand="true" TimeStamp="2015-05-12T02:00:26-06:00" Version="2.1.0">
<Hotel>
<BasicPropertyInfo InsertAfter="0" RPH="002" />
<Guarantee Type="GDPST">
<CC_Info>
<PaymentCard Code="VI" ExpireDate="2021-10" Number="****1111" />
<PersonName>
<Surname>Fubar</Surname>
</PersonName>
</CC_Info>
</Guarantee>
<RoomType NumberOfUnits="1" />
</Hotel>
</OTA_HotelResRQ>
</soapenv:Body>
</soapenv:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<Header>
<eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="URI">Sabre webservices.havail.sabre.com</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="URI">REDACTED</eb:PartyId>
</eb:To>
<eb:CPAId>REDACTED</eb:CPAId>
<eb:ConversationId>1540952619</eb:ConversationId>
<eb:Service>OTA_HotelResLLSRQ</eb:Service>
<eb:Action>OTA_HotelResLLSRS</eb:Action>
<eb:MessageData>
<eb:MessageId>959157086198330212</eb:MessageId>
<eb:Timestamp>2018-10-31T02:23:41</eb:Timestamp>
<eb:RefToMessageId>1540952619</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
<Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<BinarySecurityToken valueType="String" EncodingType="Base64Binary">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/RESB!ICESMSLB\/RES.LB!1540951687295!355929!327681</BinarySecurityToken>
</Security>
</Header>
<Body>
<OTA_HotelResRS xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:stl="http://services.sabre.com/STL/v01" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.1.0">
<ApplicationResults status="Complete">
<Success timeStamp="2018-10-30T21:23:41-05:00">
<SystemSpecificResults>
<HostCommand LNIATA="222222">/0/0H1½Ú002/GDPSTVI****1111EXP 10 21-FUBAR</HostCommand>
</SystemSpecificResults>
</Success>
</ApplicationResults>
<Hotel NumberInParty="2" NumberOfUnits="1" SegmentNumber="1" Status="UC">
<BasicPropertyInfo ChainCode="PF" HotelCityCode="YVR" HotelCode="9976" HotelName="REDACTED" />
<Guarantee>DPSTVIXXXXXXXXXXXX1111EXP 10 21-FUBAR</Guarantee>
<POS>
<Source>
<RequestorID>46796444</RequestorID>
</Source>
</POS>
<RoomRates>
<RoomRate>
<AdditionalInfo>
<CancelPolicy Option="CNOR" />
</AdditionalInfo>
<Rates>
<Rate Amount="239.00" CurrencyCode="CAD" DCS_AuxRateCode="D1KSP6">
<HotelTotalPricing Amount="561.66">
<Disclaimer>INCLUDES TAXES AND SURCHARGES</Disclaimer>
<TotalSurcharges Amount="0.00" />
<TotalTaxes Amount="83.66">
<TaxFieldOne>53.26</TaxFieldOne>
<TaxFieldThree>24.20</TaxFieldThree>
<TaxFieldTwo>6.20</TaxFieldTwo>
<Text>BED TAX</Text>
<Text>MISCELLANEOUS FEE</Text>
<Text>FEDERAL TAX</Text>
</TotalTaxes>
</HotelTotalPricing>
</Rate>
</Rates>
</RoomRate>
</RoomRates>
<Text>GUARANTEE NOT ACCEPTED</Text>
<TimeSpan Duration="2" End="11-18" Start="11-16" />
</Hotel>
</OTA_HotelResRS>
</Body>
</Envelope>
RoomRate from HotelPropertyDescriptionRS:
<RoomRate DirectConnect="false" GuaranteeSurchargeRequired="D" GuaranteedRateProgram="false" HRD_RequiredForSell="false" IATA_CharacteristicIdentification="D1KSP6" IATA_ProductIdentification="FALL PROMOTIONAL RATE." LowInventoryThreshold="false" RPH="002" RateChangeInd="false" RateConversionInd="false" SpecialOffer="false">
<AdditionalInfo>
<CancelPolicy Numeric="00" Option="N">
<Text>RESERVATION CANNOT BE CANCELED</Text>
</CancelPolicy>
<Commission NonCommission="false">10.00 PERCENT COMMISSION</Commission>
<Text>DELUXE KING 350 SQ FT I KING PILLOW TOP BED</Text>
<Text>INTERNET ACCESS 42 INCH LCD TV CABLE CHANNELS</Text>
</AdditionalInfo>
<Rates>
<Rate Amount="239.00" ChangeIndicator="false" CurrencyCode="CAD" HRD_RequiredForSell="false" PackageIndicator="false" RateConversionInd="false" ReturnOfRateInd="false" RoomOnRequest="false">
<AdditionalGuestAmounts>
<AdditionalGuestAmount MaxExtraPersonsAllowed="0" NumAdults="0" NumCribs="0">
<Charges AdultRollAway="0" Crib="0" ExtraPerson="40.00" />
</AdditionalGuestAmount>
</AdditionalGuestAmounts>
<HotelTotalPricing Amount="561.66">
<Disclaimer>INCLUDES TAXES AND SURCHARGES</Disclaimer>
<TotalSurcharges Amount="0.00" />
<TotalTaxes Amount="83.66" />
</HotelTotalPricing>
</Rate>
</Rates>
</RoomRate>
From HotelRateDescriptionRQ:
<RoomRate DirectConnect="false" GuaranteeSurchargeRequired="D" GuaranteedRateProgram="false" HRD_RequiredForSell="false" IATA_CharacteristicIdentification="D1KSP6" IATA_ProductIdentification="FALL PROMOTIONAL RATE." LowInventoryThreshold="false" RateChangeInd="false" RateConversionInd="false" SpecialOffer="false">
<AdditionalInfo>
<CancelPolicy Numeric="00" Option="N">
<Text>RESERVATION CANNOT BE CANCELED</Text>
</CancelPolicy>
<Commission NonCommission="false">TA COMMISSION IS 10 PERCENT</Commission>
<DCA_Cancellation>
<Text>NON CANCELLABLE RESERVATION</Text>
</DCA_Cancellation>
<DCA_Deposit>
<Text>A DEPOSIT OF 522.92 BY 30-OCT-18 IS MANDATORY</Text>
</DCA_Deposit>
<DCA_Guarantee>
<Text>MUST GUARANTEE ROOM WITH DEPOSIT,AX,CA,CB,DC,DI,DS,IK,JB,JC,MC,</Text>
</DCA_Guarantee>
<DCA_Other>
<Text>MINIMUM LENGTH OF STAY IS 1 NIGHT</Text>
</DCA_Other>
<Text>DELUXE KING 350 SQ FT I KING PILLOW TOP BED</Text>
<Text>INTERNET ACCESS 42 INCH LCD TV CABLE CHANNELS</Text>
<Text>IN-ROOM SAFE- MARBLE BATHROOM- PLUSH BATHROBES</Text>
<Text>-FULL PRE-PAYMENT IS REQUIRED.-NON CANCELLABLE NON REFUNDABLE</Text>
<Text>239.00 DAILY RATE STARTING 16NOV FOR 2 NIGHTS</Text>
<Text>478.00 TOTAL RATE STARTING 16NOV FOR 2 NIGHTS</Text>
</AdditionalInfo>
<Rates>
<Rate Amount="239.00" ChangeIndicator="false" CurrencyCode="CAD" HRD_RequiredForSell="false" PackageIndicator="false" RateConversionInd="false" ReturnOfRateInd="false" RoomOnRequest="false">
<AdditionalGuestAmounts>
<AdditionalGuestAmount MaxExtraPersonsAllowed="1" NumAdults="0" NumCribs="0">
<Charges AdultRollAway="0" Crib="0" ExtraPerson="0.00" />
</AdditionalGuestAmount>
</AdditionalGuestAmounts>
<HotelTotalPricing Amount="561.66">
<Disclaimer>INCLUDES TAXES AND SURCHARGES</Disclaimer>
<TotalSurcharges Amount="0.00" />
<TotalTaxes Amount="83.66">
<TaxFieldOne>53.26</TaxFieldOne>
<TaxFieldThree>24.20</TaxFieldThree>
<TaxFieldTwo>6.20</TaxFieldTwo>
<Text>BED TAX</Text>
<Text>MISCELLANEOUS FEE</Text>
<Text>FEDERAL TAX</Text>
</TotalTaxes>
</HotelTotalPricing>
</Rate>
</Rates>
</RoomRate>
You try to book this with a Visa Card: Code="VI"
Hotel only seems to accept: AX,CA,CB,DC,DI,DS,IK,JB,JC,MC as guarantees
Have you tried a different card?
UC definitely means "Unconfirmed" and in the UC state the reservation will not be honored at the property (it might not even get transmitted via Sabre, but I'm not sure about that).
Thomas' answer about the accepted forms of payment seems correct to me. Unfortunate that Sabre doesn't return a more clear error response but that's not a surprise.

Sabre OTA_HotelResRS GUARANTEE NOT ACCEPTED

It says guarantee not accepted but I am passing a credit card and guarantee type that was specified in the HotelPropertyDescriptionRS. This failure is occurring across multiple hotels at the moment. Due to the sheer size and number of requests needed to work with Sabre, I posted the full RQ/RS trail from session creation to error on pastebin here: https://pastebin.com/NgH1LmYY
The pertinent pieces are here:
RoomRate from HotelPropertyDescriptionLLSRQ
<RoomRate DirectConnect="false" GuaranteeSurchargeRequired="G" GuaranteedRateProgram="false" HRD_RequiredForSell="false" IATA_CharacteristicIdentification="D1KZZ1" IATA_ProductIdentification="20PCT OFF SAVINGS-PACIFIC" LowInventoryThreshold="false" RPH="028" RateChangeInd="false" RateConversionInd="false" SpecialOffer="false">
<AdditionalInfo>
<CancelPolicy Numeric="03" Option="D" />
<Commission NonCommission="true">**NON-COMMISSIONABLE PRODUCT**</Commission>
<Text>DELUXE KING 350 SQ FT I KING PILLOW TOP BED</Text>
<Text>INTERNET ACCESS 42 INCH LCD TV CABLE CHANNELS</Text>
</AdditionalInfo>
<Rates>
<Rate Amount="239.20" ChangeIndicator="false" CurrencyCode="CAD" HRD_RequiredForSell="false" PackageIndicator="false" RateConversionInd="false" ReturnOfRateInd="false" RoomOnRequest="false">
<AdditionalGuestAmounts>
<AdditionalGuestAmount MaxExtraPersonsAllowed="0" NumAdults="0" NumCribs="0">
<Charges AdultRollAway="0" Crib="0" ExtraPerson="30.00" />
</AdditionalGuestAmount>
</AdditionalGuestAmounts>
<HotelTotalPricing Amount="281.06">
<Disclaimer>INCLUDES TAXES AND SURCHARGES</Disclaimer>
<TotalSurcharges Amount="0.00" />
<TotalTaxes Amount="41.86" />
</HotelTotalPricing>
</Rate>
</Rates>
</RoomRate>
Guarantee's from HotelPropertyDescriptionLLSRQ
<Guarantee>
<DepositsAccepted>
<PaymentCard Code="AX" Type="AMERICAN EXPRESS" />
<PaymentCard Code="CA" Type="MASTERCARD" />
<PaymentCard Code="DC" Type="DINERS CLUB CARD" />
<PaymentCard Code="JC" Type="JCB CREDIT CARD" />
<PaymentCard Code="VI" Type="VISA" />
</DepositsAccepted>
<GuaranteesAccepted>
<PaymentCard Code="AX" Type="AMERICAN EXPRESS" />
<PaymentCard Code="CA" Type="MASTERCARD" />
<PaymentCard Code="DC" Type="DINERS CLUB CARD" />
<PaymentCard Code="JC" Type="JCB CREDIT CARD" />
<PaymentCard Code="VI" Type="VISA" />
<Text>/GAGT GUARANTEE TO AGENCY TIDS/IATA NUMBER</Text>
<Text>/GDPST DEPOSIT WILL BE SENT</Text>
<Text>/GDPST... IMMEDIATE DEPOSIT TYPE OR FORM</Text>
</GuaranteesAccepted>
</Guarantee>
OTA_HotelResRQ:
<OTA_HotelResRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" ReturnHostCommand="true" TimeStamp="2015-05-12T02:00:26-06:00" Version="2.1.0">
<Hotel>
<BasicPropertyInfo InsertAfter="0" RPH="028" />
<Guarantee Type="GDPST">
<CC_Info>
<PaymentCard Code="VI" ExpireDate="REDACTED" Number="****REDACTED" />
<PersonName>
<Surname>REDACTED</Surname>
</PersonName>
</CC_Info>
</Guarantee>
<RoomType NumberOfUnits="1" />
</Hotel>
</OTA_HotelResRQ>
OTA_HotelREsRS:
<OTA_HotelResRS xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:stl="http://services.sabre.com/STL/v01" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.1.0">
<ApplicationResults status="Complete">
<Success timeStamp="2018-01-18T19:26:55-06:00">
<SystemSpecificResults>
<HostCommand LNIATA="222222">/0/0H1½Ú028/GDPSTVI****REDACTEDEXP REDACTED-REDACTED</HostCommand>
</SystemSpecificResults>
</Success>
</ApplicationResults>
<Hotel NumberInParty="2" NumberOfUnits="1" SegmentNumber="1" Status="UC">
<BasicPropertyInfo ChainCode="PF" HotelCityCode="YVR" HotelCode="9976" HotelName="PAN PACIFIC VANCOUV" />
<Guarantee>DPSTVIXXXXXXXXXXXXREDACTEDEXP REDACTED-REDACTED</Guarantee>
<POS>
<Source>
<RequestorID>46796444</RequestorID>
</Source>
</POS>
<RoomRates>
<RoomRate>
<AdditionalInfo>
<CancelPolicy Option="C03D" />
</AdditionalInfo>
<Rates>
<Rate Amount="239.20" CurrencyCode="CAD" DCS_AuxRateCode="D1KZZ1">
<HotelTotalPricing Amount="281.06">
<Disclaimer>INCLUDES TAXES AND SURCHARGES</Disclaimer>
<TotalSurcharges Amount="0.00" />
<TotalTaxes Amount="41.86" />
</HotelTotalPricing>
</Rate>
</Rates>
</RoomRate>
</RoomRates>
<Text>GUARANTEE NOT ACCEPTED</Text>
<TimeSpan Duration="1" End="03-03" Start="03-02" />
</Hotel>
</OTA_HotelResRS>
Obviously IPCC and customer data have been redacted from the outputs below. The hotel says it accepts GDPST and VISA, yet it fails... Why?
That particular rate is showing that needs to be sold with G guarantee type.
GuaranteeSurchargeRequired="G"
Do you get a successful response after changing GDPST to G?

OTA_HotelResRQ direct sell fails with FORMAT ERROR ON OPTIONAL FIELD

I'm making the following sequence of calls to reserve a hotel room using the direct sell request:
HotelPropertyDescriptionRQ
PassengerDetailsRQ
OTA_HotelResRQ
The final response errors with:
FORMAT ERROR ON OPTIONAL FIELD
I'm unable to work out what is causing this error - is it perhaps the RPH of the room is not being correctly added to the PassengerDetailsRQ?
The OTA_HotelResRQ is:
<OTA_HotelResRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ReturnHostCommand="true" TimeStamp="2017-02-13T12:45:24" Version="2.2.0">
<Hotel>
<BasicPropertyInfo RPH="001">
<ConfirmationNumber>PWBA-POW-131c-02</ConfirmationNumber>
</BasicPropertyInfo>
<Guarantee Type="G">
<CC_Info>
<PaymentCard Code="VI" ExpireDate="2018-10" Number="4111111111111111"/>
<PersonName>
<Surname>TEST</Surname>
</PersonName>
</CC_Info>
</Guarantee>
<RoomType NumberOfUnits="1"/>
</Hotel>
The HotelPropertyDescriptionRQ:
<HotelPropertyDescriptionRQ Version="2.3.0" xmlns="http://webservices.sabre.com/sabreXML/2011/10">
<AvailRequestSegment>
<GuestCounts Count="1" />
<HotelSearchCriteria>
<Criterion>
<HotelRef HotelCode="0007855" />
</Criterion>
</HotelSearchCriteria>
<TimeSpan End="2016-12-17" Start="2016-12-10"/>
</AvailRequestSegment>
</HotelPropertyDescriptionRQ>
The PassengerDetailsRQ:
<PassengerDetailsRQ xmlns="http://services.sabre.com/sp/pd/v3_3" version="3.3.0" IgnoreOnError="false" HaltOnError="true">
<PostProcessing IgnoreAfter="false" RedisplayReservation="true" UnmaskCreditCard="true">
<EndTransactionRQ>
<EndTransaction Ind="true"></EndTransaction>
<Source ReceivedFrom="PW TESTING"/>
</EndTransactionRQ>
</PostProcessing>
<PreProcessing IgnoreBefore="false">
<UniqueID ID=""/>
</PreProcessing>
<SpecialReqDetails>
<AddRemarkRQ>
<RemarkInfo>
<FOP_Remark>
<CC_Info Suppress="true">
<PaymentCard Code="VI" ExpireDate="2017-12" Number="4444333322221111" SuppressApprovalCode="true"/>
</CC_Info>
</FOP_Remark>
</RemarkInfo>
</AddRemarkRQ>
</SpecialReqDetails>
<TravelItineraryAddInfoRQ>
<AgencyInfo>
<Address>
<AddressLine>XXXXXXXXXXX Ltd</AddressLine>
<CityName>London</CityName>
<CountryCode>GB</CountryCode>
<PostalCode>XXXX XXX</PostalCode>
<StateCountyProv StateCode="LN" />
<StreetNmbr>2 Some Rome</StreetNmbr>
</Address>
</AgencyInfo>
<CustomerInfo>
<ContactNumbers>
<ContactNumber NameNumber="1.1" Phone="817-555-1212" PhoneUseType="H" />
</ContactNumbers>
<PersonName Infant="false" NameNumber="1.1">
<GivenName>Iain</GivenName>
<Surname>TESTING</Surname>
</PersonName>
</CustomerInfo>
</TravelItineraryAddInfoRQ>
</PassengerDetailsRQ>
I believe it is because you are adding a confirmation number to the sell request, which is an optional field when selling passive segments, but it should not be expected when actually requesting the room to the hotel.
<ConfirmationNumber>PWBA-POW-131c-02</ConfirmationNumber>
I would try removing that.
To reserve a hotel room using the direct sell request from sabre used OTA_HotelResRQ request.
Here is one example for request (i already used this request and get response from sabre)
<?xml version="1.0"?>
-<OTA_HotelResRQ Version="2.2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-<Hotel xmlns="http://webservices.sabre.com/sabreXML/2011/10">
<BasicPropertyInfo RPH="001"/>
<Customer NameNumber="01.01"/>
-<Guarantee Type="G">
-<CC_Info>
<PaymentCard Number="3782 8224 6310 005" ExpireDate="2021-09" Code="AX"/>
-<PersonName>
<Surname>tailor</Surname>
</PersonName>
</CC_Info>
</Guarantee>
<RoomType NumberOfUnits="1"/>
</Hotel>
</OTA_HotelResRQ>

KML: Have a polygon with an icon or pushpin?

I need to display areas on the globe using rectangular polygons. However, as some of them are small, and when the globe is zoomed out they are nearly impossible to see. As a potential solution, I was thinking of putting an icon in the center of it as icons always stay the same size when zooming in and out.
I also have information that pops up in a balloon when I click on the polygon which I would want to carry over to clicking the icon too. I have everything working using two separate placemark objects (one is the polygon, the other is a point with the icon), but this requires making two copies of the balloon text. As there will be a large number of regions displayed and a lot of information in the balloons, having that appear twice in the file would make the files too big.
Is there any way to combine these into one object with the icon at the center of the polygon?
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2">
<Document>
<name>Area Box</name>
<open>1</open>
<Placemark>
<name>Area</name>
<Style>
<LineStyle>
<color>fff5f5f5</color>
<width>3</width>
</LineStyle>
<PolyStyle>
<color>aa00ffff</color>
</PolyStyle>
<BalloonStyle>
<text>
<![CDATA[Information Here]]>
</text>
</BalloonStyle>
</Style>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<coordinates>
-105,40,0 -104.8,40,0 -104.8,39.8,0 -105,39.8,0 -105,40,0
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
<Placemark>
<name>Icon</name>
<Style>
<IconStyle>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pal5/icon11.png</href>
</Icon>
</IconStyle>
<BalloonStyle>
<text>
<![CDATA[Information Here]]>
</text>
</BalloonStyle>
</Style>
<Point>
<coordinates>
-104.9,39.9,0
</coordinates>
</Point>
</Placemark>
</Document>
Use a MultiGeometry
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2">
<Document>
<name>Area Box</name>
<open>1</open>
<Placemark>
<name>Area</name>
<Style>
<LineStyle>
<color>fff5f5f5</color>
<width>3</width>
</LineStyle>
<PolyStyle>
<color>aa00ffff</color>
</PolyStyle>
<BalloonStyle>
<text>
<![CDATA[Information Here]]>
</text>
</BalloonStyle>
</Style>
<MultiGeometry>
<Point>
<coordinates>
-104.9,39.9,0
</coordinates>
</Point>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<coordinates>
-105,40,0 -104.8,40,0 -104.8,39.8,0 -105,39.8,0 -105,40,0
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</MultiGeometry>
</Placemark>

RSS Feed Trouble w/ Linq

Trying to read an RSS and select information using Linq but can't seem to get it working.
Here is my code:
XDocument feedXML = XDocument.Load(
"http://eventful.com/atom/performers/bliminal-/P0-001-000192452-0");
var feeds = from feed in feedXML.Descendants("entry")
select new
{
Title = feed.Element("title").Value,
Link = feed.Element("link").Value,
Description = feed.Element("content").Value
};
And here is the format of my RSS:
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US" xmlns:g="http://base.google.com/ns/1.0" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xmlns:media="http://search.yahoo.com/mrss/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<id>http://eventful.com/atom/performers/bliminal-/P0-001-000192452-0</id>
<link href="http://eventful.com/atom/performers/bliminal-/P0-001-000192452-0" type="application/atom+xml" rel="self" />
<link href="http://eventful.com/performers/bliminal-/P0-001-000192452-0" type="text/html" rel="alternate" />
<title>B-Liminal Tour Dates in 2009, B-Liminal Concert Schedule - Eventful</title>
<subtitle>Up-to-date event feeds from eventful.com, the world's leading event website.</subtitle>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
Copyright © 2006
Eventful, Inc. All rights reserved. Use subject to terms of use:
http://eventful.com/terms
</div>
</rights>
<generator version="1.0">EVDB::Atom</generator>
<opensearch:totalResults></opensearch:totalResults>
<opensearch:startIndex>1</opensearch:startIndex>
<updated>2009-09-13T11:48:52+00:00</updated>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:g="http://base.google.com/ns/1.0" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xmlns:media="http://search.yahoo.com/mrss/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<id>http://eventful.com/jupiter/events/bliminal-free-fan-appreciation-show-/E0-001-024704319-1</id>
<published>2009-09-13T15:09:00+00:00</published>
<updated>2009-09-13T15:48:12+00:00</updated>
<link href="http://eventful.com/jupiter/events/bliminal-free-fan-appreciation-show-/E0-001-024704319-1" type="text/html" rel="alternate" />
<gd:eventStatus value="http://schemas.google.com/g/2005#event.confirmed" />
<gd:visibility value="http://schemas.google.com/g/2005#event.public" />
<gd:transparency value="http://schemas.google.com/g/2005#event.transparent" />
<title>B-Liminal FREE fan appreciation show!</title>
<gd:when startTime="2009-09-19T02:00:00+00:00" endTime="2009-09-19T02:00:00+00:00" />
<georss:where>
<gml:Point>
<gml:pos>26.9342076 -80.0922588</gml:pos>
</gml:Point>
</georss:where>
<gd:where rel="http://schemas.google.com/g/2005#event" valueString="Corners near 71 East Indiantown Road , Jupiter, Florida, 33458, United States">
<gd:entryLink>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:g="http://base.google.com/ns/1.0" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xmlns:media="http://search.yahoo.com/mrss/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<id>http://eventful.com/jupiter/venues/corners-/V0-001-001473018-9</id>
<link href="http://eventful.com/jupiter/venues/corners-/V0-001-001473018-9" type="text/html" rel="alternate" />
<title>Corners</title>
<georss:where>
<gml:Point>
<gml:pos>26.9342076 -80.0922588</gml:pos>
</gml:Point>
</georss:where>
<gd:contactSection label="Corners">
<gd:postalAddress>
71 East Indiantown Road
Jupiter, Florida 33458, United States
</gd:postalAddress>
<gd:geoPt lat="26.9342076" lon="-80.0922588" />
</gd:contactSection>
<content type="html">
<div class='vcard'>
<a class='fn org url uid' href='http://eventful.com/venues/V0-001-001473018-9'>Corners</a>
<div class='adr'>
<span class='street-address'>71 East Indiantown Road</span>, <span class='locality'>Jupiter</span>, <span class='region'>Florida</span> <span class='postal-code'>33458</span> <span class='country-name'>United States</span></div>
</div>
</content>
<media:text type="html">
<div class='vcard'>
<a class='fn org url uid' href='http://eventful.com/venues/V0-001-001473018-9'>Corners</a>
<div class='adr'>
<span class='street-address'>71 East Indiantown Road</span>, <span class='locality'>Jupiter</span>, <span class='region'>Florida</span> <span class='postal-code'>33458</span> <span class='country-name'>United States</span></div>
</div>
</media:text>
<category scheme="http://eventful.com/venues/tags/" term="americantowns" label="American Towns" />
<category scheme="http://eventful.com/venues/tags/" term="americantownscom" label="americantowns.com" />
<category scheme="http://eventful.com/venues/tags/" term="artistdatacom" label="artistdata.com" />
<category scheme="http://eventful.com/venues/tags/" term="barnightclub" label="BarNight Club" />
<category scheme="http://eventful.com/venues/tags/" term="community" label="community" />
<category scheme="http://eventful.com/venues/tags/" term="local" label="local" />
<category scheme="http://eventful.com/venues/tags/" term="townsquare" label="town square" />
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/g/2005#contact" />
<author>
<name>evdb</name>
<uri>http://eventful.com/users/evdb</uri>
</author>
</entry>
</gd:entryLink>
</gd:where>
The problem is that the entry elements are in an XML namespace (the xmlns attribute in each entry).
You need to do this:
XNamespace atom = "http://www.w3.org/2005/Atom";
var feeds = from feed in feedXML.Descendants(atom + "entry")
select new {
Title = feed.Element(atom + "title").Value,
Link = feed.Element(atom + "link").Value,
Description = feed.Element(atom + "content").Value
};
This code uses an implicit cast to create an XNamespace object, then uses XNamespace's overloaded + operator to create an XName. For more information, see here.

Resources