我有 3 个 xsd 架构,其中一个 xsd 指的是其他 2 个 xsd。如何将这些 xsd 模式转换为 java 对象。我尝试过使用 JAXB 进行解组,也尝试了很多事情。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.AAA.com/BookingNotification"
targetNamespace="http://www.AAA.com/BookingNotification"
xmlns:dt="http://www.AAA.com/DataTypes"
xmlns:bdt="http://www.AAA.com/BookingDataTypes"
version="1.0.0">
<xs:import namespace="http://www.AAA.com/DataTypes" schemaLocation="DataTypes.xsd" />
<xs:import namespace="http://www.AAA.com/BookingDataTypes" schemaLocation="BookingDataTypes.xsd" />
<xs:element name="bookingNotification">
<xs:complexType>
<xs:annotation>
<xs:documentation>
Notificacion enviada de Booking.
Version: "1.0.0"
</xs:documentation>
</xs:annotation>
<xs:sequence maxOccurs="1" minOccurs="1">
<xs:element name="header" minOccurs="1" maxOccurs="1" nillable="false" type="dt:header" />
<xs:element name="bookingId" type="xs:unsignedLong" nillable="false"/>
<xs:element name="details" minOccurs="0" maxOccurs="1" type="bdt:bookingDetails" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>