これは、このフォーラムへの私の最初の投稿です。
PNR (フライト) 予約のリストを表す xml があります。この中には、個々の pnrs のリストがあります。1 つの pnr に対して無効なフィールドが 1 つある場合、xml スキーマを再度検証しているときにソープ エラーが発生し、最初のエラー ポイントで検証が停止したように見えます。
基本的に、フライトに 100 個の pnr がある場合、1 つの pnr に無効なフィールドがある場合、その 1 つの無効な pnr のために応答全体が失われます。エラーが発生した場合は pnr を拒否し、残りの有効な pnr とともに応答を送信する必要があります。
構成またはプログラムによるSpring xsd検証でこれを達成するにはどうすればよいですか。
<complexType name="DutBookings">
<sequence>
<element name="RecCount" type="long" minOccurs="1" maxOccurs="1"/>
<element name="DutBooking" type="tns:DutBooking" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<!-- -->
<complexType name="DutBooking">
<annotation>
<documentation>
This holds the booking record.
The frequent flyer details and airline customer value held at this level represents
the highest tier / value for all passengers associated with the booking.
</documentation>
</annotation>
<sequence>
<element name="BookingReference" type="tns:FlightBookingReference" minOccurs="0"/>
<element name="BookingDate" type="dateTime" minOccurs="0"/>
<element name="BookingStatus" type="tns:BookingStatus" minOccurs="0"/>
<element name="BookingType" type="tns:BookingType" minOccurs="0"/>
<element name="CreatingBookingOffice" type="tns:OfficeID" minOccurs="0"/>
<element name="POSCity" type="tns:CityCode" minOccurs="0"/>
<element name="POSCountry" type="tns:ISO_CountryCode" minOccurs="0"/>
<element name="NameCount" type="tns:Count" minOccurs="0">
<annotation>
<documentation>Number of real names on booking, includes infants</documentation>
</annotation>
</element>
<element name="ReservationCount" type="tns:Count" minOccurs="0">
<annotation>
<documentation>Count of passengers on booking, excludes infants</documentation>
</annotation>
</element>
<element name="MaxAirlineCustomerValue" type="int" minOccurs="0"/>
<element name="CabinCode" type="tns:CabinCode" minOccurs="0"/>
<element name="BookingClass" type="tns:SellingClass" minOccurs="0"/>
<element name="SplitCount" type="tns:Count" minOccurs="0">
<annotation>
<documentation>Number of names split from the booking</documentation>
</annotation>
</element>
<element name="SplitParentBookingReference" type="tns:FlightBookingReference" minOccurs="0"/>
<element name="StaffNumber" type="tns:StaffNumber" minOccurs="0"/>
<element name="StaffJoiningDate" type="date" minOccurs="0"/>
<element name="StaffTravelPriorityCode" type="tns:StaffTravelPriorityCode" minOccurs="0"/>
<element name="BookingPassenger" type="tns:BookingPassenger" minOccurs="0" maxOccurs="unbounded"/>
<element name="SuitabilityKeyword" type="tns:SuitabilityKeyword" minOccurs="0" maxOccurs="unbounded"/>
<element name="DutServiceLine" type="tns:DutServiceLine" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
したがって、dutbookings 要素があり、その中に dutbooking のリストがあることがわかります。1 つの予約で検証エラーが発生した場合は、残りの予約を続行したいと考えています。
前もって感謝します。