HORECACAREER.BE REST AND SOAP API

 

Access All Horeca Jobs and resumes through REST and SOAP methods 

 

REST

 

Methods:

http://horecacareer.be/json/getonlinejob

Return All Online jobs in JSon format

  • return: string JSon
  • access: public

 

Example with php:

<?php

try
{
# Decode JSON String from http://horecacareer/json/getonlinejob  
$url = "http://horecacareer.be/json/getonlinejob" ;

$response = file_get_contents($url);

$res_json = json_decode($response);
# For each Jobs Display the title
foreach($res_json as $job):
echo   $job->title ."<br/>";
endforeach;

}catch(Exception $e)
{
echo 'ERROR index Action : ' . $e -> getMessage() . '<br />' ;
echo   '<pre>' . $e -> getTraceAsString() . '</pre>' ;
}
?>

 

SOAP

 

You can access the WSDL on this link: http://horecacareer.be/soap/index?wsdl

 

Methods:

 

getOnlineResumes($where_clause)

Return All Online Resumes in xml format

  • return: string
  • access: public
@param  string  $where_clause optional. SQL clause ex: "AND CV_ID = 1"

 

You will find an live example on this page: http://horecacareer.be/soap/getOnlineResumes

Example with Adobe Flex:

<?xml version="1.0" encoding="utf-8"?> 

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> 

      <mx:Script> 

            <![CDATA[ 

                  import be.horecacareer.GetOnlineResumesResultEvent; 

                  import be.horecacareer.HorecaCareerWebServiceService; 

                   // Actionscript sample code: 

                  private function getResume():void 

                  { 

                    var myService:HorecaCareerWebServiceService= new HorecaCareerWebServiceService(); 

                   //for the desired operation add a result handler (a function that you have already defined previously) 

                   myService.addgetOnlineResumesEventListener(myResultHandlingFunction); 

                        //Call the operation as a method on the service. Pass the right values as arguments

                        myService.getOnlineResumes(" 1 =1 ");

                  }

                  private function myResultHandlingFunction(event:GetOnlineResumesResultEvent)

                  {

                        var s:String = event.result;

                  }

            ]]>

      </mx:Script>

</mx:Application>

 

 

getOnlineResumesByDateUpdate($from,$to=null)

Return All the Resumes Online between 2 dates in xml format

  • return: string
  • access: public
@param  string  $from  Date From. Format: "Y-m-d"
@param  string  $to Date To. Format: "Y-m-d". If null return all resume from the date request til today

 

You will find an live example on this page: http://horecacareer.be/soap/getOnlineResumesByDateUpdate


Example using php Zend Framwork (MVC):

<?php  

class SoapClientController extends Zend_Controller_Action 

{        

   public function clientAction() 

   { 

      try  

      {        

        $this->_helper->layout()->disableLayout();

        $client = new Zend_Soap_Client("http://horecacareer.be/soap?wsdl");

        $result = $client->getOnlineResumesByDateUpdate("2010-01-01");

        $this->view->result = $result;

 

      } catch(Exception $e)

      {

          echo $e->getMessage();

      }

   }

}

?>

 

 

            $class=($this->current == $page)?"lien_numero_page_actif":"lien_numero_page";?>

            <a class="<?php echo $class ?>" href="<?php echo $this->url(array('page' => $page)); ?><?php echo $query?>"><?php echo $page?></a>

      <?php endforeach;?>

      <!-- Next page link -->

      <?php if (isset($this->next)): ?>

      <a style="text-decoration: none;" href="<?php echo $this->url(array('page' => $this->next)) ?><?php echo $query?>" > <img alt="arrow" style="vertical-align: middle;" border="0" src="<?php echo Configuration_Application::$register->url ?>/<?php echo Configuration_Application::$register->image ?>/icones/fleche_droite.png" /> </a>

      <?php endif; ?>

      <!-- Last page link -->

      <?php if (isset($this->next)): ?>

            <a style="text-decoration: none;" href="<?php echo $this->url(array('page' => $this->last)) ?><?php echo $query?>" > <img alt="arrow" style="vertical-align: middle;" border="0" src="<?php echo Configuration_Application::$register->url ?>/<?php echo Configuration_Application::$register->image ?>/icones/fleche_droite_double.png" /> </a>

      <?php endif; ?>

      </fieldset>

           

<?php endif; ?>