update the service reference

This commit is contained in:
Andreas Zweili 2018-08-21 21:04:33 +02:00
parent 5fe10fc9de
commit 87f382764e
4 changed files with 287 additions and 57 deletions

View File

@ -7,22 +7,41 @@
<xsd:import schemaLocation="http://localhost:49949/AirlineService.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/AirlineServer.Models" /> <xsd:import schemaLocation="http://localhost:49949/AirlineService.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/AirlineServer.Models" />
</xsd:schema> </xsd:schema>
</wsdl:types> </wsdl:types>
<wsdl:message name="IAirlineService_GetFreeFlights_InputMessage"> <wsdl:message name="IAirlineService_GetFlights_InputMessage">
<wsdl:part name="parameters" element="tns:GetFreeFlights" /> <wsdl:part name="parameters" element="tns:GetFlights" />
</wsdl:message> </wsdl:message>
<wsdl:message name="IAirlineService_GetFreeFlights_OutputMessage"> <wsdl:message name="IAirlineService_GetFlights_OutputMessage">
<wsdl:part name="parameters" element="tns:GetFreeFlightsResponse" /> <wsdl:part name="parameters" element="tns:GetFlightsResponse" />
</wsdl:message>
<wsdl:message name="IAirlineService_BookFlight_InputMessage">
<wsdl:part name="parameters" element="tns:BookFlight" />
</wsdl:message>
<wsdl:message name="IAirlineService_BookFlight_OutputMessage">
<wsdl:part name="parameters" element="tns:BookFlightResponse" />
</wsdl:message> </wsdl:message>
<wsdl:portType name="IAirlineService"> <wsdl:portType name="IAirlineService">
<wsdl:operation name="GetFreeFlights"> <wsdl:operation name="GetFlights">
<wsdl:input wsaw:Action="http://tempuri.org/IAirlineService/GetFreeFlights" message="tns:IAirlineService_GetFreeFlights_InputMessage" /> <wsdl:input wsaw:Action="http://tempuri.org/IAirlineService/GetFlights" message="tns:IAirlineService_GetFlights_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IAirlineService/GetFreeFlightsResponse" message="tns:IAirlineService_GetFreeFlights_OutputMessage" /> <wsdl:output wsaw:Action="http://tempuri.org/IAirlineService/GetFlightsResponse" message="tns:IAirlineService_GetFlights_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="BookFlight">
<wsdl:input wsaw:Action="http://tempuri.org/IAirlineService/BookFlight" message="tns:IAirlineService_BookFlight_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IAirlineService/BookFlightResponse" message="tns:IAirlineService_BookFlight_OutputMessage" />
</wsdl:operation> </wsdl:operation>
</wsdl:portType> </wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IAirlineService" type="tns:IAirlineService"> <wsdl:binding name="BasicHttpBinding_IAirlineService" type="tns:IAirlineService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetFreeFlights"> <wsdl:operation name="GetFlights">
<soap:operation soapAction="http://tempuri.org/IAirlineService/GetFreeFlights" style="document" /> <soap:operation soapAction="http://tempuri.org/IAirlineService/GetFlights" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="BookFlight">
<soap:operation soapAction="http://tempuri.org/IAirlineService/BookFlight" style="document" />
<wsdl:input> <wsdl:input>
<soap:body use="literal" /> <soap:body use="literal" />
</wsdl:input> </wsdl:input>

View File

@ -1,15 +1,36 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation="http://localhost:49949/AirlineService.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/AirlineServer.Models" /> <xs:import schemaLocation="http://localhost:49949/AirlineService.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/AirlineServer.Models" />
<xs:element name="GetFreeFlights"> <xs:element name="GetFlights">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
<xs:element name="GetFreeFlightsResponse">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/AirlineServer.Models" minOccurs="0" name="GetFreeFlightsResult" nillable="true" type="q1:ArrayOfFlight" /> <xs:element minOccurs="0" name="startTime" type="xs:dateTime" />
<xs:element minOccurs="0" name="endTime" type="xs:dateTime" />
<xs:element minOccurs="0" name="origin" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="destination" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="numberOfSeats" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetFlightsResponse">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/AirlineServer.Models" minOccurs="0" name="GetFlightsResult" nillable="true" type="q1:ArrayOfArrayOfFlight" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BookFlight">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/AirlineServer.Models" minOccurs="0" name="flight" nillable="true" type="q2:Flight" />
<xs:element minOccurs="0" name="numberOfSeats" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BookFlightResponse">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/AirlineServer.Models" minOccurs="0" name="BookFlightResult" nillable="true" type="q3:Flight" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>

