Browse Source

Service's split

master
Nikolay Ushmodin 3 years ago
parent
commit
89f9821c94
100 changed files with 6957 additions and 2808 deletions
  1. +0
    -7
      avs5.xsd
  2. +68
    -0
      avs5rs_dispatcher.xsd
  3. +1
    -254
      avs5rs_sale.xsd
  4. +203
    -35
      avs5rs_transit.xsd
  5. +21
    -0
      src/main/java/com/artmark/avs5rs/dispatcher/DispatcherService.java
  6. +160
    -0
      src/main/java/com/artmark/avs5rs/dispatcher/model/AbstractResponse.java
  7. +42
    -0
      src/main/java/com/artmark/avs5rs/dispatcher/model/ErrorCode.java
  8. +72
    -0
      src/main/java/com/artmark/avs5rs/dispatcher/model/ObjectFactory.java
  9. +121
    -0
      src/main/java/com/artmark/avs5rs/dispatcher/model/RouteKey.java
  10. +119
    -0
      src/main/java/com/artmark/avs5rs/dispatcher/model/UpdateTicketRequest.java
  11. +34
    -0
      src/main/java/com/artmark/avs5rs/dispatcher/model/UpdateTicketResponse.java
  12. +68
    -0
      src/main/java/com/artmark/avs5rs/dispatcher/model/avs5rs_dispatcher.xsd
  13. +0
    -44
      src/main/java/com/artmark/avs5rs/model/Agent.java
  14. +0
    -64
      src/main/java/com/artmark/avs5rs/model/BookOrderRequest.java
  15. +0
    -28
      src/main/java/com/artmark/avs5rs/model/BookOrderResponse.java
  16. +0
    -35
      src/main/java/com/artmark/avs5rs/model/CancelTicketRequest.java
  17. +0
    -26
      src/main/java/com/artmark/avs5rs/model/CancelTicketResponse.java
  18. +0
    -35
      src/main/java/com/artmark/avs5rs/model/ConfirmOrderRequest.java
  19. +0
    -37
      src/main/java/com/artmark/avs5rs/model/ConfirmOrderResponse.java
  20. +0
    -28
      src/main/java/com/artmark/avs5rs/model/DateAdapter.java
  21. +0
    -38
      src/main/java/com/artmark/avs5rs/model/DocumentType.java
  22. +0
    -27
      src/main/java/com/artmark/avs5rs/model/EchoRequest.java
  23. +0
    -26
      src/main/java/com/artmark/avs5rs/model/EchoResponse.java
  24. +0
    -10
      src/main/java/com/artmark/avs5rs/model/Gender.java
  25. +0
    -27
      src/main/java/com/artmark/avs5rs/model/GetArrivalStationsRequest.java
  26. +0
    -27
      src/main/java/com/artmark/avs5rs/model/GetArrivalStationsResponse.java
  27. +0
    -15
      src/main/java/com/artmark/avs5rs/model/GetDispatchStationsRequest.java
  28. +0
    -27
      src/main/java/com/artmark/avs5rs/model/GetDispatchStationsResponse.java
  29. +0
    -43
      src/main/java/com/artmark/avs5rs/model/GetDocumentTypesRequest.java
  30. +0
    -28
      src/main/java/com/artmark/avs5rs/model/GetDocumentTypesResponse.java
  31. +0
    -52
      src/main/java/com/artmark/avs5rs/model/GetFreeSeatsRequest.java
  32. +0
    -27
      src/main/java/com/artmark/avs5rs/model/GetFreeSeatsResponse.java
  33. +0
    -24
      src/main/java/com/artmark/avs5rs/model/GetOrderRequest.java
  34. +0
    -37
      src/main/java/com/artmark/avs5rs/model/GetOrderResponse.java
  35. +0
    -42
      src/main/java/com/artmark/avs5rs/model/GetTicketTypesRequest.java
  36. +0
    -28
      src/main/java/com/artmark/avs5rs/model/GetTicketTypesResponse.java
  37. +0
    -28
      src/main/java/com/artmark/avs5rs/model/GetTripStopsRequest.java
  38. +0
    -27
      src/main/java/com/artmark/avs5rs/model/GetTripStopsResponse.java
  39. +0
    -162
      src/main/java/com/artmark/avs5rs/model/Passenger.java
  40. +0
    -82
      src/main/java/com/artmark/avs5rs/model/Response.java
  41. +0
    -35
      src/main/java/com/artmark/avs5rs/model/ReturnTicketRequest.java
  42. +0
    -26
      src/main/java/com/artmark/avs5rs/model/ReturnTicketResponse.java
  43. +0
    -44
      src/main/java/com/artmark/avs5rs/model/Sale.java
  44. +0
    -54
      src/main/java/com/artmark/avs5rs/model/SearchTripsRequest.java
  45. +0
    -30
      src/main/java/com/artmark/avs5rs/model/SearchTripsResponse.java
  46. +0
    -51
      src/main/java/com/artmark/avs5rs/model/Seat.java
  47. +0
    -64
      src/main/java/com/artmark/avs5rs/model/Station.java
  48. +0
    -125
      src/main/java/com/artmark/avs5rs/model/Stop.java
  49. +0
    -413
      src/main/java/com/artmark/avs5rs/model/Ticket.java
  50. +0
    -17
      src/main/java/com/artmark/avs5rs/model/TicketClassCode.java
  51. +0
    -29
      src/main/java/com/artmark/avs5rs/model/TicketStatusCode.java
  52. +0
    -65
      src/main/java/com/artmark/avs5rs/model/TicketType.java
  53. +0
    -26
      src/main/java/com/artmark/avs5rs/model/TimestampAdapter.java
  54. +0
    -267
      src/main/java/com/artmark/avs5rs/model/Trip.java
  55. +0
    -18
      src/main/java/com/artmark/avs5rs/model/TripClassCode.java
  56. +0
    -30
      src/main/java/com/artmark/avs5rs/model/TripStatusCode.java
  57. +0
    -59
      src/main/java/com/artmark/avs5rs/model/TripTypeCode.java
  58. +0
    -44
      src/main/java/com/artmark/avs5rs/model/UpdateTicketRequest.java
  59. +0
    -25
      src/main/java/com/artmark/avs5rs/model/UpdateTicketResponse.java
  60. +16
    -16
      src/main/java/com/artmark/avs5rs/sale/SaleService.java
  61. +172
    -0
      src/main/java/com/artmark/avs5rs/sale/model/AbstractResponse.java
  62. +89
    -0
      src/main/java/com/artmark/avs5rs/sale/model/Agent.java
  63. +183
    -0
      src/main/java/com/artmark/avs5rs/sale/model/BookOrderRequest.java
  64. +151
    -0
      src/main/java/com/artmark/avs5rs/sale/model/BookOrderResponse.java
  65. +99
    -0
      src/main/java/com/artmark/avs5rs/sale/model/CancelTicketRequest.java
  66. +138
    -0
      src/main/java/com/artmark/avs5rs/sale/model/CancelTicketResponse.java
  67. +92
    -0
      src/main/java/com/artmark/avs5rs/sale/model/ConfirmOrderRequest.java
  68. +167
    -0
      src/main/java/com/artmark/avs5rs/sale/model/ConfirmOrderResponse.java
  69. +90
    -0
      src/main/java/com/artmark/avs5rs/sale/model/DocumentType.java
  70. +64
    -0
      src/main/java/com/artmark/avs5rs/sale/model/EchoRequest.java
  71. +131
    -0
      src/main/java/com/artmark/avs5rs/sale/model/EchoResponse.java
  72. +42
    -0
      src/main/java/com/artmark/avs5rs/sale/model/ErrorCode.java
  73. +38
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GenderType.java
  74. +64
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GetArrivalStationsRequest.java
  75. +138
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GetArrivalStationsResponse.java
  76. +32
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GetDispatchStationsRequest.java
  77. +138
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GetDispatchStationsResponse.java
  78. +120
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GetDocumentTypesRequest.java
  79. +138
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GetDocumentTypesResponse.java
  80. +64
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GetOrderRequest.java
  81. +167
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GetOrderResponse.java
  82. +120
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GetTicketTypesRequest.java
  83. +138
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GetTicketTypesResponse.java
  84. +64
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GetTripStopsRequest.java
  85. +138
    -0
      src/main/java/com/artmark/avs5rs/sale/model/GetTripStopsResponse.java
  86. +440
    -0
      src/main/java/com/artmark/avs5rs/sale/model/ObjectFactory.java
  87. +344
    -0
      src/main/java/com/artmark/avs5rs/sale/model/Passenger.java
  88. +99
    -0
      src/main/java/com/artmark/avs5rs/sale/model/ReturnTicketRequest.java
  89. +138
    -0
      src/main/java/com/artmark/avs5rs/sale/model/ReturnTicketResponse.java
  90. +121
    -0
      src/main/java/com/artmark/avs5rs/sale/model/RouteKey.java
  91. +117
    -0
      src/main/java/com/artmark/avs5rs/sale/model/Sale.java
  92. +123
    -0
      src/main/java/com/artmark/avs5rs/sale/model/SearchTripsRequest.java
  93. +138
    -0
      src/main/java/com/artmark/avs5rs/sale/model/SearchTripsResponse.java
  94. +81
    -0
      src/main/java/com/artmark/avs5rs/sale/model/Seat.java
  95. +144
    -0
      src/main/java/com/artmark/avs5rs/sale/model/Station.java
  96. +700
    -0
      src/main/java/com/artmark/avs5rs/sale/model/Ticket.java
  97. +40
    -0
      src/main/java/com/artmark/avs5rs/sale/model/TicketClass.java
  98. +42
    -0
      src/main/java/com/artmark/avs5rs/sale/model/TicketStatus.java
  99. +149
    -0
      src/main/java/com/artmark/avs5rs/sale/model/TicketType.java
  100. +579
    -0
      src/main/java/com/artmark/avs5rs/sale/model/Trip.java

