Skip to content

Commit e376c86

Browse files
committed
Remove generics from WebServiceMessage
1 parent 14d695c commit e376c86

File tree

7 files changed

+32
-10
lines changed

7 files changed

+32
-10
lines changed

core/src/main/java/org/springframework/ws/WebServiceMessageFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
* @see org.springframework.ws.WebServiceMessage
3030
* @since 1.0.0
3131
*/
32-
public interface WebServiceMessageFactory<T extends WebServiceMessage> {
32+
public interface WebServiceMessageFactory {
3333

3434
/**
3535
* Creates a new, empty <code>WebServiceMessage</code>.
3636
*
3737
* @return the empty message
3838
*/
39-
T createWebServiceMessage();
39+
WebServiceMessage createWebServiceMessage();
4040

4141
/**
4242
* Reads a {@link WebServiceMessage} from the given input stream.
@@ -48,6 +48,6 @@ public interface WebServiceMessageFactory<T extends WebServiceMessage> {
4848
* @return the created message
4949
* @throws java.io.IOException if an I/O exception occurs
5050
*/
51-
T createWebServiceMessage(InputStream inputStream) throws IOException;
51+
WebServiceMessage createWebServiceMessage(InputStream inputStream) throws IOException;
5252

5353
}

core/src/main/java/org/springframework/ws/pox/dom/DomPoxMessageFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* @see org.springframework.ws.pox.dom.DomPoxMessage
3838
* @since 1.0.0
3939
*/
40-
public class DomPoxMessageFactory extends TransformerObjectSupport implements WebServiceMessageFactory<DomPoxMessage> {
40+
public class DomPoxMessageFactory extends TransformerObjectSupport implements WebServiceMessageFactory {
4141

4242
/** The default content type for the POX messages. */
4343
public static final String DEFAULT_CONTENT_TYPE = "application/xml";

core/src/main/java/org/springframework/ws/soap/SoapMessageFactory.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
package org.springframework.ws.soap;
1818

19+
import java.io.IOException;
20+
import java.io.InputStream;
21+
1922
import org.springframework.ws.WebServiceMessageFactory;
2023

2124
/**
@@ -27,7 +30,7 @@
2730
* @author Arjen Poutsma
2831
* @since 1.0.0
2932
*/
30-
public interface SoapMessageFactory<T extends SoapMessage> extends WebServiceMessageFactory<T> {
33+
public interface SoapMessageFactory extends WebServiceMessageFactory {
3134

3235
/**
3336
* Sets the SOAP Version used by this factory.
@@ -38,4 +41,23 @@ public interface SoapMessageFactory<T extends SoapMessage> extends WebServiceMes
3841
*/
3942
void setSoapVersion(SoapVersion version);
4043

44+
/**
45+
* Creates a new, empty <code>SoapMessage</code>.
46+
*
47+
* @return the empty message
48+
*/
49+
SoapMessage createWebServiceMessage();
50+
51+
/**
52+
* Reads a {@link SoapMessage} from the given input stream.
53+
* <p/>
54+
* If the given stream is an instance of {@link org.springframework.ws.transport.TransportInputStream
55+
* TransportInputStream}, the headers will be read from the request.
56+
*
57+
* @param inputStream the input stream to read the message from
58+
* @return the created message
59+
* @throws java.io.IOException if an I/O exception occurs
60+
*/
61+
SoapMessage createWebServiceMessage(InputStream inputStream) throws IOException;
62+
4163
}

core/src/main/java/org/springframework/ws/soap/axiom/AxiomSoapMessageFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
* @see #setPayloadCaching(boolean)
7979
* @since 1.0.0
8080
*/
81-
public class AxiomSoapMessageFactory implements SoapMessageFactory<AxiomSoapMessage>, InitializingBean {
81+
public class AxiomSoapMessageFactory implements SoapMessageFactory, InitializingBean {
8282

8383
private static final String CHARSET_PARAMETER = "charset";
8484

core/src/main/java/org/springframework/ws/soap/saaj/SaajSoapMessageFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2010 the original author or authors.
2+
* Copyright 2005-2010 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -55,7 +55,7 @@
5555
* @see org.springframework.ws.soap.saaj.SaajSoapMessage
5656
* @since 1.0.0
5757
*/
58-
public class SaajSoapMessageFactory implements SoapMessageFactory<SaajSoapMessage>, InitializingBean {
58+
public class SaajSoapMessageFactory implements SoapMessageFactory, InitializingBean {
5959

6060
private static final Log logger = LogFactory.getLog(SaajSoapMessageFactory.class);
6161

core/src/test/java/org/springframework/ws/MockWebServiceMessageFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import javax.xml.transform.TransformerException;
2222
import javax.xml.transform.stream.StreamSource;
2323

24-
public class MockWebServiceMessageFactory implements WebServiceMessageFactory<MockWebServiceMessage> {
24+
public class MockWebServiceMessageFactory implements WebServiceMessageFactory {
2525

2626
public MockWebServiceMessage createWebServiceMessage() {
2727
return new MockWebServiceMessage();

sandbox/src/main/java/org/springframework/ws/soap/stroap/StroapMessageFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/**
3131
* @author Arjen Poutsma
3232
*/
33-
public class StroapMessageFactory implements SoapMessageFactory<StroapMessage> {
33+
public class StroapMessageFactory implements SoapMessageFactory {
3434

3535
private final XMLInputFactory inputFactory = createXmlInputFactory();
3636

0 commit comments

Comments
 (0)