XSD文件: xsd2php显示如下错误- PHP致命错误:未捕获错误:未在/var/www/html/xsd2php- 'Symfony\Component\DependencyInjection\ContainerBuilder‘/bin/xsd2php中找到类主机:19
<xs:schema xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.opentravel.org/OTA/2003/05" elementFormDefault="qualified" version="4.001" id="OTA2008B">
<xs:include schemaLocation="OTA_HotelReservation.xsd"/>
<xs:annotation>
<xs:documentation xml:lang="en">All Schema files in the OTA specification are made available according to the terms defined by the OTA License Agreement at http://www.opentravel.org/Specifications/Default.aspx</xs:documentation>
</xs:annotation>
<xs:element name="OTA_HotelResNotifRQ">
<xs:annotation>
<xs:documentation xml:lang="en">Hotel Reservation Notif Request supports the functionality of updating other systems with reservation data. The message assumes a push model, with the originating system pushing the data to another system. The originating system would usually be a booking source, such as a Global Distribution System (GDS), a Central Reservation System (CRS) or some other agent of the hotel.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="POS" type="POS_Type" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">The point-of-sale data, contained in the element, communicates the information that allows the receiving system to identify the trading partner that is sending the request or the response message. </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MessageID" type="UniqueID_Type" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">This represents a batch ID.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HotelReservations" type="HotelReservationsType" minOccurs="0"/>
</xs:sequence>
<xs:attributeGroup ref="OTA_PayloadStdAttributes"/>
<xs:attribute name="ResStatus" type="TransactionActionType" use="optional"/>
<xs:attribute name="HoldDuration" type="xs:duration" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">The time until a hold is released.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
发布于 2020-12-25 17:37:06
我只是在文件的开头添加了这一行
The result in the file
```javascript
/**
由XSD2PHPPHP版本5.3@category Util@package XSD2PHP@作者Ariel Garciaags@leirags.com@license GNU GPL - http://www.gnu.org/licenses/gpl.txt@link https://github.com/davidgillen/XSD2PHP生成
*/
/**
表示许可的类XSD2PHP@包XSD2PHP@作者Ariel Garciaags@leirags.com@license GNU GPL -http://www.gnu.org/licenses/gpl.txt@ OTA_HotelResNotifRQ@category https://github.com/davidgillen/XSD2PHP
*/
OTA_HotelResNotifRQ类
{
公共$POS;
公共$MessageID;
公共$HotelReservations;
/**
* OTA_HotelResNotifRQ constructor
*
* @param POS_Type $POS {0, 1} Optional The point-of-sale data, contained in the element, communicates the information that allows the receiving system to identify the trading partner that is sending the request or the response message.
* @param UniqueID_Type $MessageID {0, 1} Optional This represents a batch ID.
* @param HotelReservationsType $HotelReservations {0, 1} Optional
*/
public function __construct($POS = null, $MessageID = null, $HotelReservations = null)
{
if ( $POS == null ) {
// Do nothing, $minOccurs is 0
} else {
if ( get_class($POS) != 'POS_Type' ) {
throw new Exception('$POS must be of type POS_Type.');
}
$this->POS = $POS;
}
if ( $MessageID == null ) {
// Do nothing, $minOccurs is 0
} else {
if ( get_class($MessageID) != 'UniqueID_Type' ) {
throw new Exception('$MessageID must be of type UniqueID_Type.');
}
$this->MessageID = $MessageID;
}
if ( $HotelReservations == null ) {
// Do nothing, $minOccurs is 0
} else {
if ( get_class($HotelReservations) != 'HotelReservationsType' ) {
throw new Exception('$HotelReservations must be of type HotelReservationsType.');
}
$this->HotelReservations = $HotelReservations;
}
}
}
我希望对你有用。
https://stackoverflow.com/questions/64085235
复制相似问题