+ 0
- 7
avs5.xsd View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified">
<xs:import schemaLocation="avs5rs_sale.xsd" namespace=""/>
<xs:import schemaLocation="avs5rs_transit.xsd" namespace=""/>
</xs:schema>

+ 68
- 0
avs5rs_dispatcher.xsd View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified">

<xs:simpleType name="IDType">
<xs:restriction base="xs:string">
<xs:maxLength value="36"/>
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>

<xs:complexType name="AbstractResponse">
<xs:sequence>
<xs:element name="Error" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="code" type="xs:string" minOccurs="1"/>
<xs:element name="message" type="xs:string" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>

<xs:simpleType name="UidType">
<xs:restriction base="xs:string">
<xs:length value="36"/>
</xs:restriction>
</xs:simpleType>

<xs:complexType name="RouteKey">
<xs:sequence>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
<xs:element name="dispatchTime" type="xs:time"/>
</xs:sequence>
</xs:complexType>

<xs:simpleType name="ErrorCode">
<xs:restriction base="xs:string">
<xs:enumeration value="INTERNAL"/>
<xs:enumeration value="NOT_FOUND"/>
<xs:enumeration value="SEAT_OCCUPIED"/>
<xs:enumeration value="PERSONAL_DATA_INCORRECT"/>
</xs:restriction>
</xs:simpleType>


