Tuesday, May 27, 2014

(Web Service) Using XML to Output HTML into my website

Hello. I hope I can explain myself clearly so that I will get help here.

I've been given a web service access to show content to my website (The web service is in a another domain). The information is about Hotels (Hotels names, Hotel Images, Hotel Category, Hotels Locations, Hotels descriptions).

The file is like the following:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:bud="http://www.softur.com.ar/wsbridge/budget.wsdl" xmlns:bud1="http://www.softur.com.ar/wsbridge/budget.xsd">
   <soap:Header/>
   <soap:Body>
      <bud:searchHotelFaresRQ1>
         <!--Optional:-->
<cityLocation code="PMV" />
  <dateFrom>2014-05-30</dateFrom>
  <dateTo>2014-05-31</dateTo>
  <name></name>
  <pos>
    <id>FakeID</id>
    <password>FakePassWord</password>
  </pos>
  <currency>USD</currency>
  <OtherBroker>true</OtherBroker>
  <FareTypeSelectionList xmlns="http://www.softur.com.ar/wsbridge/budget.xsd">
    <FareTypeSelection OccupancyId="1">1</FareTypeSelection>
    <Ocuppancy OccupancyId="1">
      <Occupants type="ADT" />
      <Occupants type="ADT" />
    </Ocuppancy>
  </FareTypeSelectionList>
      </bud:searchHotelFaresRQ1>
   </soap:Body>
</soap:Envelope>

I am running that request using soapUI 3.5.1, which outputs an XML file with lots of data about Hotels.

<HotelFares UniqueId="HT|00000011080" BackOfficeCode="000814" BackOfficeOperatorCode="00658" xmlns="">
            <HotelAddress xmlns="http://www.softur.com.ar/wsbridge/budget.xsd">Hotel Address</HotelAddress>
            <Name>HOTEL AGUA DORADA</Name>            
            <Category >4 *</Category>            
            <HotelPhone xmlns="http://www.softur.com.ar/wsbridge/budget.xsd">5555555555</HotelPhone>
            <HotelZone xmlns="http://www.softur.com.ar/wsbridge/budget.xsd">Hotel Zone Area</HotelZone>
            <HotelAccess xmlns="http://www.softur.com.ar/wsbridge/budget.xsd">Address Description of the Hotel Here</HotelAccess>
            <HotelPosition xmlns="http://www.softur.com.ar/wsbridge/budget.xsd">
                <Latitude>-63.93631</Latitude>
                <Longitude>11.022754</Longitude>
            </HotelPosition>
</HotelFares>

I want to show that information as an HTML file into my website, but I don't know how to go about this. 

I guess saving these information appropriately into a database, and then spitting that information from the database to my website would be a way.

Any help I can get here using CakePHP so that I would know where to start would really help.

Thanks in advance.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: