diff --git a/core/src/main/java/org/springframework/ws/client/WebServiceMessageCallback.java b/core/src/main/java/org/springframework/ws/client/core/WebServiceMessageCallback.java similarity index 75% rename from core/src/main/java/org/springframework/ws/client/WebServiceMessageCallback.java rename to core/src/main/java/org/springframework/ws/client/core/WebServiceMessageCallback.java index 35b6951c..58da80f8 100644 --- a/core/src/main/java/org/springframework/ws/client/WebServiceMessageCallback.java +++ b/core/src/main/java/org/springframework/ws/client/core/WebServiceMessageCallback.java @@ -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 SOAPAction header. + * * @author Arjen Poutsma */ public interface WebServiceMessageCallback { diff --git a/core/src/main/java/org/springframework/ws/client/WebServiceOperations.java b/core/src/main/java/org/springframework/ws/client/core/WebServiceOperations.java similarity index 94% rename from core/src/main/java/org/springframework/ws/client/WebServiceOperations.java rename to core/src/main/java/org/springframework/ws/client/core/WebServiceOperations.java index 3bcc9ff5..79e6fc51 100644 --- a/core/src/main/java/org/springframework/ws/client/WebServiceOperations.java +++ b/core/src/main/java/org/springframework/ws/client/core/WebServiceOperations.java @@ -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 { diff --git a/core/src/main/java/org/springframework/ws/client/WebServiceTemplate.java b/core/src/main/java/org/springframework/ws/client/core/WebServiceTemplate.java similarity index 93% rename from core/src/main/java/org/springframework/ws/client/WebServiceTemplate.java rename to core/src/main/java/org/springframework/ws/client/core/WebServiceTemplate.java index 85547e2c..dd8876e4 100644 --- a/core/src/main/java/org/springframework/ws/client/WebServiceTemplate.java +++ b/core/src/main/java/org/springframework/ws/client/core/WebServiceTemplate.java @@ -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; /** + * The central class for client-side Web services. It provides a message-driven approach to sending and + * receiving {@link org.springframework.ws.WebServiceMessage} instances. + *

+ * 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 { diff --git a/core/src/main/java/org/springframework/ws/client/core/package.html b/core/src/main/java/org/springframework/ws/client/core/package.html new file mode 100644 index 00000000..ee1a9f6a --- /dev/null +++ b/core/src/main/java/org/springframework/ws/client/core/package.html @@ -0,0 +1,5 @@ + + +Core package of the Spring-WS client-side support. Provides a WebServiceTemplate class and various callback interfaces. + + diff --git a/core/src/main/java/org/springframework/ws/client/support/WebServiceGatewaySupport.java b/core/src/main/java/org/springframework/ws/client/core/support/WebServiceGatewaySupport.java similarity index 90% rename from core/src/main/java/org/springframework/ws/client/support/WebServiceGatewaySupport.java rename to core/src/main/java/org/springframework/ws/client/core/support/WebServiceGatewaySupport.java index 143c46b3..2930fd8c 100644 --- a/core/src/main/java/org/springframework/ws/client/support/WebServiceGatewaySupport.java +++ b/core/src/main/java/org/springframework/ws/client/core/support/WebServiceGatewaySupport.java @@ -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. *

* 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 * WebServiceTemplate if WebServiceMessageFactory and WebServiceMessageSender are * passed in. *

* 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 Marshaller used by the gateway. Setting this property is only required if the marshalling * functionality of WebServiceTemplate 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 Unmarshaller used by the gateway. Setting this property is only required if the marshalling * functionality of WebServiceTemplate 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; diff --git a/core/src/main/java/org/springframework/ws/client/core/support/package.html b/core/src/main/java/org/springframework/ws/client/core/support/package.html new file mode 100644 index 00000000..90e5ef26 --- /dev/null +++ b/core/src/main/java/org/springframework/ws/client/core/support/package.html @@ -0,0 +1,6 @@ + + +Convenient super class for application classes that need Web service access. Contains a base class for +WebServiceTemplate usage. + + diff --git a/core/src/main/java/org/springframework/ws/client/package.html b/core/src/main/java/org/springframework/ws/client/package.html new file mode 100644 index 00000000..7f758e60 --- /dev/null +++ b/core/src/main/java/org/springframework/ws/client/package.html @@ -0,0 +1,5 @@ + + +Contains classes for client-side Spring-WS support, allowing for Spring-style Web service access. + + diff --git a/core/src/main/java/org/springframework/ws/client/support/WebServiceAccessor.java b/core/src/main/java/org/springframework/ws/client/support/WebServiceAccessor.java index f274db64..2eae7d34 100644 --- a/core/src/main/java/org/springframework/ws/client/support/WebServiceAccessor.java +++ b/core/src/main/java/org/springframework/ws/client/support/WebServiceAccessor.java @@ -28,10 +28,10 @@ import org.springframework.ws.transport.WebServiceMessageSender; * Base class for WebServiceTemplate and other WS-accessing helpers. Defines common properties like the * {@link org.springframework.ws.WebServiceMessageFactory} and {@link org.springframework.ws.transport.WebServiceMessageSender}. *

- * 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 { diff --git a/core/src/test/java/org/springframework/ws/client/WebServiceTemplateTest.java b/core/src/test/java/org/springframework/ws/client/core/WebServiceTemplateTest.java similarity index 99% rename from core/src/test/java/org/springframework/ws/client/WebServiceTemplateTest.java rename to core/src/test/java/org/springframework/ws/client/core/WebServiceTemplateTest.java index 09c14aea..44f2644c 100644 --- a/core/src/test/java/org/springframework/ws/client/WebServiceTemplateTest.java +++ b/core/src/test/java/org/springframework/ws/client/core/WebServiceTemplateTest.java @@ -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;