如何使用PHP使用OTA服务?

时间:2015-11-18 22:44:01

标签: php web-services soap wsdl ota

我必须使用SOAP服务。它是Open Travel服务,但不会返回所需的所有数据。

这是WSDL:http://passqlub.com/rent_car/wp-webservices/ARCWS/OTA30-Vendor.wsdl

我试过了,但它没有返回我需要的所有数据。

$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;

我使用了这种方法:

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

        var_dump($vehLocation);

结果是:

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)
  }
}

回复并未提供所需的所有信息。

0 个答案:

没有答案