我正在尝试使用PHP调用SOAP API请求?

时间:2018-02-02 05:38:10

标签: php xml api soap

我正在尝试拨打肥皂api

我有以下请求xml和wsdl地址。

如何从API获得响应?

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="http://schemas.tourico.com/webservices/authentication" xmlns:act="http://tourico.com/webservices/activity" xmlns:act1="http://schemas.tourico.com/webservices/activity">
   <soapenv:Header>
      <aut:AuthenticationHeader>
         <aut:LoginName>John</aut:LoginName>
         <aut:Password>Johnpass</aut:Password>
         <aut:Culture>en_US</aut:Culture>
         <aut:Version>8</aut:Version>
      </aut:AuthenticationHeader>
   </soapenv:Header>
   <soapenv:Body>
      <act:SearchActivityByAirPortCode>
         <act:SearchRequest destination="MCO" cityName="Orlando">
            <act1:FromDate>2017-03-23</act1:FromDate>
            <act1:ToDate>2017-03-25</act1:ToDate>
            <act1:Filters>
               <act1:MinAdults>
                  <act1:Value>0</act1:Value>
               </act1:MinAdults>
               <act1:MinChildren>
                  <act1:Value>0</act1:Value>
               </act1:MinChildren>
               <act1:MinUnits>
                  <act1:Value>0</act1:Value>
               </act1:MinUnits>
               <act1:CategoryName>
                  <act1:Value>Theme Parks</act1:Value>
               </act1:CategoryName>
               <act1:CategoryId>
                  <act1:Value>592</act1:Value>
               </act1:CategoryId>
               <act1:ActivityName>
                  <act1:Value>SeaWorld Orlando</act1:Value>
               </act1:ActivityName>
            </act1:Filters>
         </act:SearchRequest>
      </act:SearchActivityByAirPortCode>
   </soapenv:Body>
</soapenv:Envelope>

0 个答案:

没有答案