From 180caaaa2aed27bc920302b90153f0c67c4477de Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Sat, 8 Sep 2007 00:43:56 +0000 Subject: [PATCH] SWS-178 --- src/docbkx/common.xml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/docbkx/common.xml b/src/docbkx/common.xml index 6c80cd53..a5a9a9be 100644 --- a/src/docbkx/common.xml +++ b/src/docbkx/common.xml @@ -223,9 +223,8 @@
<interfacename>MessageContext</interfacename> - Typically, messages come in pairs: a request and a response. A request - is created on the client-side, which is sent over some transport to the - server-side, where a response is generated. This response gets + Typically, messages come in pairs: a request and a response. A request is created on the client-side, + which is sent over some transport to the server-side, where a response is generated. This response gets sent back to the client, where it is read. @@ -235,11 +234,33 @@ On the client-side, the message context is created by the WebServiceTemplate. On the server-side, the message context is read from the transport-specific input stream. - For example, in HTTP, it is read from the HttpServletRequest and the response is written back - to the HttpServletResponse. + For example, in HTTP, it is read from the HttpServletRequest and the + response is written back to the HttpServletResponse.
+
+ <interfacename>TransportContext</interfacename> + + One of the key properties of the SOAP protocol is that it tries to be transport-agnostic. This is why, for + instance, Spring-WS does not support mapping messages to endpoints by HTTP request URL, but + rather by mesage content. + + + However, sometimes it is necessary to get access to the underlying transport, either on the client or server + side. For this, Spring Web Services has the TransportContext. The transport + context allows access to the underlying WebServiceConnection, which typically + is a HttpServletConnection on the server side; or a + HttpUrlConnection or CommonsHttpConnection on the client side. + For example, you can obtain the IP address of the current request in a server-side endpoint or + interceptor like so: + + +
Handling XML With XPath