Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/268.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用PHP使用OTA服务?_Php_Web Services_Soap_Wsdl_Ota - Fatal编程技术网

如何使用PHP使用OTA服务?

如何使用PHP使用OTA服务?,php,web-services,soap,wsdl,ota,Php,Web Services,Soap,Wsdl,Ota,我必须使用SOAP服务。它是开放的旅游服务,但不返回所需的所有数据 这是WSDL: 我尝试了这个,但它没有返回我需要的所有数据 $OTA_VehLocSearchRQ = '<OTA_VehLocSearchRQ TimeStamp="' . $this->date . '" Target="2" TargetName="3" Version="3" TransactionIdentifier="5" Seque

我必须使用SOAP服务。它是开放的旅游服务,但不返回所需的所有数据

这是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;
结果是:

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

响应没有提供所需的所有信息。

您认为服务不会返回哪些数据?你为什么期望服务会退回它?也许数据不可用?数据可用。当您运行_getLastResponse方法时,这会显示它们是否都是数据。您好,请您分享如何使用OTA请求-响应使用PHP获取数据,我有端点URL和每个请求的格式,如何使用SAOP服务请求调用并获取响应?
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)
  }
}