ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Site Minder Connection, Please help...

September 10, 2013 6:27am

Subscribe [2]
  • #1 / Sep 10, 2013 6:27am

    hermes_noob

    2 posts

    Hi Fellows, I am new to SOAP or any webservices technology, but i have a problem to connect an online travel agent (OTA) website to Channel Manager called Siteminder, and here is their docs

    https://siteminder.atlassian.net/wiki/display/SITECONNECT/Retrieve+Rooms

    But unfortunately i don’t even understand what is this, how can i create a SOAP server in CI which able to produce particulaer xml like this ( precisely as written in this docs ):

    <OTA HotelAvailRQ  Versi TimeStamp="2005-08-01T09:30:47+02:00" EchoToken="fb57388d" AvailRates>
      <AvailRequestSegments>
        <AvailRequestSegment AvailReqType="Room">
          <HotelSearchCriteria>
            <Criterion>
              <HotelRef HotelCode="HOTEL1">
            </Criterion>
          </HotelSearchCriteria>
        </AvailRequestSegment>
      </AvailRequestSegments>
    </OTA_HotelAvailRQ>

    and this xml as the response of previous xml (if it submitted)

    <OTA HotelAvailRS  Versi TimeStamp="2005-08-01T09:30:47+02:00" EchoToken="abc123">
      <Success>
      <RoomStays>
        <RoomStay>
          <RoomTypes>
            <RoomType RoomTypeCode="SGL">
              <RoomDescription Name="Single Room">
            </RoomType>
          </RoomTypes>
        </RoomStay>
        <RoomStay>
          <RoomTypes>
            <RoomType RoomTypeCode="DBX">
              <RoomDescription Name="Deluxe Double Room">
            </RoomType>
          </RoomTypes>
        </RoomStay>
        <RoomStay>
          <RoomTypes>
            <RoomType RoomTypeCode="DBL">
              <RoomDescription Name="Standard Double Room">
            </RoomType>
          </RoomTypes>
        </RoomStay>
      </RoomStays>
    </OTA_HotelAvailRS>

    please kindly help me.., and many thanks in advance…

  • #2 / Sep 12, 2013 1:51am

    hermes_noob

    2 posts

    the problem is partially solved now. i think nuSOAP is very helpful, i write PHP code shown below, and the ‘SOAP request’ problem is partially solved.

    <?php
    require_once('lib/nusoap.php'); 
     
    $server = new nusoap_server;
     
    $server->configureWSDL('server','http://localhost/myweb');
     
    $server->wsdl->schemaTargetNamespace = 'http://localhost/myweb';
    
    $server->wsdl->addComplexType(
        'AvailRequestSegments',
        'complexType',
        'struct',
        'all',
        '',
        array(
            'AvailRequestSegment' => array('name' => 'AvailRequestSegment', 'type' => 'tns:AvailRequestSegment')
               )
    );
    
    $server->wsdl->addComplexType(
        'AvailRequestSegment',
        'complexType',
        'struct',
        'all',
        '',
        array(
            'AvailReqType'=>array('name'=>'AvailReqType','type'=>'xsd:string','value'=>'Room'),
            'HotelSearchCriteria' => array('name' => 'HotelSearchCriteria', 'type' => 'tns:HotelSearchCriteria')
               )
    );
    
    $server->wsdl->addComplexType(
        'HotelSearchCriteria',
        'complexType',
        'struct',
        'all',
        '',
        array(
            'Criterion' => array('name' => 'Criterion', 'type' => 'tns:Criterion')
               )
    );
    
    $server->wsdl->addComplexType(
        'Criterion',
        'complexType',
        'struct',
        'all',
        '',
        array(
            'HotelRef' => array('name' => 'HotelRef', 'type' => 'tns:HotelRef')
               )
    );
    
    $server->wsdl->addComplexType(
        'HotelRef',
        'complexType',
        'struct',
        'all',
        '',
        array(
            'HotelCode' => array('name' => 'HotelCode', 'type' => 'xsd:string')
               )
    );
    
    /*---------------------------segment response---------------------------------------------*/
    
    $server->wsdl->addComplexType(
        'RoomStays',
        'complexType',
        'struct',
        'all',
        '',
        array(
            'RoomStay' => array('name' => 'RoomStay', 'type' => 'tns:RoomStay')
               )
    );
    
    $server->wsdl->addComplexType(
        'RoomStay',
        'complexType',
        'struct',
        'all',
        '',
        array(
            'RoomTypes' => array('name' => 'RoomTypes', 'type' => 'tns:RoomTypes')
               )
    );
    
    $server->wsdl->addComplexType(
        'RoomTypes',
        'complexType',
        'struct',
        'all',
        '',
        array(
            'RoomType' => array('name' => 'RoomType', 'type' => 'tns:RoomType')
               )
    );
    
    $server->wsdl->addComplexType(
        'RoomType',
        'complexType',
        'struct',
        'all',
        '',
        array(
            'RoomTypeCode'=>array('name'=>'RoomTypeCode','type'=>'xsd:string'),
            'RoomDescription' => array('name' => 'RoomDescription', 'type' => 'tns:RoomDescription')
               )
    );
    
    $server->wsdl->addComplexType(
        'RoomDescription',
        'complexType',
        'struct',
        'all',
        '',
        array(
            'Name' => array('name' => 'Name', 'type' => 'xsd:string')
               )
    );
    
    $server->register('OTA_HotelAvailRQ',
       array('AvailRequestSegments'=>'tns:AvailRequestSegments'),
       array('RoomStays'=>'tns:RoomStays'),
       'http://localhost/myweb',
       'http://localhost/myweb#SayHello');
    
    
    function OTA_HotelAvailRQ($param)
    {
               return array(
      'success'=>'success',
      'RoomTypeCode'=>'SGL',
      'Name'=>'single room'
     );    
    }
    
    $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
     
    $server->service($HTTP_RAW_POST_DATA);
    ?>

    and the rest of my problem is, how to insert ‘some data’ into complex types i created, i have try this

    return array(
      'success'=>'success',
      'RoomTypeCode'=>'SGL',
      'Name'=>'single room'
     );

    but it won’t work, and the SOAP response is :

    <SOAP-ENV Envelope SOAP-ENV:encoding xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://localhost/myweb">
       <SOAP-ENV:Body>
          <ns1:OTA_HotelAvailRQResponse xmlns:ns1="http://localhost/myweb">
             <RoomStays xsi:type="tns:RoomStays">
          </ns1:OTA_HotelAvailRQResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    and finally the last thing i have to solve is, i don’t know how to put AvailReqType=“Room” attribute inside the < AvailRequestSegment> as shown below
    <AvailRequestSegment AvailReqType=“Room”></code></pre>

    it’s very appreciate if somebody would like to help me… thanks in advance..

  • #3 / Apr 04, 2014 5:30am

    jakegeorge9001

    1 posts

    CA Siteminder Online Training
    IT SUPPORT, ONLINE TRAINING, SEO SERVICES, CALL US +917386622889

    21st Century SiteMinder Training Synopsis:

    Through a combination of presentations and hands-on lab work, the students will go through a complete SiteMinder implementation project, including installation, configuration, deploying agents, protecting applications, maintaining, and troubleshooting.

    Target Audience for Online CA SiteMinder Courses:

    This course is designed for Deployment Consultants, Architects and Administrators, who
    will be building, deploying and/or maintaining a SiteMinder infrastructure.