Changed use of DynamicWsdl11Defintion to DefaultWsdl11Definition

This commit is contained in:
Arjen Poutsma
2008-03-08 14:59:04 +00:00
parent e3121ecca9
commit 3eebcba184
6 changed files with 26 additions and 20 deletions

View File

@@ -32,9 +32,9 @@ public class Main {
public static void main(String[] args) throws ServiceException, RemoteException {
AirlineServiceLocator service = new AirlineServiceLocator();
if (args.length > 0) {
service.setAirlinePortEndpointAddress(args[0]);
service.setAirlineSoap11EndpointAddress(args[0]);
}
Airline airline = service.getAirlinePort();
Airline airline = service.getAirlineSoap11();
GetFlightsRequest request = new GetFlightsRequest();
request.setFrom("AMS");
request.setTo("VCE");

View File

@@ -43,7 +43,7 @@ public class Main {
"AirlineService");
service = new AirlineService(new URL(args[0]), serviceName);
}
Airline airline = service.getAirlinePort();
Airline airline = service.getAirlineSoap11();
GetFlightsRequest request = new GetFlightsRequest();
request.setFrom("AMS");
request.setTo("VCE");

View File

@@ -18,7 +18,6 @@
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<optional>true</optional>
<version>2.1</version>
<exclusions>
<exclusion>
@@ -50,6 +49,7 @@
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
@@ -356,6 +356,10 @@
<version>10.3.1.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.schema</groupId>
<artifactId>XmlSchema</artifactId>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>org.easymock</groupId>

View File

@@ -11,6 +11,14 @@
<bean id="messageReceiver" class="org.springframework.ws.soap.server.SoapMessageDispatcher"/>
<bean id="schemaCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
<description>
This bean wrap the messages.xsd (which imports types.xsd), and inlines them as a one.
</description>
<property name="xsds" value="/messages.xsd"/>
<property name="inline" value="true"/>
</bean>
<!-- ===================== ENDPOINTS ===================================== -->
<!--

View File

@@ -6,23 +6,16 @@
<!-- ===================== WSDL DEFINITION ============================== -->
<bean id="airline" class="org.springframework.ws.wsdl.wsdl11.DynamicWsdl11Definition">
<bean id="airline" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<description>
Dynamically builds a WSDL from the airline.xsd.This bean definition represents the airline.wsdl file found
in the root of the web application. It is used
by the WsdlDefinitionHandlerAdapter in airline-servlet.xml.
Builds a WSDL from the airline.xsd.This bean definition represents the airline.wsdl file found
in the root of the web application.
</description>
<property name="builder">
<bean class="org.springframework.ws.wsdl.wsdl11.builder.XsdBasedSoap11Wsdl4jDefinitionBuilder">
<property name="schema" value="/messages.xsd"/>
<property name="schemaLocation" value="messages.xsd"/>
<property name="portTypeName" value="Airline"/>
<property name="locationUri" value="http://localhost:8080/airline/services"/>
<property name="targetNamespace"
value="http://www.springframework.org/spring-ws/samples/airline/definitions"/>
</bean>
</property>
<property name="schemaCollection" ref="schemaCollection"/>
<property name="portTypeName" value="Airline"/>
<property name="locationUri" value="http://localhost:8080/airline/services"/>
<property name="targetNamespace"
value="http://www.springframework.org/spring-ws/samples/airline/definitions"/>
</bean>
</beans>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.springframework.org/spring-ws/samples/airline/schemas/messages"
xmlns:tns="http://www.springframework.org/spring-ws/samples/airline/schemas/messages"
xmlns:types="http://www.springframework.org/spring-ws/samples/airline/schemas/types"
elementFormDefault="qualified">