View File

@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/AirlineServer.Models" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/AirlineServer.Models" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/AirlineServer.Models" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/AirlineServer.Models" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="ArrayOfArrayOfFlight">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="ArrayOfFlight" nillable="true" type="tns:ArrayOfFlight" />
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfArrayOfFlight" nillable="true" type="tns:ArrayOfArrayOfFlight" />
<xs:complexType name="ArrayOfFlight"> <xs:complexType name="ArrayOfFlight">
<xs:sequence> <xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Flight" nillable="true" type="tns:Flight" /> <xs:element minOccurs="0" maxOccurs="unbounded" name="Flight" nillable="true" type="tns:Flight" />
@ -9,12 +15,12 @@
<xs:complexType name="Flight"> <xs:complexType name="Flight">
<xs:sequence> <xs:sequence>
<xs:element minOccurs="0" name="Airline" nillable="true" type="tns:Airline" /> <xs:element minOccurs="0" name="Airline" nillable="true" type="tns:Airline" />
<xs:element minOccurs="0" name="Destination" nillable="true" type="tns:Airport" />
<xs:element minOccurs="0" name="Duration" type="xs:float" /> <xs:element minOccurs="0" name="Duration" type="xs:float" />
<xs:element minOccurs="0" name="FlightID" type="xs:int" /> <xs:element minOccurs="0" name="FlightID" type="xs:int" />
<xs:element minOccurs="0" name="FromCityShortName" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Origin" nillable="true" type="tns:Airport" />
<xs:element minOccurs="0" name="StartTime" type="xs:dateTime" /> <xs:element minOccurs="0" name="StartTime" type="xs:dateTime" />
<xs:element minOccurs="0" name="ToCityShortName" nillable="true" type="xs:string" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:element name="Flight" nillable="true" type="tns:Flight" /> <xs:element name="Flight" nillable="true" type="tns:Flight" />
@ -25,4 +31,20 @@
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:element name="Airline" nillable="true" type="tns:Airline" /> <xs:element name="Airline" nillable="true" type="tns:Airline" />
<xs:complexType name="Airport">
<xs:sequence>
<xs:element minOccurs="0" name="City" nillable="true" type="tns:City" />
<xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="ShortName" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="Airport" nillable="true" type="tns:Airport" />
<xs:complexType name="City">
<xs:sequence>
<xs:element minOccurs="0" name="CityID" type="xs:int" />
<xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="ZipCode" type="xs:int" />
</xs:sequence>
</xs:complexType>
<xs:element name="City" nillable="true" type="tns:City" />
</xs:schema> </xs:schema>

View File