<xs:element name="UpdateTicketRequest">
<xs:complexType>
<c:sequence>
<xs:element name="RouteKey" type="RouteKey" minOccurs="1"/>
<xs:element name="ticketId" type="IDType" minOccurs="1"/>
<xs:element name="passengerGone" type="xs:boolean" minOccurs="0"/>
</c:sequence>
</xs:complexType>
</xs:element>

<xs:element name="UpdateTicketResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="AbstractResponse"/>
</xs:complexContent>
</xs:complexType>
</xs:element>

</xs:schema>

+ 1
- 254
avs5rs_sale.xsd View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified">

@@ -364,43 +364,6 @@
</xs:complexType>
</xs:element>

<xs:element name="GetFreeSeatsRequest">
<xs:complexType>
<xs:choice>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="date" type="xs:date"/>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
</xs:sequence>
<xs:sequence>
<xs:element name="tripId" type="IDType" minOccurs="1"/>
<xs:element name="dispatchStationId" type="IDType" minOccurs="1"/>
<xs:element name="arrivalStationId" type="IDType" minOccurs="1"/>
</xs:sequence>
</xs:choice>
</xs:complexType>
</xs:element>

<xs:element name="GetFreeSeatsResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="AbstractResponse">
<xs:sequence>
<xs:element name="Body">
<xs:complexType>
<xs:choice>
<xs:element name="Seat" type="Seat" maxOccurs="unbounded"/>
<xs:element name="TransitSeat" type="TransitSeat" maxOccurs="unbounded"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>

<xs:element name="GetTicketTypesRequest">
<xs:complexType>
<xs:sequence>
@@ -639,220 +602,4 @@
</xs:complexContent>
</xs:complexType>
</xs:element>

<xs:element name="SetStationInfoRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="stationId" type="IDType" minOccurs="1"/>
<xs:element name="uid" type="UidType" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="SetStationInfoResponse">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="AbstractResponse"/>
</xs:complexContent>
</xs:complexType>
</xs:element>

<xs:complexType name="TransitSeat">
<xs:sequence>
<xs:element name="seatId" type="IDType" minOccurs="1"/>
<xs:element name="seatNum" type="xs:int" minOccurs="1"/>
</xs:sequence>
</xs:complexType>


<xs:element name="TransitBookRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
<xs:element name="date" type="xs:date"/>
<xs:element name="seatId" type="IDType" maxOccurs="unbounded" minOccurs="1"/>
<xs:element name="Agent" type="Agent" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="TransitBookResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="AbstractResponse">
<xs:sequence>
<xs:element name="Body">
<xs:complexType>
<xs:sequence>
<xs:element name="TransitTicket" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="ticketId" type="IDType" minOccurs="1"/>
<xs:element name="seatNum" type="xs:int" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>

<xs:simpleType name="RelationType">
<xs:restriction base="xs:string">
<xs:enumeration value="OWN"/>
<xs:enumeration value="AGENT"/>
<xs:enumeration value="ATP"/>
</xs:restriction>
</xs:simpleType>

<xs:element name="TransitConfirmRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Ticket" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="1"/>
<xs:element name="Passenger" type="Passenger" minOccurs="0"/>
<xs:element name="ticketSeries" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="ticketNumber" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="price" type="xs:decimal" minOccurs="1" maxOccurs="1"/>
<xs:element name="relation" type="RelationType" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Agent" type="Agent" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="TransitConfirmResponse">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="AbstractResponse"/>
</xs:complexContent>
</xs:complexType>
</xs:element>

<xs:element name="TransitCancelRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Agent" type="Agent" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="TransitCancelResponse">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="AbstractResponse"/>
</xs:complexContent>
</xs:complexType>
</xs:element>


<xs:complexType name="CarrierType">
<xs:sequence>
<xs:element name="name" type="SimpleStringType" minOccurs="0"/>
<xs:element name="inn" type="InnType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:element name="TransitTripInfoRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="date" type="xs:date"/>
<xs:element name="dispatchStationUid" type="UidType" minOccurs="0"/>
<xs:element name="arrivalStationUid" type="UidType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:complexType name="TransitTicket">
<xs:sequence>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="dispatchStationName" type="SimpleStringType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
<xs:element name="arrivalStationName" type="SimpleStringType"/>
<xs:element name="Passenger" type="Passenger"/>
<xs:element name="ticketId" type="IDType" minOccurs="1"/>
<xs:element name="ticketSeries" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="ticketNumber" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="seatNum" type="xs:int" minOccurs="1"/>
<xs:element name="Agent" type="Agent"/>
<xs:element name="price" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>


<xs:element name="TransitTripInfoResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="AbstractResponse">
<xs:sequence>
<xs:element name="Body">
<xs:complexType>
<xs:sequence>
<xs:element name="Ticket" type="TransitTicket" maxOccurs="unbounded"/>
<xs:element name="maxSeats" type="xs:int"/>
<xs:element name="freeSeats" type="xs:int"/>
<xs:element name="Carrier" type="CarrierType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>

<xs:element name="TransitRouteInfoRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:complexType name="RouteItem">
<xs:sequence>
<xs:element name="order" type="xs:int"/>
<xs:element name="stationName" type="SimpleStringType"/>
<xs:element name="stationUid" type="UidType"/>
<xs:element name="distance" type="xs:integer"/>
<xs:element name="arrivalTime" type="xs:time"/>
<xs:element name="dispatchTime" type="xs:time"/>
</xs:sequence>
</xs:complexType>

<xs:element name="TransitRouteInfoResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="AbstractResponse">
<xs:sequence>
<xs:element name="Body">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="SimpleStringType"/>
<xs:element name="RouteItem" type="RouteItem" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>


</xs:schema>

+ 203
- 35
avs5rs_transit.xsd View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified">

