openTdataCH / ojp-sdk

Meta OJP SDK repo
MIT License
4 stars 0 forks source link

Order of elements in Service not correct #138

Open ue71603 opened 2 months ago

ue71603 commented 2 months ago

Order of elements wrong in Service[

Request and response: case_ATV-1a_SERPT_Goppenstein Inclu.response.zip](https://github.com/user-attachments/files/17130020/case_ATV-1a_SERPT_Goppenstein.Inclu.response.zip)


                        <Service>
                            <Mode>
                                <PtMode>rail</PtMode>
                                <siri:RailSubmode>regionalRail</siri:RailSubmode>
                                <Name>
                                    <Text xml:lang="de">Zug</Text>
                                </Name>
                                <ShortName>
                                    <Text xml:lang="de">ATZ</Text>
                                </ShortName>
                            </Mode>
                            <ConventionalModeOfOperation>scheduled</ConventionalModeOfOperation>
                            <TrainNumber>27510</TrainNumber>
                            <siri:LineRef>atv:97003:_x0020_</siri:LineRef>
                            <siri:OperatorRef>33</siri:OperatorRef>
                            <PublicCode>Autotunnelzug</PublicCode>
                            <PublishedServiceName>
                                <Text xml:lang="de">3</Text>
                            </PublishedServiceName>
                            <ProductCategory>
                                <Name>
                                    <Text xml:lang="de">Zug</Text>
                                </Name>
                                <ShortName>
                                    <Text xml:lang="de">ATZ</Text>
                                </ShortName>
                                <ProductCategoryRef>22</ProductCategoryRef>
                            </ProductCategory>
                            <siri:DirectionRef>R</siri:DirectionRef>
                            <JourneyRef>ch:1:sjyid:100015:27510-001</JourneyRef>
                            <OperatingDayRef>2024-12-06</OperatingDayRef>
                            <Cancelled>false</Cancelled>
                            <Unplanned>false</Unplanned>
                            <Deviation>false</Deviation>
                            <OriginStopPointRef>8519655</OriginStopPointRef>
                            <DestinationStopPointRef>8511171</DestinationStopPointRef>
                            <OriginText>
                                <Text xml:lang="de">Goppenstein Autoverlad</Text>
                            </OriginText>
                            <DestinationText>
                                <Text xml:lang="de">Kandersteg Autoverlad</Text>
                            </DestinationText>
                        </Service>

Correct order of elements:


                        <Service>
                            <ConventionalModeOfOperation>scheduled</ConventionalModeOfOperation>
                            <OperatingDayRef>2024-12-06</OperatingDayRef>
                            <JourneyRef>ch:1:sjyid:100015:27510-001</JourneyRef>
                            <PublicCode>Autotunnelzug</PublicCode>
                            <siri:LineRef>atv:97003:_x0020_</siri:LineRef>
                            <siri:DirectionRef>R</siri:DirectionRef>
                            <Mode>
                                <PtMode>rail</PtMode>
                                <siri:RailSubmode>regionalRail</siri:RailSubmode>
                                <Name>
                                    <Text xml:lang="de">Zug</Text>
                                </Name>
                                <ShortName>
                                    <Text xml:lang="de">ATZ</Text>
                                </ShortName>
                            </Mode>
                            <ProductCategory>
                                <Name>
                                    <Text xml:lang="de">Zug</Text>
                                </Name>
                                <ShortName>
                                    <Text xml:lang="de">ATZ</Text>
                                </ShortName>
                                <ProductCategoryRef>22</ProductCategoryRef>
                            </ProductCategory>
                            <PublishedServiceName>
                                <Text xml:lang="de">3</Text>
                            </PublishedServiceName>
                            <TrainNumber>27510</TrainNumber>
                            <OriginStopPointRef>8519655</OriginStopPointRef>
                            <OriginText>
                                <Text xml:lang="de">Goppenstein Autoverlad</Text>
                            </OriginText>
                            <siri:OperatorRef>33</siri:OperatorRef>
                            <DestinationStopPointRef>8511171</DestinationStopPointRef>
                            <DestinationText>
                                <Text xml:lang="de">Kandersteg Autoverlad</Text>
                            </DestinationText>
                            <Unplanned>false</Unplanned>
                            <Cancelled>false</Cancelled>
                            <Deviation>false</Deviation>
                        </Service>
ue71603 commented 2 months ago

Problem occurs also in SER. E.g. for


<?xml version="1.0" encoding="UTF-8"?>
<OJP xmlns="http://www.vdv.de/ojp" xmlns:siri="http://www.siri.org.uk/siri" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vdv.de/ojp OJP_changes_for_v1.1/OJP.xsd">
    <OJPRequest>
        <siri:ServiceRequest>
            <siri:RequestTimestamp>2024-09-25T12:00:00</siri:RequestTimestamp>
            <siri:RequestorRef>MENTZRegTest</siri:RequestorRef>
            <OJPStopEventRequest>
                <siri:RequestTimestamp>2024-09-25T12:00:00</siri:RequestTimestamp>
                <siri:MessageIdentifier>SER ohne DepArrTime</siri:MessageIdentifier>
                <Location>
                    <PlaceRef>
                        <siri:StopPointRef>8580939</siri:StopPointRef>
                        <Name>
                            <Text>Bern Europaplatz</Text>
                        </Name>
                    </PlaceRef>
                </Location>
                <Params>
                    <NumberOfResults>20</NumberOfResults>
                    <StopEventType>departure</StopEventType>
                    <IncludePreviousCalls>false</IncludePreviousCalls>
                    <IncludeOnwardCalls>false</IncludeOnwardCalls>
                    <IncludeOperatingDays>false</IncludeOperatingDays>
                    <UseRealtimeData>full</UseRealtimeData>
                </Params>
            </OJPStopEventRequest>
        </siri:ServiceRequest>
    </OJPRequest>
</OJP>