@ -25,23 +25,23 @@ namespace Plattform.AirlineService {
[System.Runtime.Serialization.OptionalFieldAttribute()] [System.Runtime.Serialization.OptionalFieldAttribute()]
private Plattform.AirlineService.Airline AirlineField; private Plattform.AirlineService.Airline AirlineField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private Plattform.AirlineService.Airport DestinationField;
[System.Runtime.Serialization.OptionalFieldAttribute()] [System.Runtime.Serialization.OptionalFieldAttribute()]
private float DurationField; private float DurationField;
[System.Runtime.Serialization.OptionalFieldAttribute()] [System.Runtime.Serialization.OptionalFieldAttribute()]
private int FlightIDField; private int FlightIDField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string FromCityShortNameField;
[System.Runtime.Serialization.OptionalFieldAttribute()] [System.Runtime.Serialization.OptionalFieldAttribute()]
private string NameField; private string NameField;
[System.Runtime.Serialization.OptionalFieldAttribute()] [System.Runtime.Serialization.OptionalFieldAttribute()]
private System.DateTime StartTimeField; private Plattform.AirlineService.Airport OriginField;
[System.Runtime.Serialization.OptionalFieldAttribute()] [System.Runtime.Serialization.OptionalFieldAttribute()]
private string ToCityShortNameField; private System.DateTime StartTimeField;
[global::System.ComponentModel.BrowsableAttribute(false)] [global::System.ComponentModel.BrowsableAttribute(false)]
public System.Runtime.Serialization.ExtensionDataObject ExtensionData { public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
@ -66,6 +66,19 @@ namespace Plattform.AirlineService {
} }
} }
[System.Runtime.Serialization.DataMemberAttribute()]
public Plattform.AirlineService.Airport Destination {
get {
return this.DestinationField;
}
set {
if ((object.ReferenceEquals(this.DestinationField, value) != true)) {
this.DestinationField = value;
this.RaisePropertyChanged("Destination");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute()] [System.Runtime.Serialization.DataMemberAttribute()]
public float Duration { public float Duration {
get { get {
@ -92,19 +105,6 @@ namespace Plattform.AirlineService {
} }
} }
[System.Runtime.Serialization.DataMemberAttribute()]
public string FromCityShortName {
get {
return this.FromCityShortNameField;
}
set {
if ((object.ReferenceEquals(this.FromCityShortNameField, value) != true)) {
this.FromCityShortNameField = value;
this.RaisePropertyChanged("FromCityShortName");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute()] [System.Runtime.Serialization.DataMemberAttribute()]
public string Name { public string Name {
get { get {
@ -118,6 +118,19 @@ namespace Plattform.AirlineService {
} }
} }
[System.Runtime.Serialization.DataMemberAttribute()]
public Plattform.AirlineService.Airport Origin {
get {
return this.OriginField;
}
set {
if ((object.ReferenceEquals(this.OriginField, value) != true)) {
this.OriginField = value;
this.RaisePropertyChanged("Origin");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute()] [System.Runtime.Serialization.DataMemberAttribute()]
public System.DateTime StartTime { public System.DateTime StartTime {
get { get {
@ -131,19 +144,6 @@ namespace Plattform.AirlineService {
} }
} }
[System.Runtime.Serialization.DataMemberAttribute()]
public string ToCityShortName {
get {
return this.ToCityShortNameField;
}
set {
if ((object.ReferenceEquals(this.ToCityShortNameField, value) != true)) {
this.ToCityShortNameField = value;
this.RaisePropertyChanged("ToCityShortName");
}
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName) { protected void RaisePropertyChanged(string propertyName) {
@ -215,15 +215,175 @@ namespace Plattform.AirlineService {
} }
} }
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="Airport", Namespace="http://schemas.datacontract.org/2004/07/AirlineServer.Models")]
[System.SerializableAttribute()]
public partial class Airport : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
[System.NonSerializedAttribute()]
private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private Plattform.AirlineService.City CityField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string NameField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string ShortNameField;
[global::System.ComponentModel.BrowsableAttribute(false)]
public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
get {
return this.extensionDataField;
}
set {
this.extensionDataField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public Plattform.AirlineService.City City {
get {
return this.CityField;
}
set {
if ((object.ReferenceEquals(this.CityField, value) != true)) {
this.CityField = value;
this.RaisePropertyChanged("City");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string Name {
get {
return this.NameField;
}
set {
if ((object.ReferenceEquals(this.NameField, value) != true)) {
this.NameField = value;
this.RaisePropertyChanged("Name");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string ShortName {
get {
return this.ShortNameField;
}
set {
if ((object.ReferenceEquals(this.ShortNameField, value) != true)) {
this.ShortNameField = value;
this.RaisePropertyChanged("ShortName");
}
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null)) {
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="City", Namespace="http://schemas.datacontract.org/2004/07/AirlineServer.Models")]
[System.SerializableAttribute()]
public partial class City : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
[System.NonSerializedAttribute()]
private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private int CityIDField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string NameField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private int ZipCodeField;
[global::System.ComponentModel.BrowsableAttribute(false)]
public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
get {
return this.extensionDataField;
}
set {
this.extensionDataField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public int CityID {
get {
return this.CityIDField;
}
set {
if ((this.CityIDField.Equals(value) != true)) {
this.CityIDField = value;
this.RaisePropertyChanged("CityID");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string Name {
get {
return this.NameField;
}
set {
if ((object.ReferenceEquals(this.NameField, value) != true)) {
this.NameField = value;
this.RaisePropertyChanged("Name");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public int ZipCode {
get {
return this.ZipCodeField;
}
set {
if ((this.ZipCodeField.Equals(value) != true)) {
this.ZipCodeField = value;
this.RaisePropertyChanged("ZipCode");
}
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null)) {
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="AirlineService.IAirlineService")] [System.ServiceModel.ServiceContractAttribute(ConfigurationName="AirlineService.IAirlineService")]
public interface IAirlineService { public interface IAirlineService {
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAirlineService/GetFreeFlights", ReplyAction="http://tempuri.org/IAirlineService/GetFreeFlightsResponse")] [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAirlineService/GetFlights", ReplyAction="http://tempuri.org/IAirlineService/GetFlightsResponse")]
Plattform.AirlineService.Flight[] GetFreeFlights(); Plattform.AirlineService.Flight[][] GetFlights(System.DateTime startTime, System.DateTime endTime, string origin, string destination, int numberOfSeats);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAirlineService/GetFreeFlights", ReplyAction="http://tempuri.org/IAirlineService/GetFreeFlightsResponse")] [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAirlineService/GetFlights", ReplyAction="http://tempuri.org/IAirlineService/GetFlightsResponse")]
System.Threading.Tasks.Task<Plattform.AirlineService.Flight[]> GetFreeFlightsAsync(); System.Threading.Tasks.Task<Plattform.AirlineService.Flight[][]> GetFlightsAsync(System.DateTime startTime, System.DateTime endTime, string origin, string destination, int numberOfSeats);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAirlineService/BookFlight", ReplyAction="http://tempuri.org/IAirlineService/BookFlightResponse")]
Plattform.AirlineService.Flight BookFlight(Plattform.AirlineService.Flight flight, int numberOfSeats);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAirlineService/BookFlight", ReplyAction="http://tempuri.org/IAirlineService/BookFlightResponse")]
System.Threading.Tasks.Task<Plattform.AirlineService.Flight> BookFlightAsync(Plattform.AirlineService.Flight flight, int numberOfSeats);
} }
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
@ -253,12 +413,20 @@ namespace Plattform.AirlineService {
base(binding, remoteAddress) { base(binding, remoteAddress) {
} }
public Plattform.AirlineService.Flight[] GetFreeFlights() { public Plattform.AirlineService.Flight[][] GetFlights(System.DateTime startTime, System.DateTime endTime, string origin, string destination, int numberOfSeats) {
return base.Channel.GetFreeFlights(); return base.Channel.GetFlights(startTime, endTime, origin, destination, numberOfSeats);
} }
public System.Threading.Tasks.Task<Plattform.AirlineService.Flight[]> GetFreeFlightsAsync() { public System.Threading.Tasks.Task<Plattform.AirlineService.Flight[][]> GetFlightsAsync(System.DateTime startTime, System.DateTime endTime, string origin, string destination, int numberOfSeats) {
return base.Channel.GetFreeFlightsAsync(); return base.Channel.GetFlightsAsync(startTime, endTime, origin, destination, numberOfSeats);
}
public Plattform.AirlineService.Flight BookFlight(Plattform.AirlineService.Flight flight, int numberOfSeats) {
return base.Channel.BookFlight(flight, numberOfSeats);
}
public System.Threading.Tasks.Task<Plattform.AirlineService.Flight> BookFlightAsync(Plattform.AirlineService.Flight flight, int numberOfSeats) {
return base.Channel.BookFlightAsync(flight, numberOfSeats);
} }
} }
} }