@@ -72,7 +72,28 @@
</xs:sequence>
</xs:complexType>

<xs:complexType name="Seat">
<xs:sequence>
<xs:element name="id" type="IDType" minOccurs="1"/>
<xs:element name="num" type="xs:int" minOccurs="1"/>
</xs:sequence>
</xs:complexType>

<xs:simpleType name="GenderType">
<xs:restriction base="xs:string">
<xs:enumeration value="MALE"/>
<xs:enumeration value="FEMALE"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="ErrorCode">
<xs:restriction base="xs:string">
<xs:enumeration value="INTERNAL"/>
<xs:enumeration value="NOT_FOUND"/>
<xs:enumeration value="SEAT_OCCUPIED"/>
<xs:enumeration value="PERSONAL_DATA_INCORRECT"/>
</xs:restriction>
</xs:simpleType>

<xs:element name="SetStationInfoRequest">
<xs:complexType>
@@ -82,7 +103,7 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SetStationInfoResponse">
<xs:complexType>
<xs:complexContent>
@@ -91,18 +112,28 @@
</xs:complexType>
</xs:element>

<xs:element name="GetFreeSeatsRequest">
<xs:complexType name="TransitSeat">
<xs:sequence>
<xs:element name="seatId" type="IDType" minOccurs="1"/>
<xs:element name="seatNum" type="xs:int" minOccurs="1"/>
</xs:sequence>
</xs:complexType>


<xs:element name="TransitBookRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="date" type="xs:date"/>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
<xs:element name="date" type="xs:date"/>
<xs:element name="seatId" type="IDType" maxOccurs="unbounded" minOccurs="1"/>
<xs:element name="Agent" type="Agent" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="GetFreeSeatsResponse">
<xs:element name="TransitBookResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="AbstractResponse">
@@ -110,7 +141,14 @@
<xs:element name="Body">
<xs:complexType>
<xs:sequence>
<xs:element name="TransitSeat" type="TransitSeat" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="TransitTicket" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="ticketId" type="IDType" minOccurs="1"/>
<xs:element name="seatNum" type="xs:int" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -120,44 +158,121 @@
</xs:complexType>
</xs:element>

<xs:complexType name="TransitSeat">
<xs:sequence>
<xs:element name="seatId" type="IDType" minOccurs="1"/>
<xs:element name="seatNum" type="xs:int" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="RelationType">
<xs:restriction base="xs:string">
<xs:enumeration value="OWN"/>
<xs:enumeration value="AGENT"/>
<xs:enumeration value="ATP"/>
</xs:restriction>
</xs:simpleType>

<xs:element name="TransitConfirmRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Ticket" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="1"/>
<xs:element name="Passenger" type="Passenger" minOccurs="0"/>
<xs:element name="ticketSeries" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="ticketNumber" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="price" type="xs:decimal" minOccurs="1" maxOccurs="1"/>
<xs:element name="relation" type="RelationType" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Agent" type="Agent" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="TransitBookRequest">
<xs:element name="TransitConfirmResponse">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="AbstractResponse"/>
</xs:complexContent>
</xs:complexType>
</xs:element>

<xs:element name="TransitCancelRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
<xs:element name="date" type="xs:date"/>
<xs:element name="seatId" type="IDType" maxOccurs="unbounded" minOccurs="1"/>
<xs:element name="Agent" type="Agent" minOccurs="1"/>
<xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Agent" type="Agent" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:complexType name="TransitTicket">
<xs:element name="TransitCancelResponse">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="AbstractResponse"/>
</xs:complexContent>
</xs:complexType>
</xs:element>


<xs:complexType name="CarrierType">
<xs:sequence>
<xs:element name="ticketId" type="IDType" minOccurs="1"/>
<xs:element name="seatNum" type="xs:int" minOccurs="1"/>
<xs:element name="name" type="SimpleStringType" minOccurs="0"/>
<xs:element name="inn" type="InnType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:element name="TransitBookResponse">
<xs:complexType name="Passenger">
<xs:sequence>
<xs:element name="firstName" type="xs:string" minOccurs="1"/>
<xs:element name="lastName" type="xs:string" minOccurs="1"/>
<xs:element name="middleName" type="xs:string" minOccurs="0"/>
<xs:element name="docNum" type="xs:string" minOccurs="0"/>
<xs:element name="docSeries" type="xs:string" minOccurs="0"/>
<xs:element name="docTypeId" type="IDType" minOccurs="1"/>
<xs:element name="birthday" type="xs:date" minOccurs="0"/>
<xs:element name="citizenshipISO2" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="gender" type="GenderType" minOccurs="0"/>
<xs:element name="phone" type="xs:string" minOccurs="0"/>
<xs:element name="info" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:element name="GetFreeSeatsRequest">
<xs:complexType>
<xs:choice>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="date" type="xs:date"/>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
</xs:sequence>
<xs:sequence>
<xs:element name="tripId" type="IDType" minOccurs="1"/>
<xs:element name="dispatchStationId" type="IDType" minOccurs="1"/>
<xs:element name="arrivalStationId" type="IDType" minOccurs="1"/>
</xs:sequence>
</xs:choice>
</xs:complexType>
</xs:element>

<xs:element name="GetFreeSeatsResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="AbstractResponse">
<xs:sequence>
<xs:element name="Body">
<xs:complexType>
<xs:sequence>
<xs:element name="TransitTicket" type="TransitTicket" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
<xs:choice>
<xs:element name="Seat" type="Seat" maxOccurs="unbounded"/>
<xs:element name="TransitSeat" type="TransitSeat" maxOccurs="unbounded"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
@@ -166,38 +281,91 @@
</xs:complexType>
</xs:element>

<xs:element name="TransitConfirmRequest">

