0

I have to consume a SOAP service. It is Open Travel services but does not return all the data needed.

This is the WSDL: http://passqlub.com/rent_car/wp-webservices/ARCWS/OTA30-Vendor.wsdl

I tried this but it did not return all the data I need.

$OTA_VehLocSearchRQ = '<OTA_VehLocSearchRQ TimeStamp="' . $this->date . '" Target="2" TargetName="3"
                  Version="3" TransactionIdentifier="5"
                  SequenceNmbr="6">
                    <POS>
                    <Source>
                        <RequestorID Type="4" ID="XMLRTA">
                            <CompanyName Code="' . $codgoCompania . '" CompanyShortName="' . $companyShortName . '"/>
                        </RequestorID>
                    </Source>
                    <Source>
                        <RequestorID Type="4" ID="00000000" ID_Context="IATA"/>
                    </Source>
                    </POS>
                    <VehLocSearchCriterion>
                    <RefPoint CountryCode="' . $codigoPais . '">' . $codigoCiudad . '</RefPoint>
                    </VehLocSearchCriterion>
                    <Vendor Code="' . $vendor . '"/>
                </OTA_VehLocSearchRQ>';

            $args = new SoapVar( $OTA_VehLocSearchRQ, XSD_ANYXML );
            $results = $this->soap_client->OTA_VehLocSearch( $args );

            // Datos de retorno
            $this->u[] = $results;

I used this method:

$vehLocation = $testing->vehiculosPorLocalizacion($_POST['country'], $_POST['city'], $_POST['company']);

        var_dump($vehLocation);

And the result was:

array(2) {
  [0]=>
  object(stdClass)#4 (7) {
    ["Success"]=>
    object(stdClass)#5 (0) {
    }
    ["VehMatchedLocs"]=>
    object(stdClass)#6 (1) {
      ["VehMatchedLoc"]=>
      array(4) {
        [0]=>
        object(stdClass)#7 (1) {
          ["LocationDetail"]=>
          object(stdClass)#8 (5) {
            ["Address"]=>
            object(stdClass)#9 (3) {
              ["AddressLine"]=>
              string(15) "3900 Nw 25th St"
              ["StateProv"]=>
              string(0) ""
              ["CountryName"]=>
              string(0) ""
            }
            ["Telephone"]=>
            array(3) {
              [0]=>
              object(stdClass)#10 (0) {
              }
              [1]=>
              object(stdClass)#11 (0) {
              }
              [2]=>
              object(stdClass)#12 (0) {
              }
            }
            ["AtAirport"]=>
            bool(true)
            ["Code"]=>
            string(6) "MIAT71"
            ["Name"]=>
            string(15) "Miami Intl Arpt"
          }
        }
        [1]=>
        object(stdClass)#13 (1) {
          ["LocationDetail"]=>
          object(stdClass)#14 (5) {
            ["Address"]=>
            object(stdClass)#15 (3) {
              ["AddressLine"]=>
              string(20) "18080 C0llins Avenue"
              ["StateProv"]=>
              string(0) ""
              ["CountryName"]=>
              string(0) ""
            }
            ["Telephone"]=>
            array(3) {
              [0]=>
              object(stdClass)#16 (0) {
              }
              [1]=>
              object(stdClass)#17 (0) {
              }
              [2]=>
              object(stdClass)#18 (0) {
              }
            }
            ["AtAirport"]=>
            bool(false)
            ["Code"]=>
            string(6) "MIAR71"
            ["Name"]=>
            string(22) "41ar Sunny Isles Alamo"
          }
        }
        [2]=>
        object(stdClass)#19 (1) {
          ["LocationDetail"]=>
          object(stdClass)#20 (5) {
            ["Address"]=>
            object(stdClass)#21 (3) {
              ["AddressLine"]=>
              string(16) "100 Chopin Plaza"
              ["StateProv"]=>
              string(0) ""
              ["CountryName"]=>
              string(0) ""
            }
            ["Telephone"]=>
            object(stdClass)#22 (0) {
            }
            ["AtAirport"]=>
            bool(false)
            ["Code"]=>
            string(6) "MIAC72"
            ["Name"]=>
            string(24) "Dwntown Intercontinental"
          }
        }
        [3]=>
        object(stdClass)#23 (1) {
          ["LocationDetail"]=>
          object(stdClass)#24 (5) {
            ["Address"]=>
            object(stdClass)#25 (3) {
              ["AddressLine"]=>
              array(2) {
                [0]=>
                string(16) "4332 Collins Ave"
                [1]=>
                string(9) "Suite 104"
              }
              ["StateProv"]=>
              string(0) ""
              ["CountryName"]=>
              string(0) ""
            }
            ["Telephone"]=>
            array(5) {
              [0]=>
              object(stdClass)#26 (0) {
              }
              [1]=>
              object(stdClass)#27 (0) {
              }
              [2]=>
              object(stdClass)#28 (0) {
              }
              [3]=>
              object(stdClass)#29 (0) {
              }
              [4]=>
              object(stdClass)#30 (0) {
              }
            }
            ["AtAirport"]=>
            bool(false)
            ["Code"]=>
            string(6) "MIAS71"
            ["Name"]=>
            string(23) "S Mia Beach Collins Ave"
          }
        }
      }
    }
    ["TimeStamp"]=>
    string(19) "2015-11-18T22:28:00"
    ["Target"]=>
    string(1) "2"
    ["Version"]=>
    string(1) "3"
    ["TransactionIdentifier"]=>
    string(1) "5"
    ["SequenceNmbr"]=>
    int(6)
  }
  [1]=>
  object(stdClass)#31 (7) {
    ["Success"]=>
    object(stdClass)#32 (0) {
    }
    ["VehMatchedLocs"]=>
    object(stdClass)#33 (1) {
      ["VehMatchedLoc"]=>
      array(4) {
        [0]=>
        object(stdClass)#34 (1) {
          ["LocationDetail"]=>
          object(stdClass)#35 (5) {
            ["Address"]=>
            object(stdClass)#36 (3) {
              ["AddressLine"]=>
              string(15) "3900 Nw 25th St"
              ["StateProv"]=>
              string(0) ""
              ["CountryName"]=>
              string(0) ""
            }
            ["Telephone"]=>
            array(3) {
              [0]=>
              object(stdClass)#37 (0) {
              }
              [1]=>
              object(stdClass)#38 (0) {
              }
              [2]=>
              object(stdClass)#39 (0) {
              }
            }
            ["AtAirport"]=>
            bool(true)
            ["Code"]=>
            string(6) "MIAT71"
            ["Name"]=>
            string(15) "Miami Intl Arpt"
          }
        }
      }
    }
    ["TimeStamp"]=>
    string(19) "2015-11-18T22:28:00"
    ["Target"]=>
    string(1) "2"
    ["Version"]=>
    string(1) "3"
    ["TransactionIdentifier"]=>
    string(1) "5"
    ["SequenceNmbr"]=>
    int(6)
  }
}

The response does not give all the information needed.

Marcos Dimitrio
  • 6,651
  • 5
  • 38
  • 62
ihojose
  • 312
  • 2
  • 12
  • What data do you expect that the service is not returning? Why are you expecting the service to return it? Perhaps the data is not available? – vesan Nov 19 '15 at 00:03
  • The data are available. When you run the __getLastResponse() method, this shows that if they are all data. – ihojose Nov 19 '15 at 15:40
  • Hi, Could you please share how can I get data using OTA request response using PHP , I have endpoint urls and the format for each request , How do I use SAOP service to request call and get response ? – magento2new Feb 19 '18 at 06:54

0 Answers0