Refactored client-side support so that it matches the layout of other template packages.
This commit is contained in:
@@ -14,13 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.client;
|
||||
package org.springframework.ws.client.core;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.springframework.ws.WebServiceMessage;
|
||||
|
||||
/**
|
||||
* Generic callback interface for code that operates on a {@link WebServiceMessage}. Allows to execute any number of
|
||||
* operations on the message, for example set the contents of the message, or set the <code>SOAPAction</code> header.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
*/
|
||||
public interface WebServiceMessageCallback {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.client;
|
||||
package org.springframework.ws.client.core;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.xml.transform.Result;
|
||||
@@ -23,8 +23,11 @@ import javax.xml.transform.Source;
|
||||
import org.springframework.ws.WebServiceMessage;
|
||||
|
||||
/**
|
||||
* Specifies a basic set of Web service operations. Implemented by {@link WebServiceTemplate}. Not often used directly,
|
||||
* but a useful option to enhance testability, as it can easily be mocked or stubbed.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see org.springframework.ws.client.WebServiceTemplate
|
||||
* @see WebServiceTemplate
|
||||
*/
|
||||
public interface WebServiceOperations {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.client;
|
||||
package org.springframework.ws.client.core;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.xml.transform.Result;
|
||||
@@ -26,11 +26,18 @@ import org.springframework.oxm.Marshaller;
|
||||
import org.springframework.oxm.Unmarshaller;
|
||||
import org.springframework.ws.WebServiceMessage;
|
||||
import org.springframework.ws.WebServiceMessageFactory;
|
||||
import org.springframework.ws.client.WebServiceClientException;
|
||||
import org.springframework.ws.client.support.WebServiceAccessor;
|
||||
import org.springframework.ws.context.MessageContext;
|
||||
import org.springframework.ws.transport.WebServiceMessageSender;
|
||||
|
||||
/**
|
||||
* <strong>The central class for client-side Web services.</strong> It provides a message-driven approach to sending and
|
||||
* receiving {@link org.springframework.ws.WebServiceMessage} instances.
|
||||
* <p/>
|
||||
* Code using this class need only implement callback interfaces, provide {@link Source} objects to read data from, or
|
||||
* use the pluggable {@link Marshaller} support.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
*/
|
||||
public class WebServiceTemplate extends WebServiceAccessor implements WebServiceOperations {
|
||||
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
Core package of the Spring-WS client-side support. Provides a WebServiceTemplate class and various callback interfaces.
|
||||
</body>
|
||||
</html>
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.client.support;
|
||||
package org.springframework.ws.client.core.support;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -23,26 +23,26 @@ import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.oxm.Marshaller;
|
||||
import org.springframework.oxm.Unmarshaller;
|
||||
import org.springframework.ws.WebServiceMessageFactory;
|
||||
import org.springframework.ws.client.WebServiceTemplate;
|
||||
import org.springframework.ws.client.core.WebServiceTemplate;
|
||||
import org.springframework.ws.transport.WebServiceMessageSender;
|
||||
|
||||
/**
|
||||
* Convenient super class for application classes that need Web service access.
|
||||
* <p/>
|
||||
* Requires a {@link org.springframework.ws.WebServiceMessageFactory} and {@link org.springframework.ws.transport.WebServiceMessageSender},
|
||||
* or a {@link org.springframework.ws.client.WebServiceTemplate} instance to be set. It will create its own
|
||||
* or a {@link org.springframework.ws.client.core.WebServiceTemplate} instance to be set. It will create its own
|
||||
* <code>WebServiceTemplate</code> if <code>WebServiceMessageFactory</code> and <code>WebServiceMessageSender</code> are
|
||||
* passed in.
|
||||
* <p/>
|
||||
* In addition to the message factory and sender properties, this gateway offers {@link
|
||||
* org.springframework.oxm.Marshaller} and {@link org.springframework.oxm.Unmarshaller} properties. Setting these is
|
||||
* required when the {@link org.springframework.ws.client.WebServiceTemplate#marshalSendAndReceive(Object) marshalling
|
||||
* methods} of the template are to be used.
|
||||
* required when the {@link org.springframework.ws.client.core.WebServiceTemplate#marshalSendAndReceive(Object)
|
||||
* marshalling methods} of the template are to be used.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see #setMessageFactory(org.springframework.ws.WebServiceMessageFactory)
|
||||
* @see #setMessageSender(org.springframework.ws.transport.WebServiceMessageSender)
|
||||
* @see org.springframework.ws.client.WebServiceTemplate
|
||||
* @see org.springframework.ws.client.core.WebServiceTemplate
|
||||
* @see #setMarshaller(org.springframework.oxm.Marshaller)
|
||||
*/
|
||||
public abstract class WebServiceGatewaySupport implements InitializingBean {
|
||||
@@ -112,7 +112,7 @@ public abstract class WebServiceGatewaySupport implements InitializingBean {
|
||||
* Sets the <code>Marshaller</code> used by the gateway. Setting this property is only required if the marshalling
|
||||
* functionality of <code>WebServiceTemplate</code> is to be used.
|
||||
*
|
||||
* @see org.springframework.ws.client.WebServiceTemplate#marshalSendAndReceive
|
||||
* @see org.springframework.ws.client.core.WebServiceTemplate#marshalSendAndReceive
|
||||
*/
|
||||
public void setMarshaller(Marshaller marshaller) {
|
||||
this.marshaller = marshaller;
|
||||
@@ -129,7 +129,7 @@ public abstract class WebServiceGatewaySupport implements InitializingBean {
|
||||
* Sets the <code>Unmarshaller</code> used by the gateway. Setting this property is only required if the marshalling
|
||||
* functionality of <code>WebServiceTemplate</code> is to be used.
|
||||
*
|
||||
* @see org.springframework.ws.client.WebServiceTemplate#marshalSendAndReceive
|
||||
* @see org.springframework.ws.client.core.WebServiceTemplate#marshalSendAndReceive
|
||||
*/
|
||||
public final void setUnmarshaller(Unmarshaller unmarshaller) {
|
||||
this.unmarshaller = unmarshaller;
|
||||
@@ -0,0 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
Convenient super class for application classes that need Web service access. Contains a base class for
|
||||
WebServiceTemplate usage.
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
Contains classes for client-side Spring-WS support, allowing for Spring-style Web service access.
|
||||
</body>
|
||||
</html>
|
||||
@@ -28,10 +28,10 @@ import org.springframework.ws.transport.WebServiceMessageSender;
|
||||
* Base class for <code>WebServiceTemplate</code> and other WS-accessing helpers. Defines common properties like the
|
||||
* {@link org.springframework.ws.WebServiceMessageFactory} and {@link org.springframework.ws.transport.WebServiceMessageSender}.
|
||||
* <p/>
|
||||
* Not intended to be used directly. See {@link org.springframework.ws.client.WebServiceTemplate}.
|
||||
* Not intended to be used directly. See {@link org.springframework.ws.client.core.WebServiceTemplate}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see org.springframework.ws.client.WebServiceTemplate
|
||||
* @see org.springframework.ws.client.core.WebServiceTemplate
|
||||
*/
|
||||
public abstract class WebServiceAccessor extends TransformerObjectSupport implements InitializingBean {
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.client;
|
||||
package org.springframework.ws.client.core;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.xml.transform.Result;
|
||||
Reference in New Issue
Block a user