Migrated airline axis1 client to maven
This commit is contained in:
85
samples/airline/client/airline.wsdl
Normal file
85
samples/airline/client/airline.wsdl
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch0="http://www.springframework.org/spring-ws/samples/airline/schemas/messages" xmlns:sch1="http://www.springframework.org/spring-ws/samples/airline/schemas/types" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.springframework.org/spring-ws/samples/airline/definitions" targetNamespace="http://www.springframework.org/spring-ws/samples/airline/definitions">
|
||||
<wsdl:types>
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.springframework.org/spring-ws/samples/airline/schemas/messages" xmlns:types="http://www.springframework.org/spring-ws/samples/airline/schemas/types" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.springframework.org/spring-ws/samples/airline/schemas/messages"><import namespace="http://www.springframework.org/spring-ws/samples/airline/schemas/types"/><element name="GetFlightsRequest"><complexType><all><element name="from" type="types:AirportCode"/><element name="to" type="types:AirportCode"/><element name="departureDate" type="date"/><element minOccurs="0" name="serviceClass" type="types:ServiceClass"/></all></complexType></element><element name="GetFlightsResponse"><complexType><sequence><element maxOccurs="unbounded" minOccurs="0" name="flight" type="types:Flight"/></sequence></complexType></element><element name="BookFlightRequest"><complexType><all><element name="flightNumber" type="types:FlightNumber"/><element name="departureTime" type="dateTime"/><element name="passengers"><complexType><choice maxOccurs="9"><element name="passenger" type="types:Name"/><element name="username" type="types:FrequentFlyerUsername"/></choice></complexType></element></all></complexType></element><element name="BookFlightResponse" type="types:Ticket"/><element name="GetFrequentFlyerMileageRequest" nillable="true" type="string"/><element name="GetFrequentFlyerMileageResponse" type="int"/></schema>
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.springframework.org/spring-ws/samples/airline/schemas/types" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.springframework.org/spring-ws/samples/airline/schemas/types"><complexType name="Flight"><sequence><element name="number" type="tns:FlightNumber"/><element name="departureTime" type="dateTime"/><element name="from" type="tns:Airport"/><element name="arrivalTime" type="dateTime"/><element name="to" type="tns:Airport"/><element name="serviceClass" type="tns:ServiceClass"/></sequence></complexType><simpleType name="FlightNumber"><restriction base="string"><pattern value="[A-Z][A-Z][0-9][0-9][0-9][0-9]"/></restriction></simpleType><complexType name="Name"><sequence><element name="first" type="string"/><element name="last" type="string"/></sequence></complexType><simpleType name="FrequentFlyerUsername"><restriction base="string"/></simpleType><complexType name="Airport"><all><element name="code" type="tns:AirportCode"/><element name="name" type="string"/><element name="city" type="string"/></all></complexType><simpleType name="AirportCode"><restriction base="string"><pattern value="[A-Z][A-Z][A-Z]"/></restriction></simpleType><complexType name="Ticket"><all><element name="id" type="long"/><element name="issueDate" type="date"/><element name="passengers"><complexType><sequence><element maxOccurs="9" name="passenger" type="tns:Name"/></sequence></complexType></element><element name="flight" type="tns:Flight"/></all></complexType><simpleType name="ServiceClass"><restriction base="NCName"><enumeration value="economy"/><enumeration value="business"/><enumeration value="first"/></restriction></simpleType></schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="BookFlightRequest">
|
||||
<wsdl:part element="sch0:BookFlightRequest" name="BookFlightRequest">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFlightsResponse">
|
||||
<wsdl:part element="sch0:GetFlightsResponse" name="GetFlightsResponse">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="BookFlightResponse">
|
||||
<wsdl:part element="sch0:BookFlightResponse" name="BookFlightResponse">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFrequentFlyerMileageRequest">
|
||||
<wsdl:part element="sch0:GetFrequentFlyerMileageRequest" name="GetFrequentFlyerMileageRequest">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFlightsRequest">
|
||||
<wsdl:part element="sch0:GetFlightsRequest" name="GetFlightsRequest">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFrequentFlyerMileageResponse">
|
||||
<wsdl:part element="sch0:GetFrequentFlyerMileageResponse" name="GetFrequentFlyerMileageResponse">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="Airline">
|
||||
<wsdl:operation name="BookFlight">
|
||||
<wsdl:input message="tns:BookFlightRequest" name="BookFlightRequest">
|
||||
</wsdl:input>
|
||||
<wsdl:output message="tns:BookFlightResponse" name="BookFlightResponse">
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetFlights">
|
||||
<wsdl:input message="tns:GetFlightsRequest" name="GetFlightsRequest">
|
||||
</wsdl:input>
|
||||
<wsdl:output message="tns:GetFlightsResponse" name="GetFlightsResponse">
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetFrequentFlyerMileage">
|
||||
<wsdl:input message="tns:GetFrequentFlyerMileageRequest" name="GetFrequentFlyerMileageRequest">
|
||||
</wsdl:input>
|
||||
<wsdl:output message="tns:GetFrequentFlyerMileageResponse" name="GetFrequentFlyerMileageResponse">
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="AirlineSoap11" type="tns:Airline">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<wsdl:operation name="BookFlight">
|
||||
<soap:operation soapAction=""/>
|
||||
<wsdl:input name="BookFlightRequest">
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output name="BookFlightResponse">
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetFlights">
|
||||
<soap:operation soapAction=""/>
|
||||
<wsdl:input name="GetFlightsRequest">
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output name="GetFlightsResponse">
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetFrequentFlyerMileage">
|
||||
<soap:operation soapAction=""/>
|
||||
<wsdl:input name="GetFrequentFlyerMileageRequest">
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output name="GetFrequentFlyerMileageResponse">
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="AirlineService">
|
||||
<wsdl:port binding="tns:AirlineSoap11" name="AirlineSoap11">
|
||||
<soap:address location="http://localhost:8080/airline-server/services"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
71
samples/airline/client/axis1/pom.xml
Normal file
71
samples/airline/client/axis1/pom.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<artifactId>airline-client</artifactId>
|
||||
<groupId>org.springframework.ws</groupId>
|
||||
<version>2.0.0-M1-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>airline-axis1-client</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>Spring WS Airline Sample - Axis 1 Client</name>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>axistools-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<urls>
|
||||
<url>file://${project.basedir}/../airline.wsdl</url>
|
||||
</urls>
|
||||
<packageSpace>org.springframework.ws.samples.airline.client.axis1</packageSpace>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>wsdl2java</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>java</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<mainClass>org.springframework.ws.samples.airline.client.axis1.Main</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>axis</groupId>
|
||||
<artifactId>axis</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>axis</groupId>
|
||||
<artifactId>axis-jaxrpc</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-discovery</groupId>
|
||||
<artifactId>commons-discovery</artifactId>
|
||||
<version>0.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>wsdl4j</groupId>
|
||||
<artifactId>wsdl4j</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -46,7 +46,7 @@ public class Main {
|
||||
request.setDepartureDate(departureDate);
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
System.out.println("Requesting flights on " + dateFormat.format(departureDate));
|
||||
Flight[] flights = airline.getFlights(request);
|
||||
Flight[] flights = airline.getFlights(request).getFlight();
|
||||
System.out.println("Got " + flights.length + " results");
|
||||
if (flights.length > 0)
|
||||
{
|
||||
@@ -66,8 +66,8 @@ public class Main {
|
||||
System.out.println("Ticket " + ticket.getId());
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
System.out.println("Ticket issue date:\t" + dateFormat.format(ticket.getIssueDate()));
|
||||
for (int i = 0; i < ticket.getPassengers().length; i++) {
|
||||
writeName(ticket.getPassengers()[i]);
|
||||
for (int i = 0; i < ticket.getPassengers().getPassenger().length; i++) {
|
||||
writeName(ticket.getPassengers().getPassenger()[i]);
|
||||
|
||||
}
|
||||
writeFlight(ticket.getFlight());
|
||||
@@ -12,5 +12,6 @@
|
||||
<name>Spring WS Airline Sample - Clients</name>
|
||||
<modules>
|
||||
<module>saaj</module>
|
||||
<module>axis1</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user