<xs:element name="TransitTripInfoRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Agent" type="Agent" minOccurs="0"/>
<xs:element name="date" type="xs:date"/>
<xs:element name="dispatchStationUid" type="UidType" minOccurs="0"/>
<xs:element name="arrivalStationUid" type="UidType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="TransitConfirmResponse">
<xs:complexType name="TransitTicket">
<xs:sequence>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="dispatchStationName" type="SimpleStringType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
<xs:element name="arrivalStationName" type="SimpleStringType"/>
<xs:element name="Passenger" type="Passenger"/>
<xs:element name="ticketId" type="IDType" minOccurs="1"/>
<xs:element name="ticketSeries" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="ticketNumber" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="seatNum" type="xs:int" minOccurs="1"/>
<xs:element name="Agent" type="Agent"/>
<xs:element name="price" type="xs:decimal"/>
<xs:element name="passengerGone" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>


<xs:element name="TransitTripInfoResponse">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="AbstractResponse"/>
<xs:extension base="AbstractResponse">
<xs:sequence>
<xs:element name="Body">
<xs:complexType>
<xs:sequence>
<xs:element name="Ticket" type="TransitTicket" maxOccurs="unbounded"/>
<xs:element name="maxSeats" type="xs:int"/>
<xs:element name="freeSeats" type="xs:int"/>
<xs:element name="Carrier" type="CarrierType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>

<xs:element name="TransitCancelRequest">
<xs:element name="TransitRouteInfoRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="RouteKey" type="RouteKey"/>
<xs:element name="ticketId" type="IDType" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Agent" type="Agent" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="TransitCancelResponse">
<xs:complexType name="RouteItem">
<xs:sequence>
<xs:element name="order" type="xs:int"/>
<xs:element name="stationName" type="SimpleStringType"/>
<xs:element name="stationUid" type="UidType"/>
<xs:element name="distance" type="xs:integer"/>
<xs:element name="arrivalTime" type="xs:time"/>
<xs:element name="dispatchTime" type="xs:time"/>
</xs:sequence>
</xs:complexType>

<xs:element name="TransitRouteInfoResponse">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="AbstractResponse"/>
<xs:extension base="AbstractResponse">
<xs:sequence>
<xs:element name="Body">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="SimpleStringType"/>
<xs:element name="RouteItem" type="RouteItem" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>


+ 21
- 0
src/main/java/com/artmark/avs5rs/dispatcher/DispatcherService.java View File

@@ -0,0 +1,21 @@
package com.artmark.avs5rs.dispatcher;


import com.artmark.avs5rs.dispatcher.model.UpdateTicketRequest;
import com.artmark.avs5rs.dispatcher.model.UpdateTicketResponse;

import javax.ws.rs.POST;
import javax.ws.rs.Path;

/**
* Сервис операций диспетчера.
* @author Ushmodin N.
* @since 07.07.2016 10:06
*/

@Path("/dispatcher")
public interface DispatcherService {
@POST
@Path("updateTicket")
UpdateTicketResponse updateTicket(UpdateTicketRequest request);
}

+ 160
- 0
src/main/java/com/artmark/avs5rs/dispatcher/model/AbstractResponse.java View File

@@ -0,0 +1,160 @@

package com.artmark.avs5rs.dispatcher.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;


/**
* <p>Java class for AbstractResponse complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="AbstractResponse">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="Error" minOccurs="0">
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="code" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="message" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* &lt;/element>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AbstractResponse", propOrder = {
"error"
})
@XmlSeeAlso({
UpdateTicketResponse.class
})
public class AbstractResponse {

@XmlElement(name = "Error")
protected AbstractResponse.Error error;

/**
* Gets the value of the error property.
*
* @return
* possible object is
* {@link AbstractResponse.Error }
*
*/
public AbstractResponse.Error getError() {
return error;
}

/**
* Sets the value of the error property.
*
* @param value
* allowed object is
* {@link AbstractResponse.Error }
*
*/
public void setError(AbstractResponse.Error value) {
this.error = value;
}


