Skip to content

Commit 3eebcba

Browse files
committed
Changed use of DynamicWsdl11Defintion to DefaultWsdl11Definition
1 parent e3121ec commit 3eebcba

File tree

6 files changed

+26
-20
lines changed

6 files changed

+26
-20
lines changed

samples/airline/client/axis1/src/org/springframework/ws/samples/airline/client/axis1/Main.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ public class Main {
3232
public static void main(String[] args) throws ServiceException, RemoteException {
3333
AirlineServiceLocator service = new AirlineServiceLocator();
3434
if (args.length > 0) {
35-
service.setAirlinePortEndpointAddress(args[0]);
35+
service.setAirlineSoap11EndpointAddress(args[0]);
3636
}
37-
Airline airline = service.getAirlinePort();
37+
Airline airline = service.getAirlineSoap11();
3838
GetFlightsRequest request = new GetFlightsRequest();
3939
request.setFrom("AMS");
4040
request.setTo("VCE");

samples/airline/client/jax-ws/src/org/springframework/ws/samples/airline/client/jaxws/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static void main(String[] args) throws MalformedURLException, DatatypeCon
4343
"AirlineService");
4444
service = new AirlineService(new URL(args[0]), serviceName);
4545
}
46-
Airline airline = service.getAirlinePort();
46+
Airline airline = service.getAirlineSoap11();
4747
GetFlightsRequest request = new GetFlightsRequest();
4848
request.setFrom("AMS");
4949
request.setTo("VCE");

samples/airline/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<dependency>
1919
<groupId>javax.xml.bind</groupId>
2020
<artifactId>jaxb-api</artifactId>
21-
<optional>true</optional>
2221
<version>2.1</version>
2322
<exclusions>
2423
<exclusion>
@@ -50,6 +49,7 @@
5049
<dependency>
5150
<groupId>javax.activation</groupId>
5251
<artifactId>activation</artifactId>
52+
<scope>runtime</scope>
5353
</dependency>
5454
</dependencies>
5555
</profile>
@@ -356,6 +356,10 @@
356356
<version>10.3.1.4</version>
357357
<scope>runtime</scope>
358358
</dependency>
359+
<dependency>
360+
<groupId>org.apache.ws.commons.schema</groupId>
361+
<artifactId>XmlSchema</artifactId>
362+
</dependency>
359363
<!-- Test dependencies -->
360364
<dependency>
361365
<groupId>org.easymock</groupId>

samples/airline/src/main/resources/org/springframework/ws/samples/airline/ws/applicationContext-ws.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111

1212
<bean id="messageReceiver" class="org.springframework.ws.soap.server.SoapMessageDispatcher"/>
1313

14+
<bean id="schemaCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
15+
<description>
16+
This bean wrap the messages.xsd (which imports types.xsd), and inlines them as a one.
17+
</description>
18+
<property name="xsds" value="/messages.xsd"/>
19+
<property name="inline" value="true"/>
20+
</bean>
21+
1422
<!-- ===================== ENDPOINTS ===================================== -->
1523

1624
<!--

samples/airline/src/main/webapp/WEB-INF/ws-servlet.xml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,16 @@
66

77
<!-- ===================== WSDL DEFINITION ============================== -->
88

9-
<bean id="airline" class="org.springframework.ws.wsdl.wsdl11.DynamicWsdl11Definition">
9+
<bean id="airline" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
1010
<description>
11-
Dynamically builds a WSDL from the airline.xsd.This bean definition represents the airline.wsdl file found
12-
in the root of the web application. It is used
13-
by the WsdlDefinitionHandlerAdapter in airline-servlet.xml.
11+
Builds a WSDL from the airline.xsd.This bean definition represents the airline.wsdl file found
12+
in the root of the web application.
1413
</description>
15-
<property name="builder">
16-
<bean class="org.springframework.ws.wsdl.wsdl11.builder.XsdBasedSoap11Wsdl4jDefinitionBuilder">
17-
<property name="schema" value="/messages.xsd"/>
18-
<property name="schemaLocation" value="messages.xsd"/>
19-
<property name="portTypeName" value="Airline"/>
20-
<property name="locationUri" value="http://localhost:8080/airline/services"/>
21-
<property name="targetNamespace"
22-
value="http://www.springframework.org/spring-ws/samples/airline/definitions"/>
23-
</bean>
24-
</property>
14+
<property name="schemaCollection" ref="schemaCollection"/>
15+
<property name="portTypeName" value="Airline"/>
16+
<property name="locationUri" value="http://localhost:8080/airline/services"/>
17+
<property name="targetNamespace"
18+
value="http://www.springframework.org/spring-ws/samples/airline/definitions"/>
2519
</bean>
26-
27-
20+
2821
</beans>

samples/airline/src/main/webapp/messages.xsd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<schema xmlns="http://www.w3.org/2001/XMLSchema"
33
targetNamespace="http://www.springframework.org/spring-ws/samples/airline/schemas/messages"
4+
xmlns:tns="http://www.springframework.org/spring-ws/samples/airline/schemas/messages"
45
xmlns:types="http://www.springframework.org/spring-ws/samples/airline/schemas/types"
56
elementFormDefault="qualified">
67

0 commit comments

Comments
 (0)