File tree Expand file tree Collapse file tree 6 files changed +20
-23
lines changed
core/src/main/java/org/springframework/ws
src/main/java/org/springframework/ws/transport Expand file tree Collapse file tree 6 files changed +20
-23
lines changed Original file line number Diff line number Diff line change 29
29
public interface WebServiceMessageFactory {
30
30
31
31
/**
32
- * Creates a new, empty {@link WebServiceMessage} .
32
+ * Creates a new, empty <code> WebServiceMessage</code> .
33
33
*
34
34
* @return the empty message
35
35
*/
@@ -38,8 +38,8 @@ public interface WebServiceMessageFactory {
38
38
/**
39
39
* Reads {@link WebServiceMessage} from the given input stream.
40
40
* <p/>
41
- * If the given stream is an instance of {@link org.springframework.ws.transport.TransportOutputStream
42
- * TransportOutputStream }, the headers will be read from the request.
41
+ * If the given stream is an instance of {@link org.springframework.ws.transport.TransportInputStream
42
+ * TransportInputStream }, the headers will be read from the request.
43
43
*
44
44
* @param inputStream the inputstream to read the message from
45
45
* @return the created message
Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ public abstract class TransformerObjectSupport {
42
42
43
43
private static TransformerFactory transformerFactory ;
44
44
45
+ static {
46
+ transformerFactory = TransformerFactory .newInstance ();
47
+ }
48
+
45
49
/**
46
50
* Creates a new <code>Transformer</code>. Must be called per request, as transformer is not thread-safe.
47
51
*
@@ -50,23 +54,7 @@ public abstract class TransformerObjectSupport {
50
54
* if thrown by JAXP methods
51
55
*/
52
56
protected final Transformer createTransformer () throws TransformerConfigurationException {
53
- if (transformerFactory == null ) {
54
- transformerFactory = createTransformerFactory ();
55
- }
56
57
return transformerFactory .newTransformer ();
57
58
}
58
59
59
- /**
60
- * Create a <code>TransformerFactory</code> that this endpoint will use to create <code>Transformer</code>s. Can be
61
- * overridden in subclasses, adding further initialization of the factory. The resulting
62
- * <code>TransformerFactory</code> is cached, so this method will only be called once.
63
- *
64
- * @return the created <code>TransformerFactory</code>
65
- * @throws TransformerFactoryConfigurationError
66
- * if thrown by JAXP methods
67
- */
68
- protected TransformerFactory createTransformerFactory () throws TransformerFactoryConfigurationError {
69
- return TransformerFactory .newInstance ();
70
- }
71
-
72
60
}
Original file line number Diff line number Diff line change 24
24
*/
25
25
public abstract class TransportContextHolder {
26
26
27
- private static final ThreadLocal transportContextHolder = new InheritableThreadLocal ();
27
+ private static final ThreadLocal transportContextHolder = new ThreadLocal ();
28
28
29
29
/**
30
30
* Associate the given <code>TransportContext</code> with the current thread.
Original file line number Diff line number Diff line change 15
15
<groupId >org.springframework.ws</groupId >
16
16
<artifactId >spring-ws-core</artifactId >
17
17
</dependency >
18
+ <dependency >
19
+ <groupId >org.springframework.ws</groupId >
20
+ <artifactId >spring-oxm</artifactId >
21
+ </dependency >
18
22
<!-- Spring dependencies -->
19
23
<dependency >
20
24
<groupId >org.springframework</groupId >
Original file line number Diff line number Diff line change 20
20
import org .springframework .ws .transport .WebServiceMessageSender ;
21
21
22
22
/**
23
+ * <code>WebServiceMessageSender</code> implementation that uses standard J2SE facilities to execute POST requests,
24
+ * without support for HTTP authentication or advanced configuration options.
25
+ *
23
26
* @author Arjen Poutsma
24
27
*/
25
28
public class SimpleHttpWebServiceMessageSender implements WebServiceMessageSender {
26
29
27
- public final WebServiceMessage send (WebServiceMessage message ) {
30
+ public WebServiceMessage send (WebServiceMessage message ) {
31
+
28
32
//TODO implement
29
33
throw new UnsupportedOperationException ("Not implemented" );
30
34
}
Original file line number Diff line number Diff line change 42
42
* @author Arjen Poutsma
43
43
*/
44
44
public class JmsTransportMessageListener implements MessageListener , InitializingBean {
45
+ // TODO: implemement SessionAwareMessageListener
45
46
46
47
private static final Log logger = LogFactory .getLog (JmsTransportMessageListener .class );
47
48
@@ -65,10 +66,10 @@ public void onMessage(Message message) {
65
66
handleTextMessage (textMessage );
66
67
}
67
68
catch (IOException ex ) {
68
- throw new JmsTransportException ("Could not create message: " + ex .getMessage (), ex );
69
+ logger . error ("Could not create message: " + ex .getMessage (), ex );
69
70
}
70
71
catch (Exception ex ) {
71
- throw new JmsTransportException ("Could not handle message: " + ex .getMessage (), ex );
72
+ logger . error ("Could not handle message: " + ex .getMessage (), ex );
72
73
}
73
74
}
74
75
else {
You can’t perform that action at this time.
0 commit comments