/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="code" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="message" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"code",
"message"
})
public static class Error {

@XmlElement(required = true)
protected String code;
@XmlElement(required = true)
protected String message;

/**
* Gets the value of the code property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCode() {
return code;
}

/**
* Sets the value of the code property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCode(String value) {
this.code = value;
}

/**
* Gets the value of the message property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMessage() {
return message;
}

/**
* Sets the value of the message property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMessage(String value) {
this.message = value;
}

}

}

+ 42
- 0
src/main/java/com/artmark/avs5rs/dispatcher/model/ErrorCode.java View File

@@ -0,0 +1,42 @@

package com.artmark.avs5rs.dispatcher.model;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;


/**
* <p>Java class for ErrorCode.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* &lt;simpleType name="ErrorCode">
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;enumeration value="INTERNAL"/>
* &lt;enumeration value="NOT_FOUND"/>
* &lt;enumeration value="SEAT_OCCUPIED"/>
* &lt;enumeration value="PERSONAL_DATA_INCORRECT"/>
* &lt;/restriction>
* &lt;/simpleType>
* </pre>
*
*/
@XmlType(name = "ErrorCode")
@XmlEnum
public enum ErrorCode {

INTERNAL,
NOT_FOUND,
SEAT_OCCUPIED,
PERSONAL_DATA_INCORRECT;

public String value() {
return name();
}

public static ErrorCode fromValue(String v) {
return valueOf(v);
}

}

+ 72
- 0
src/main/java/com/artmark/avs5rs/dispatcher/model/ObjectFactory.java View File

@@ -0,0 +1,72 @@

package com.artmark.avs5rs.dispatcher.model;

import javax.xml.bind.annotation.XmlRegistry;


/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the com.artmark.avs5rs.dispatcher.model package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {


/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.artmark.avs5rs.dispatcher.model
*
*/
public ObjectFactory() {
}

/**
* Create an instance of {@link AbstractResponse }
*
*/
public AbstractResponse createAbstractResponse() {
return new AbstractResponse();
}

/**
* Create an instance of {@link UpdateTicketResponse }
*
*/
public UpdateTicketResponse createUpdateTicketResponse() {
return new UpdateTicketResponse();
}

/**
* Create an instance of {@link AbstractResponse.Error }
*
*/
public AbstractResponse.Error createAbstractResponseError() {
return new AbstractResponse.Error();
}

/**
* Create an instance of {@link UpdateTicketRequest }
*
*/
public UpdateTicketRequest createUpdateTicketRequest() {
return new UpdateTicketRequest();
}

/**
* Create an instance of {@link RouteKey }
*
*/
public RouteKey createRouteKey() {
return new RouteKey();
}

}

+ 121
- 0
src/main/java/com/artmark/avs5rs/dispatcher/model/RouteKey.java View File

@@ -0,0 +1,121 @@

package com.artmark.avs5rs.dispatcher.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;


/**
* <p>Java class for RouteKey complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="RouteKey">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="dispatchStationUid" type="{}UidType"/>
* &lt;element name="arrivalStationUid" type="{}UidType"/>
* &lt;element name="dispatchTime" type="{http://www.w3.org/2001/XMLSchema}time"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RouteKey", propOrder = {
"dispatchStationUid",
"arrivalStationUid",
"dispatchTime"
})
public class RouteKey {

@XmlElement(required = true)
protected String dispatchStationUid;
@XmlElement(required = true)
protected String arrivalStationUid;
@XmlElement(required = true)
@XmlSchemaType(name = "time")
protected XMLGregorianCalendar dispatchTime;

/**
* Gets the value of the dispatchStationUid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDispatchStationUid() {
return dispatchStationUid;
}

/**
* Sets the value of the dispatchStationUid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDispatchStationUid(String value) {
this.dispatchStationUid = value;
}

/**
* Gets the value of the arrivalStationUid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getArrivalStationUid() {
return arrivalStationUid;
}

/**
* Sets the value of the arrivalStationUid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArrivalStationUid(String value) {
this.arrivalStationUid = value;
}

/**
* Gets the value of the dispatchTime property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getDispatchTime() {
return dispatchTime;
}

/**
* Sets the value of the dispatchTime property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setDispatchTime(XMLGregorianCalendar value) {
this.dispatchTime = value;
}

}

+ 119
- 0
src/main/java/com/artmark/avs5rs/dispatcher/model/UpdateTicketRequest.java View File

@@ -0,0 +1,119 @@

package com.artmark.avs5rs.dispatcher.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;


/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="RouteKey" type="{}RouteKey"/>
* &lt;element name="ticketId" type="{}IDType"/>
* &lt;element name="passengerGone" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"routeKey",
"ticketId",
"passengerGone"
})
@XmlRootElement(name = "UpdateTicketRequest")
public class UpdateTicketRequest {

@XmlElement(name = "RouteKey", required = true)
protected RouteKey routeKey;
@XmlElement(required = true)
protected String ticketId;
protected Boolean passengerGone;

/**
* Gets the value of the routeKey property.
*
* @return
* possible object is
* {@link RouteKey }
*
*/
public RouteKey getRouteKey() {
return routeKey;
}

/**
* Sets the value of the routeKey property.
*
* @param value
* allowed object is
* {@link RouteKey }
*
*/
public void setRouteKey(RouteKey value) {
this.routeKey = value;
}

/**
* Gets the value of the ticketId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTicketId() {
return ticketId;
}

/**
* Sets the value of the ticketId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTicketId(String value) {
this.ticketId = value;
}

/**
* Gets the value of the passengerGone property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isPassengerGone() {
return passengerGone;
}

/**
* Sets the value of the passengerGone property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setPassengerGone(Boolean value) {
this.passengerGone = value;
}

}

+ 34
- 0
src/main/java/com/artmark/avs5rs/dispatcher/model/UpdateTicketResponse.java View File

@@ -0,0 +1,34 @@

package com.artmark.avs5rs.dispatcher.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;


/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;extension base="{}AbstractResponse">
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "UpdateTicketResponse")
public class UpdateTicketResponse
extends AbstractResponse
{


}

+ 68
- 0
src/main/java/com/artmark/avs5rs/dispatcher/model/avs5rs_dispatcher.xsd View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:c="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified">

<xs:simpleType name="IDType">
<xs:restriction base="xs:string">
<xs:maxLength value="36"/>
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>

<xs:complexType name="AbstractResponse">
<xs:sequence>
<xs:element name="Error" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="code" type="xs:string" minOccurs="1"/>
<xs:element name="message" type="xs:string" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>

<xs:simpleType name="UidType">
<xs:restriction base="xs:string">
<xs:length value="36"/>
</xs:restriction>
</xs:simpleType>

<xs:complexType name="RouteKey">
<xs:sequence>
<xs:element name="dispatchStationUid" type="UidType"/>
<xs:element name="arrivalStationUid" type="UidType"/>
<xs:element name="dispatchTime" type="xs:time"/>
</xs:sequence>
</xs:complexType>

<xs:simpleType name="ErrorCode">
<xs:restriction base="xs:string">
<xs:enumeration value="INTERNAL"/>
<xs:enumeration value="NOT_FOUND"/>
<xs:enumeration value="SEAT_OCCUPIED"/>
<xs:enumeration value="PERSONAL_DATA_INCORRECT"/>
</xs:restriction>
</xs:simpleType>


<xs:element name="UpdateTicketRequest">
<xs:complexType>
<c:sequence>
<xs:element name="RouteKey" type="RouteKey" minOccurs="1"/>
<xs:element name="ticketId" type="IDType" minOccurs="1"/>
<xs:element name="passengerGone" type="xs:boolean" minOccurs="0"/>
</c:sequence>
</xs:complexType>
</xs:element>

<xs:element name="UpdateTicketResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="AbstractResponse"/>
</xs:complexContent>
</xs:complexType>
</xs:element>

</xs:schema>

+ 0
- 44
src/main/java/com/artmark/avs5rs/model/Agent.java View File

@@ -1,44 +0,0 @@
package com.artmark.avs5rs.model;


import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
* Информация об агенте
*
* @author V.Skorykh
* @since 30.05.2016 13:42
* @since 5.2
*/
@XmlType
@XmlAccessorType(XmlAccessType.FIELD)
public class Agent {

/**
* ИНН агента
*/
private String inn;

/**
* Имя агента (название организации)
*/
private String name;

public String getInn() {
return inn;
}

public void setInn(String inn) {
this.inn = inn;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}

+ 0
- 64
src/main/java/com/artmark/avs5rs/model/BookOrderRequest.java View File

@@ -1,64 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

/**
* @author Ushmodin N.
* @since 07.07.2016 11:04
*/

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "BookOrderRequest")
public class BookOrderRequest {
private String tripId;
private String dispatchStationId;
private String arrivalStationId;
@XmlElement(name = "Sale")
private List<Sale> sales;
@XmlElement(name = "Agent")
private Agent agent;

public String getTripId() {
return tripId;
}

public void setTripId(String tripId) {
this.tripId = tripId;
}

public String getDispatchStationId() {
return dispatchStationId;
}

public void setDispatchStationId(String dispatchStationId) {
this.dispatchStationId = dispatchStationId;
}

public String getArrivalStationId() {
return arrivalStationId;
}

public void setArrivalStationId(String arrivalStationId) {
this.arrivalStationId = arrivalStationId;
}

public List<Sale> getSales() {
return sales;
}

public void setSales(List<Sale> sales) {
this.sales = sales;
}

public Agent getAgent() {
return agent;
}

public void setAgent(Agent agent) {
this.agent = agent;
}
}

+ 0
- 28
src/main/java/com/artmark/avs5rs/model/BookOrderResponse.java View File

@@ -1,28 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
* @author Ushmodin N.
* @since 07.07.2016 11:09
*/


@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "BookOrderResponse")
public class BookOrderResponse {
/**
* Идентификато договора
*/
private String orderId;

public String getOrderId() {
return orderId;
}

public void setOrderId(String orderId) {
this.orderId = orderId;
}
}

