diff --git a/samples/airline/client/dotnet/ant-dotnet-1.0.jar b/samples/airline/client/dotnet/ant-dotnet-1.0.jar deleted file mode 100644 index 2d48db4f..00000000 Binary files a/samples/airline/client/dotnet/ant-dotnet-1.0.jar and /dev/null differ diff --git a/samples/airline/client/dotnet/build.xml b/samples/airline/client/dotnet/build.xml deleted file mode 100644 index 5977aedc..00000000 --- a/samples/airline/client/dotnet/build.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/airline/client/dotnet/readme.txt b/samples/airline/client/dotnet/readme.txt deleted file mode 100644 index 787955f8..00000000 --- a/samples/airline/client/dotnet/readme.txt +++ /dev/null @@ -1,10 +0,0 @@ -SPRING WEB SERVICES - -This directory contains a .NET client for the Airline Web Service. -The client can be run from the provided ant file, by calling "ant run". - -SAJA Client Sample table of contents ---------------------------------------------------- -* src - The source files for the client -* build.xml - Ant build file with a 'build' and a 'run' target - diff --git a/samples/airline/client/dotnet/src/main.cs b/samples/airline/client/dotnet/src/main.cs deleted file mode 100644 index 28f633a9..00000000 --- a/samples/airline/client/dotnet/src/main.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Web; -using System.Web.Services.Protocols; - -namespace Spring.Ws.Samples.Airline.Client.DotNet { - - public class Client { - public static void Main(string[] args) { - try { - AirlineService service = new AirlineService(); - if (args.Length > 0) { - service.Url = args[0]; - } else { - service.Url = "http://localhost:8080/airline/services"; - } - // Get all flights on 31st Januari, 2006 from Amsterdam to Venice - MessageGetFlightsRequest getFlightsRequest = new MessageGetFlightsRequest(); - getFlightsRequest.from = "AMS"; - getFlightsRequest.to = "VCE"; - getFlightsRequest.departureDate = new DateTime(2006,1,31); - Console.WriteLine("Requesting flights on {0:d}", getFlightsRequest.departureDate); - Flight[] flights = service.GetFlights(getFlightsRequest); - Console.WriteLine("Got {0} results", flights.Length); - if (flights.Length > 0) { - // Book the first flight using John Doe as a frequent flyer - MessageBookFlightRequest bookFlightRequest = new MessageBookFlightRequest(); - bookFlightRequest.flightNumber = flights[0].number; - bookFlightRequest.departureTime = flights[0].departureTime; - bookFlightRequest.passengers = new object[] { "john" }; - Ticket ticket = service.BookFlight(bookFlightRequest); - WriteTicket(ticket); - } - } catch (SoapException ex) { - Console.Error.WriteLine("SOAP Fault Code {0}", ex.Code); - Console.Error.WriteLine("SOAP Fault String: {0}", ex.Message); - } - } - - private static void WriteTicket(Ticket ticket) { - Console.WriteLine("Ticket {0}", ticket.id); - Console.WriteLine("Ticket issue date:\t{0:d}", ticket.issueDate); - foreach (Name passenger in ticket.passengers) { - WriteName(passenger); - } - WriteFlight(ticket.flight); - } - - private static void WriteName(Name name) { - Console.WriteLine("Passenger Name:"); - Console.WriteLine("{0} {1}", name.first, name.last); - Console.WriteLine("------------"); - } - - private static void WriteFlight(Flight flight) { - Console.WriteLine("{0:d}", flight.departureTime); - Console.WriteLine("{0}\t{1}", flight.number, flight.serviceClass); - Console.WriteLine("------------"); - Console.WriteLine("Depart:\t{0}-{1}\t{2:t}", flight.from.code, flight.from.name, - flight.departureTime); - Console.WriteLine("\t{0}", flight.from.city); - Console.WriteLine("Arrive:\t{0}-{1}\t{2:t}", flight.to.code, flight.to.name, - flight.arrivalTime); - Console.WriteLine("\t{0}", flight.to.city); - } - } -} diff --git a/samples/airline/client/pom.xml b/samples/airline/client/pom.xml index fa8c8f4e..efe09144 100644 --- a/samples/airline/client/pom.xml +++ b/samples/airline/client/pom.xml @@ -13,5 +13,7 @@ saaj axis1 + spring-ws + jms