Php SOAP WSDL传递参数?

时间:2017-05-12 17:49:41

标签: php web-services soap wsdl

我试图发送这个WSDL文件的参数。

https://integration.gezinomi.com/ErcanOutService.Services.SaleService.svc?wsdl

https://integration.gezinomi.com/ErcanOutService.Services.SaleService.svc?xsd=xsd2

我差不多完成了整合,但 HotelReservation 功能却变空了。

我使用此函数 __ getTypes HotelReservation()结果此参数:

[2] => struct Reservation {
 decimal Commission;
 ArrayOfGuest Guests;
 Invoce Invoce;
 boolean IsEbInsuranceWant;
 string RoomGuid;
 string SaleNote;
 decimal TotalPrice;
 ArrayOfint TransferPrice;
}
    [3] => struct ArrayOfGuest {
 Guest Guest;
}
    [4] => struct Guest {
 dateTime Birthday;
 string Email;
 boolean IsChild;
 boolean IsMen;
 string Mobile;
 string Name;
 string Surname;
 string Title;
}
    [5] => struct Invoce {
 string Address;
 int CityId;
 string CompanyName;
 int CountryId;
 int DistrictId;
 string Email;
 boolean IsForeigner;
 boolean IsInvoiceSend;
 string Name;
 string Phone;
 string PhoneCityCode;
 string PhoneCountryCode;
 string SurName;
 string TaxId;
 string TaxOffice;
 string TcId;
}

我使用标准的php soap类和基本身份验证:

<?php
$result2 = $client2->HotelReservation(
        array('Reservation' =>
            array(
                'Commission' => "",
                'Guests' => array(
                        'Guest' => array(
                        'Birthday' => "",
                        'Email' => "",
                        'IsChild' => "",
                        'IsMen' => "",
                        'Mobile' => "",
                        'Name' => "",
                        'Surname' => "",
                        'Title' => ''
                    )
                 ),
                    'Invoce' => array(
                        'Address' => "",
                        'CityId' => "",
                        'CompanyName' => "",
                        'CountryId' => "",
                        'DistrictId' => "",
                        'Email' => "",
                        'IsForeigner' => 0,
                        'IsInvoiceSend' => 0,
                        'Name' => "",
                        'Phone' => "",
                        'PhoneCityCode' => "",
                        'PhoneCountryCode' => "",
                        'SurName' => "",
                        'TaxId' => "",
                        'TaxOffice' => "",
                        'TcId' => ""
                        ),
                    'IsEbInsuranceWant' => "",
                    'RoomGuid' => "",
                    'TotalPrice' => ""
                )
        ));

如何传递参数不能得到结果。

感谢您的帮助。

0 个答案:

没有答案