+ 0
- 35
src/main/java/com/artmark/avs5rs/model/CancelTicketRequest.java View File

@@ -1,35 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
* @author Ushmodin N.
* @since 07.07.2016 11:23
*/

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "CancelTicketRequest")
public class CancelTicketRequest {
private String ticketId;
@XmlElement(name = "Agent")
private Agent agent;

public String getTicketId() {
return ticketId;
}

public void setTicketId(String ticketId) {
this.ticketId = ticketId;
}

public Agent getAgent() {
return agent;
}

public void setAgent(Agent agent) {
this.agent = agent;
}
}

+ 0
- 26
src/main/java/com/artmark/avs5rs/model/CancelTicketResponse.java View File

@@ -1,26 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
* @author Ushmodin N.
* @since 07.07.2016 11:23
*/

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CancelTicketResponse")
public class CancelTicketResponse {
@XmlElement(name = "Ticket")
private Ticket ticket;

public Ticket getTicket() {
return ticket;
}

public void setTicket(Ticket ticket) {
this.ticket = ticket;
}
}

+ 0
- 35
src/main/java/com/artmark/avs5rs/model/ConfirmOrderRequest.java View File

@@ -1,35 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
* @author Ushmodin N.
* @since 07.07.2016 11:18
*/

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "ConfirmOrderRequest")
public class ConfirmOrderRequest {
private String orderId;
@XmlElement(name = "Agent")
private Agent agent;

public String getOrderId() {
return orderId;
}

public void setOrderId(String orderId) {
this.orderId = orderId;
}

public Agent getAgent() {
return agent;
}

public void setAgent(Agent agent) {
this.agent = agent;
}
}

+ 0
- 37
src/main/java/com/artmark/avs5rs/model/ConfirmOrderResponse.java View File

@@ -1,37 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import java.util.List;

/**
* @author Ushmodin N.
* @since 07.07.2016 11:18
*/


@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ConfirmOrderResponse")
public class ConfirmOrderResponse {
private String orderId;
@XmlElement(name = "Ticket")
private List<Ticket> tickets;

public String getOrderId() {
return orderId;
}

public void setOrderId(String orderId) {
this.orderId = orderId;
}

public List<Ticket> getTickets() {
return tickets;
}

public void setTickets(List<Ticket> tickets) {
this.tickets = tickets;
}
}

+ 0
- 28
src/main/java/com/artmark/avs5rs/model/DateAdapter.java View File

@@ -1,28 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
* @author Ushmodin N.
* @since 07.07.2016 14:34
*/

@XmlAccessorType(XmlAccessType.FIELD)
public class DateAdapter extends XmlAdapter<String, Date> {

private static final String FORMAT = "yyyy-MM-dd";

@Override
public Date unmarshal(String s) throws Exception {
return new SimpleDateFormat(FORMAT).parse(s);
}

@Override
public String marshal(Date date) throws Exception {
return new SimpleDateFormat(FORMAT).format(date);
}
}

+ 0
- 38
src/main/java/com/artmark/avs5rs/model/DocumentType.java View File

@@ -1,38 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;

/**
* @author Ushmodin N.
* @since 07.07.2016 12:36
*/

@XmlAccessorType(XmlAccessType.FIELD)
public class DocumentType {
/**
* ID типа документа. Обязателен. Может совпадать с названием.
*/
protected String id;

/**
* Название типа документа. Обязателен.
*/
protected String name;

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}

+ 0
- 27
src/main/java/com/artmark/avs5rs/model/EchoRequest.java View File

@@ -1,27 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/**
* @author Ushmodin N.
* @since 07.07.2016 10:25
*/

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "EchoRequest")
public class EchoRequest {
/**
* Сообщение которое будет возвращено в ответ
*/
private String message;

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}
}

+ 0
- 26
src/main/java/com/artmark/avs5rs/model/EchoResponse.java View File

@@ -1,26 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
* @author Ushmodin N.
* @since 07.07.2016 10:25
*/
@XmlType(name = "EchoResponse")
@XmlAccessorType(XmlAccessType.FIELD)
public class EchoResponse {
/**
* Сообщение переданное в запросе
*/
private String message;

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}
}

+ 0
- 10
src/main/java/com/artmark/avs5rs/model/Gender.java View File

@@ -1,10 +0,0 @@
package com.artmark.avs5rs.model;

/**
* @author Ushmodin N.
* @since 07.07.2016 12:27
*/

public enum Gender {
MALE, FEMALE
}

+ 0
- 27
src/main/java/com/artmark/avs5rs/model/GetArrivalStationsRequest.java View File

@@ -1,27 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/**
* @author Ushmodin N.
* @since 07.07.2016 10:27
*/

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "GetArrivalStationsRequest")
public class GetArrivalStationsRequest {
/**
* Идентификатор станции отправления. Обязательно.
*/
private String dispatchStationId;

public String getDispatchStationId() {
return dispatchStationId;
}

public void setDispatchStationId(String dispatchStationId) {
this.dispatchStationId = dispatchStationId;
}
}

+ 0
- 27
src/main/java/com/artmark/avs5rs/model/GetArrivalStationsResponse.java View File

@@ -1,27 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import java.util.List;

/**
* @author Ushmodin N.
* @since 07.07.2016 10:30
*/

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GetArrivalStationsResponse")
public class GetArrivalStationsResponse {
@XmlElement(name = "Station")
private List<Station> stations;

public List<Station> getStations() {
return stations;
}

public void setStations(List<Station> stations) {
this.stations = stations;
}
}

+ 0
- 15
src/main/java/com/artmark/avs5rs/model/GetDispatchStationsRequest.java View File

@@ -1,15 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/**
* @author Ushmodin N.
* @since 08.07.2016 09:08
*/

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "GetDispatchStationsRequest")
public class GetDispatchStationsRequest {
}

+ 0
- 27
src/main/java/com/artmark/avs5rs/model/GetDispatchStationsResponse.java View File

@@ -1,27 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import java.util.List;

/**
* @author Ushmodin N.
* @since 07.07.2016 10:27
*/

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GetDispatchStationsResponse")
public class GetDispatchStationsResponse {
@XmlElement(name = "Station")
private List<Station> station;

public List<Station> getStation() {
return station;
}

public void setStation(List<Station> station) {
this.station = station;
}
}

+ 0
- 43
src/main/java/com/artmark/avs5rs/model/GetDocumentTypesRequest.java View File

@@ -1,43 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/**
* @author Ushmodin N.
* @since 07.07.2016 10:59
*/

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "GetDocumentTypesRequest")
public class GetDocumentTypesRequest {
private String tripId;
private String dispatchStationId;
private String arrivalStationId;

public String getTripId() {
return tripId;
}

public void setTripId(String tripId) {
this.tripId = tripId;
}

public String getDispatchStationId() {
return dispatchStationId;
}

public void setDispatchStationId(String dispatchStationId) {
this.dispatchStationId = dispatchStationId;
}

public String getArrivalStationId() {
return arrivalStationId;
}

public void setArrivalStationId(String arrivalStationId) {
this.arrivalStationId = arrivalStationId;
}

}

+ 0
- 28
src/main/java/com/artmark/avs5rs/model/GetDocumentTypesResponse.java View File

@@ -1,28 +0,0 @@
package com.artmark.avs5rs.model;


import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import java.util.List;

/**
* @author Ushmodin N.
* @since 07.07.2016 10:59
*/

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GetDocumentTypesResponse")
public class GetDocumentTypesResponse {
@XmlElement(name = "DocumentType")
private List<DocumentType> documentTypes;

public List<DocumentType> getDocumentTypes() {
return documentTypes;
}

public void setDocumentTypes(List<DocumentType> documentTypes) {
this.documentTypes = documentTypes;
}
}

+ 0
- 52
src/main/java/com/artmark/avs5rs/model/GetFreeSeatsRequest.java View File

@@ -1,52 +0,0 @@
package com.artmark.avs5rs.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/**
* @author Ushmodin N.
* @since 07.07.2016 10:53
*/

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "GetFreeSeatsRequest")
public class GetFreeSeatsRequest {

/**
* Идентификатор рейса. Обязательный.
*/
private String tripId;
/**
* Идентификатор станции отправления. Обязательный.
*/
private String dispatchStationId;
/**
* Идентификатор станции назначения. Обязательный.
*/
private String arrivalStationId;

public String getTripId() {
return tripId;
}

public void setTripId(String tripId) {
this.tripId = tripId;
}

public String getDispatchStationId() {
return dispatchStationId;
}

public void setDispatchStationId(String dispatchStationId) {
this.dispatchStationId = dispatchStationId;
}

public String getArrivalStationId() {
return arrivalStationId;
}