Fixing javadoc
This commit is contained in:
16
build.gradle
16
build.gradle
@@ -104,7 +104,7 @@ configure(subprojects) { subproject ->
|
||||
options.author = true
|
||||
options.header = project.name
|
||||
options.links(project.ext.javadocLinks)
|
||||
// options.addStringOption('Xdoclint:none', '-quiet')
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
|
||||
// suppress warnings due to cross-module @see and @link references;
|
||||
// note that global 'api' task does display all warnings.
|
||||
@@ -276,14 +276,22 @@ configure(rootProject) {
|
||||
group = 'Documentation'
|
||||
description = 'Generates aggregated Javadoc API documentation.'
|
||||
title = "${rootProject.description} ${version} API"
|
||||
|
||||
dependsOn {
|
||||
subprojects.collect {
|
||||
it.tasks.getByName("jar")
|
||||
}
|
||||
}
|
||||
|
||||
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
||||
options.author = true
|
||||
options.header = rootProject.description
|
||||
options.overview = 'src/api/overview.html'
|
||||
options.stylesheetFile = file("src/api/stylesheet.css")
|
||||
options.splitIndex = true
|
||||
options.links(
|
||||
'http://docs.jboss.org/jbossas/javadoc/4.0.5/connector'
|
||||
)
|
||||
options.links(project.ext.javadocLinks)
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
|
||||
source subprojects.collect { project ->
|
||||
project.sourceSets.main.allJava
|
||||
}
|
||||
|
||||
@@ -93,8 +93,8 @@ public class StroapMessageFactory implements SoapMessageFactory {
|
||||
/**
|
||||
* Create a {@code XMLInputFactory} that this message factory will use to create {@link
|
||||
* javax.xml.stream.XMLEventReader} objects.
|
||||
* <p/>
|
||||
* Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
*
|
||||
* <p>Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
* so this method will only be called once.
|
||||
*
|
||||
* @return the created factory
|
||||
@@ -106,8 +106,8 @@ public class StroapMessageFactory implements SoapMessageFactory {
|
||||
/**
|
||||
* Create a {@code XMLOutputFactory} that this message factory will use to create {@link
|
||||
* javax.xml.stream.XMLEventWriter} objects.
|
||||
* <p/>
|
||||
* Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
*
|
||||
* <p>Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
* so this method will only be called once.
|
||||
*
|
||||
* @return the created factory
|
||||
@@ -121,8 +121,8 @@ public class StroapMessageFactory implements SoapMessageFactory {
|
||||
/**
|
||||
* Create a {@code XMLEventFactory} that this message factory will use to create {@link
|
||||
* javax.xml.stream.events.XMLEvent} objects.
|
||||
* <p/>
|
||||
* Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
*
|
||||
* <p>Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
* so this method will only be called once.
|
||||
*
|
||||
* @return the created factory
|
||||
@@ -133,8 +133,8 @@ public class StroapMessageFactory implements SoapMessageFactory {
|
||||
|
||||
/**
|
||||
* Create a {@code DocumentBuilderFactory} that this message factory will use to create {@link org.w3c.dom.Document} objects.
|
||||
* <p/>
|
||||
* Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
*
|
||||
* <p>Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
* so this method will only be called once.
|
||||
*
|
||||
* @return the created factory
|
||||
|
||||
@@ -29,7 +29,7 @@ public interface FaultAwareWebServiceMessage extends WebServiceMessage {
|
||||
/**
|
||||
* Does this message have a fault?
|
||||
*
|
||||
* @return <code>true</code> if the message has a fault.
|
||||
* @return {@code true} if the message has a fault.
|
||||
* @see #getFaultReason()
|
||||
*/
|
||||
boolean hasFault();
|
||||
@@ -37,7 +37,7 @@ public interface FaultAwareWebServiceMessage extends WebServiceMessage {
|
||||
/**
|
||||
* Returns the fault reason message.
|
||||
*
|
||||
* @return the fault reason message, if any; returns <code>null</code> when no fault is present.
|
||||
* @return the fault reason message, if any; returns {@code null} when no fault is present.
|
||||
* @see #hasFault()
|
||||
*/
|
||||
String getFaultReason();
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.core.NestedRuntimeException;
|
||||
public abstract class WebServiceException extends NestedRuntimeException {
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>WebServiceException</code> class.
|
||||
* Create a new instance of the {@code WebServiceException} class.
|
||||
*
|
||||
* @param msg the detail message
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ public abstract class WebServiceException extends NestedRuntimeException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>WebServiceException</code> class.
|
||||
* Create a new instance of the {@code WebServiceException} class.
|
||||
*
|
||||
* @param msg the detail message
|
||||
* @param ex the root {@link Throwable exception}
|
||||
|
||||
@@ -23,7 +23,7 @@ import javax.xml.transform.Source;
|
||||
|
||||
/**
|
||||
* Represents a protocol-agnostic XML message.
|
||||
* <p/>
|
||||
*
|
||||
* <p>Contains methods that provide access to the payload of the message.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -34,8 +34,10 @@ import javax.xml.transform.Source;
|
||||
public interface WebServiceMessage {
|
||||
|
||||
/**
|
||||
* Returns the contents of the message as a {@link Source}. <p> Depending on the implementation, this can be
|
||||
* retrieved multiple times, or just a single time.
|
||||
* Returns the contents of the message as a {@link Source}.
|
||||
*
|
||||
* <p>Depending on the implementation, this can be retrieved multiple times, or just
|
||||
* a single time.
|
||||
*
|
||||
* @return the message contents
|
||||
*/
|
||||
@@ -43,10 +45,10 @@ public interface WebServiceMessage {
|
||||
|
||||
/**
|
||||
* Returns the contents of the message as a {@link Result}.
|
||||
* <p/>
|
||||
* Calling this method removes the current payload.
|
||||
* <p/>
|
||||
* Implementations that are read-only will throw an {@link UnsupportedOperationException}.
|
||||
*
|
||||
* <p>Calling this method removes the current payload.
|
||||
*
|
||||
* <p>Implementations that are read-only will throw an {@link UnsupportedOperationException}.
|
||||
*
|
||||
* @return the message contents
|
||||
* @throws UnsupportedOperationException if the message is read-only
|
||||
|
||||
@@ -24,12 +24,12 @@ package org.springframework.ws;
|
||||
*/
|
||||
public abstract class WebServiceMessageException extends WebServiceException {
|
||||
|
||||
/** Constructor for <code>WebServiceMessageException</code>. */
|
||||
/** Constructor for {@code WebServiceMessageException}. */
|
||||
public WebServiceMessageException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
/** Constructor for <code>WebServiceMessageException</code>. */
|
||||
/** Constructor for {@code WebServiceMessageException}. */
|
||||
public WebServiceMessageException(String msg, Throwable ex) {
|
||||
super(msg, ex);
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* The <code>WebServiceMessageFactory</code> serves as a factory for {@link org.springframework.ws.WebServiceMessage
|
||||
* The {@code WebServiceMessageFactory} serves as a factory for {@link org.springframework.ws.WebServiceMessage
|
||||
* WebServiceMessages}.
|
||||
* <p/>
|
||||
* <p>Allows the creation of empty messages, or messages based on <code>InputStream</code>s.
|
||||
*
|
||||
* <p>Allows the creation of empty messages, or messages based on {@code InputStream}s.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see org.springframework.ws.WebServiceMessage
|
||||
@@ -32,7 +32,7 @@ import java.io.InputStream;
|
||||
public interface WebServiceMessageFactory {
|
||||
|
||||
/**
|
||||
* Creates a new, empty <code>WebServiceMessage</code>.
|
||||
* Creates a new, empty {@code WebServiceMessage}.
|
||||
*
|
||||
* @return the empty message
|
||||
*/
|
||||
@@ -40,8 +40,8 @@ public interface WebServiceMessageFactory {
|
||||
|
||||
/**
|
||||
* Reads a {@link WebServiceMessage} from the given input stream.
|
||||
* <p/>
|
||||
* If the given stream is an instance of {@link org.springframework.ws.transport.TransportInputStream
|
||||
*
|
||||
* <p>If the given stream is an instance of {@link org.springframework.ws.transport.TransportInputStream
|
||||
* TransportInputStream}, the headers will be read from the request.
|
||||
*
|
||||
* @param inputStream the input stream to read the message from
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.ws.WebServiceException;
|
||||
public abstract class WebServiceClientException extends WebServiceException {
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>WebServiceClientException</code> class.
|
||||
* Create a new instance of the {@code WebServiceClientException} class.
|
||||
*
|
||||
* @param msg the detail message
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ public abstract class WebServiceClientException extends WebServiceException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>WebServiceClientException</code> class.
|
||||
* Create a new instance of the {@code WebServiceClientException} class.
|
||||
*
|
||||
* @param msg the detail message
|
||||
* @param ex the root {@link Throwable exception}
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.ws.client;
|
||||
import org.springframework.ws.FaultAwareWebServiceMessage;
|
||||
|
||||
/**
|
||||
* Thrown by <code>SimpleFaultMessageResolver</code> when the response message has a fault.
|
||||
* Thrown by {@code SimpleFaultMessageResolver} when the response message has a fault.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
@@ -28,14 +28,14 @@ public class WebServiceFaultException extends WebServiceClientException {
|
||||
|
||||
private final FaultAwareWebServiceMessage faultMessage;
|
||||
|
||||
/** Create a new instance of the <code>WebServiceFaultException</code> class. */
|
||||
/** Create a new instance of the {@code WebServiceFaultException} class. */
|
||||
public WebServiceFaultException(String msg) {
|
||||
super(msg);
|
||||
faultMessage = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>WebServiceFaultException</code> class.
|
||||
* Create a new instance of the {@code WebServiceFaultException} class.
|
||||
*
|
||||
* @param faultMessage the fault message
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.io.IOException;
|
||||
public class WebServiceIOException extends WebServiceClientException {
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>WebServiceIOException</code> class.
|
||||
* Create a new instance of the {@code WebServiceIOException} class.
|
||||
*
|
||||
* @param msg the detail message
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ public class WebServiceIOException extends WebServiceClientException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>WebServiceIOException</code> class.
|
||||
* Create a new instance of the {@code WebServiceIOException} class.
|
||||
*
|
||||
* @param msg the detail message
|
||||
* @param ex the root {@link IOException}
|
||||
|
||||
@@ -27,7 +27,7 @@ import javax.xml.transform.TransformerException;
|
||||
public class WebServiceTransformerException extends WebServiceClientException {
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>WebServiceTransformerException</code> class.
|
||||
* Create a new instance of the {@code WebServiceTransformerException} class.
|
||||
*
|
||||
* @param msg the detail message
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ public class WebServiceTransformerException extends WebServiceClientException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>WebServiceTransformerException</code> class.
|
||||
* Create a new instance of the {@code WebServiceTransformerException} class.
|
||||
*
|
||||
* @param msg the detail message
|
||||
* @param ex the root {@link Throwable exception}
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.ws.transport.TransportException;
|
||||
public class WebServiceTransportException extends WebServiceIOException {
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>WebServiceTransportException</code> class.
|
||||
* Create a new instance of the {@code WebServiceTransportException} class.
|
||||
*
|
||||
* @param msg the detail message
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ public class WebServiceTransportException extends WebServiceIOException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>WebServiceTransportException</code> class.
|
||||
* Create a new instance of the {@code WebServiceTransportException} class.
|
||||
*
|
||||
* @param msg the detail message
|
||||
* @param ex the root {@link TransportException}
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.ws.client.WebServiceFaultException;
|
||||
*/
|
||||
public class SimpleFaultMessageResolver implements FaultMessageResolver {
|
||||
|
||||
/** Throws a new <code>WebServiceFaultException</code>. */
|
||||
/** Throws a new {@code WebServiceFaultException}. */
|
||||
@Override
|
||||
public void resolveFault(WebServiceMessage message) {
|
||||
if (message instanceof FaultAwareWebServiceMessage) {
|
||||
|
||||
@@ -22,13 +22,13 @@ import javax.xml.transform.TransformerException;
|
||||
|
||||
/**
|
||||
* Callback interface for extracting a result object from a {@link javax.xml.transform.Source} instance.
|
||||
* <p/>
|
||||
* Used for output object creation in {@link WebServiceTemplate}. Alternatively, output sources can also be returned to
|
||||
*
|
||||
* <p>Used for output object creation in {@link WebServiceTemplate}. Alternatively, output sources can also be returned to
|
||||
* client code as-is. In case of a source as execution result, you will almost always want to implement a
|
||||
* <code>SourceExtractor</code>, to be able to read the message content in a managed fashion, with the connection still
|
||||
* {@code SourceExtractor}, to be able to read the message content in a managed fashion, with the connection still
|
||||
* open while reading the message.
|
||||
* <p/>
|
||||
* Implementations of this interface perform the actual work of extracting results, but don't need to worry about
|
||||
*
|
||||
* <p>Implementations of this interface perform the actual work of extracting results, but don't need to worry about
|
||||
* exception handling, or resource handling.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -38,10 +38,10 @@ import javax.xml.transform.TransformerException;
|
||||
public interface SourceExtractor<T> {
|
||||
|
||||
/**
|
||||
* Process the data in the given <code>Source</code>, creating a corresponding result object.
|
||||
* Process the data in the given {@code Source}, creating a corresponding result object.
|
||||
*
|
||||
* @param source the message payload to extract data from
|
||||
* @return an arbitrary result object, or <code>null</code> if none (the extractor will typically be stateful in the
|
||||
* @return an arbitrary result object, or {@code null} if none (the extractor will typically be stateful in the
|
||||
* latter case)
|
||||
* @throws IOException in case of I/O errors
|
||||
*/
|
||||
|
||||
@@ -23,9 +23,9 @@ import org.springframework.ws.WebServiceMessage;
|
||||
|
||||
/**
|
||||
* Generic callback interface for code that operates on a {@link WebServiceMessage}.
|
||||
* <p/>
|
||||
* Implementations can execute any number of operations on the message, such as set the contents of the message, or set
|
||||
* the <code>SOAPAction</code> header.
|
||||
*
|
||||
* <p>Implementations can execute any number of operations on the message, such as set the contents of the message, or set
|
||||
* the {@code SOAPAction} header.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
@@ -33,7 +33,7 @@ import org.springframework.ws.WebServiceMessage;
|
||||
public interface WebServiceMessageCallback {
|
||||
|
||||
/**
|
||||
* Execute any number of operations on the supplied <code>message</code>.
|
||||
* Execute any number of operations on the supplied {@code message}.
|
||||
*
|
||||
* @param message the message
|
||||
* @throws IOException in case of I/O errors
|
||||
|
||||
@@ -23,13 +23,13 @@ import org.springframework.ws.WebServiceMessage;
|
||||
|
||||
/**
|
||||
* Callback interface for extracting a result object from a {@link WebServiceMessage} instance.
|
||||
* <p/>
|
||||
* Used for output object creation in {@link WebServiceTemplate}. Alternatively, output messages can also be returned to
|
||||
*
|
||||
* <p>Used for output object creation in {@link WebServiceTemplate}. Alternatively, output messages can also be returned to
|
||||
* client code as-is. In case of a message as execution result, you will almost always want to implement a
|
||||
* <code>WebServiceMessageExtractor</code>, to be able to read the message in a managed fashion, with the connection
|
||||
* {@code WebServiceMessageExtractor}, to be able to read the message in a managed fashion, with the connection
|
||||
* still open while reading the message.
|
||||
* <p/>
|
||||
* Implementations of this interface perform the actual work of extracting results, but don't need to worry about
|
||||
*
|
||||
* <p>Implementations of this interface perform the actual work of extracting results, but don't need to worry about
|
||||
* exception handling, or resource handling.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -38,10 +38,10 @@ import org.springframework.ws.WebServiceMessage;
|
||||
public interface WebServiceMessageExtractor<T> {
|
||||
|
||||
/**
|
||||
* Process the data in the given <code>WebServiceMessage</code>, creating a corresponding result object.
|
||||
* Process the data in the given {@code WebServiceMessage}, creating a corresponding result object.
|
||||
*
|
||||
* @param message the message to extract data from (possibly a <code>SoapMessage</code>)
|
||||
* @return an arbitrary result object, or <code>null</code> if none (the extractor will typically be stateful in the
|
||||
* @param message the message to extract data from (possibly a {@code SoapMessage})
|
||||
* @return an arbitrary result object, or {@code null} if none (the extractor will typically be stateful in the
|
||||
* latter case)
|
||||
* @throws IOException in case of I/O errors
|
||||
* @throws TransformerException in case of transformation errors
|
||||
|
||||
@@ -34,13 +34,13 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that can be manipulated with the given callback, reading the result with a
|
||||
* <code>WebServiceMessageExtractor</code>.
|
||||
* <p/>
|
||||
* This will only work with a default uri specified!
|
||||
* {@code WebServiceMessageExtractor}.
|
||||
*
|
||||
* <p>This will only work with a default uri specified!
|
||||
*
|
||||
* @param requestCallback the requestCallback to be used for manipulating the request message
|
||||
* @param responseExtractor object that will extract results
|
||||
* @return an arbitrary result object, as returned by the <code>WebServiceMessageExtractor</code>
|
||||
* @return an arbitrary result object, as returned by the {@code WebServiceMessageExtractor}
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
*/
|
||||
<T> T sendAndReceive(WebServiceMessageCallback requestCallback, WebServiceMessageExtractor<T> responseExtractor)
|
||||
@@ -48,12 +48,12 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that can be manipulated with the given callback, reading the result with a
|
||||
* <code>WebServiceMessageExtractor</code>.
|
||||
* {@code WebServiceMessageExtractor}.
|
||||
*
|
||||
* @param uri the URI to send the message to
|
||||
* @param requestCallback the requestCallback to be used for manipulating the request message
|
||||
* @param responseExtractor object that will extract results
|
||||
* @return an arbitrary result object, as returned by the <code>WebServiceMessageExtractor</code>
|
||||
* @return an arbitrary result object, as returned by the {@code WebServiceMessageExtractor}
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
*/
|
||||
<T> T sendAndReceive(String uri,
|
||||
@@ -63,12 +63,12 @@ public interface WebServiceOperations {
|
||||
/**
|
||||
* Sends a web service message that can be manipulated with the given request callback, handling the response with a
|
||||
* response callback.
|
||||
* <p/>
|
||||
* This will only work with a default uri specified!
|
||||
*
|
||||
* <p>This will only work with a default uri specified!
|
||||
*
|
||||
* @param requestCallback the callback to be used for manipulating the request message
|
||||
* @param responseCallback the callback to be used for manipulating the response message
|
||||
* @return <code>true</code> if a response was received; <code>false</code> otherwise
|
||||
* @return {@code true} if a response was received; {@code false} otherwise
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
*/
|
||||
boolean sendAndReceive(WebServiceMessageCallback requestCallback, WebServiceMessageCallback responseCallback)
|
||||
@@ -81,7 +81,7 @@ public interface WebServiceOperations {
|
||||
* @param uri the URI to send the message to
|
||||
* @param requestCallback the callback to be used for manipulating the request message
|
||||
* @param responseCallback the callback to be used for manipulating the response message
|
||||
* @return <code>true</code> if a response was received; <code>false</code> otherwise
|
||||
* @return {@code true} if a response was received; {@code false} otherwise
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
*/
|
||||
boolean sendAndReceive(String uri,
|
||||
@@ -94,12 +94,12 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that contains the given payload, marshalled by the configured
|
||||
* <code>Marshaller</code>. Returns the unmarshalled payload of the response message, if any.
|
||||
* <p/>
|
||||
* This will only work with a default uri specified!
|
||||
* {@code Marshaller}. Returns the unmarshalled payload of the response message, if any.
|
||||
*
|
||||
* <p>This will only work with a default uri specified!
|
||||
*
|
||||
* @param requestPayload the object to marshal into the request message payload
|
||||
* @return the unmarshalled payload of the response message, or <code>null</code> if no response is given
|
||||
* @return the unmarshalled payload of the response message, or {@code null} if no response is given
|
||||
* @throws XmlMappingException if there is a problem marshalling or unmarshalling
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
* @see WebServiceTemplate#setMarshaller(org.springframework.oxm.Marshaller)
|
||||
@@ -109,11 +109,11 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that contains the given payload, marshalled by the configured
|
||||
* <code>Marshaller</code>. Returns the unmarshalled payload of the response message, if any.
|
||||
* {@code Marshaller}. Returns the unmarshalled payload of the response message, if any.
|
||||
*
|
||||
* @param uri the URI to send the message to
|
||||
* @param requestPayload the object to marshal into the request message payload
|
||||
* @return the unmarshalled payload of the response message, or <code>null</code> if no response is given
|
||||
* @return the unmarshalled payload of the response message, or {@code null} if no response is given
|
||||
* @throws XmlMappingException if there is a problem marshalling or unmarshalling
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
* @see WebServiceTemplate#setMarshaller(org.springframework.oxm.Marshaller)
|
||||
@@ -124,14 +124,14 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that contains the given payload, marshalled by the configured
|
||||
* <code>Marshaller</code>. Returns the unmarshalled payload of the response message, if any. The given callback
|
||||
* {@code Marshaller}. Returns the unmarshalled payload of the response message, if any. The given callback
|
||||
* allows changing of the request message after the payload has been marshalled to it.
|
||||
* <p/>
|
||||
* This will only work with a default uri specified!
|
||||
*
|
||||
* <p>This will only work with a default uri specified!
|
||||
*
|
||||
* @param requestPayload the object to marshal into the request message payload
|
||||
* @param requestCallback callback to change message, can be <code>null</code>
|
||||
* @return the unmarshalled payload of the response message, or <code>null</code> if no response is given
|
||||
* @param requestCallback callback to change message, can be {@code null}
|
||||
* @return the unmarshalled payload of the response message, or {@code null} if no response is given
|
||||
* @throws XmlMappingException if there is a problem marshalling or unmarshalling
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
* @see WebServiceTemplate#setMarshaller(org.springframework.oxm.Marshaller)
|
||||
@@ -142,13 +142,13 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that contains the given payload, marshalled by the configured
|
||||
* <code>Marshaller</code>. Returns the unmarshalled payload of the response message, if any. The given callback
|
||||
* {@code Marshaller}. Returns the unmarshalled payload of the response message, if any. The given callback
|
||||
* allows changing of the request message after the payload has been marshalled to it.
|
||||
*
|
||||
* @param uri the URI to send the message to
|
||||
* @param requestPayload the object to marshal into the request message payload
|
||||
* @param requestCallback callback to change message, can be <code>null</code>
|
||||
* @return the unmarshalled payload of the response message, or <code>null</code> if no response is given
|
||||
* @param requestCallback callback to change message, can be {@code null}
|
||||
* @return the unmarshalled payload of the response message, or {@code null} if no response is given
|
||||
* @throws XmlMappingException if there is a problem marshalling or unmarshalling
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
* @see WebServiceTemplate#setMarshaller(org.springframework.oxm.Marshaller)
|
||||
@@ -163,13 +163,13 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that contains the given payload, reading the result with a
|
||||
* <code>SourceExtractor</code>.
|
||||
* <p/>
|
||||
* This will only work with a default uri specified!
|
||||
* {@code SourceExtractor}.
|
||||
*
|
||||
* <p>This will only work with a default uri specified!
|
||||
*
|
||||
* @param requestPayload the payload of the request message
|
||||
* @param responseExtractor object that will extract results
|
||||
* @return an arbitrary result object, as returned by the <code>SourceExtractor</code>
|
||||
* @return an arbitrary result object, as returned by the {@code SourceExtractor}
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
*/
|
||||
<T> T sendSourceAndReceive(Source requestPayload, SourceExtractor<T> responseExtractor)
|
||||
@@ -177,12 +177,12 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that contains the given payload, reading the result with a
|
||||
* <code>SourceExtractor</code>.
|
||||
* {@code SourceExtractor}.
|
||||
*
|
||||
* @param uri the URI to send the message to
|
||||
* @param requestPayload the payload of the request message
|
||||
* @param responseExtractor object that will extract results
|
||||
* @return an arbitrary result object, as returned by the <code>SourceExtractor</code>
|
||||
* @return an arbitrary result object, as returned by the {@code SourceExtractor}
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
*/
|
||||
<T> T sendSourceAndReceive(String uri, Source requestPayload, SourceExtractor<T> responseExtractor)
|
||||
@@ -190,16 +190,16 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that contains the given payload, reading the result with a
|
||||
* <code>SourceExtractor</code>.
|
||||
* <p/>
|
||||
* The given callback allows changing of the request message after the payload has been written to it.
|
||||
* <p/>
|
||||
* This will only work with a default uri specified!
|
||||
* {@code SourceExtractor}.
|
||||
*
|
||||
* <p>The given callback allows changing of the request message after the payload has been written to it.
|
||||
*
|
||||
* <p>This will only work with a default uri specified!
|
||||
*
|
||||
* @param requestPayload the payload of the request message
|
||||
* @param requestCallback callback to change message, can be <code>null</code>
|
||||
* @param requestCallback callback to change message, can be {@code null}
|
||||
* @param responseExtractor object that will extract results
|
||||
* @return an arbitrary result object, as returned by the <code>SourceExtractor</code>
|
||||
* @return an arbitrary result object, as returned by the {@code SourceExtractor}
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
*/
|
||||
<T> T sendSourceAndReceive(Source requestPayload,
|
||||
@@ -208,15 +208,15 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that contains the given payload, reading the result with a
|
||||
* <code>SourceExtractor</code>.
|
||||
* <p/>
|
||||
* The given callback allows changing of the request message after the payload has been written to it.
|
||||
* {@code SourceExtractor}.
|
||||
*
|
||||
* <p>The given callback allows changing of the request message after the payload has been written to it.
|
||||
*
|
||||
* @param uri the URI to send the message to
|
||||
* @param requestPayload the payload of the request message
|
||||
* @param requestCallback callback to change message, can be <code>null</code>
|
||||
* @param requestCallback callback to change message, can be {@code null}
|
||||
* @param responseExtractor object that will extract results
|
||||
* @return an arbitrary result object, as returned by the <code>SourceExtractor</code>
|
||||
* @return an arbitrary result object, as returned by the {@code SourceExtractor}
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
*/
|
||||
<T> T sendSourceAndReceive(String uri,
|
||||
@@ -230,25 +230,25 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that contains the given payload. Writes the response, if any, to the given
|
||||
* <code>Result</code>.
|
||||
* <p/>
|
||||
* This will only work with a default uri specified!
|
||||
* {@code Result}.
|
||||
*
|
||||
* <p>This will only work with a default uri specified!
|
||||
*
|
||||
* @param requestPayload the payload of the request message
|
||||
* @param responseResult the result to write the response payload to
|
||||
* @return <code>true</code> if a response was received; <code>false</code> otherwise
|
||||
* @return {@code true} if a response was received; {@code false} otherwise
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
*/
|
||||
boolean sendSourceAndReceiveToResult(Source requestPayload, Result responseResult) throws WebServiceClientException;
|
||||
|
||||
/**
|
||||
* Sends a web service message that contains the given payload. Writes the response, if any, to the given
|
||||
* <code>Result</code>.
|
||||
* {@code Result}.
|
||||
*
|
||||
* @param uri the URI to send the message to
|
||||
* @param requestPayload the payload of the request message
|
||||
* @param responseResult the result to write the response payload to
|
||||
* @return <code>true</code> if a response was received; <code>false</code> otherwise
|
||||
* @return {@code true} if a response was received; {@code false} otherwise
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
*/
|
||||
boolean sendSourceAndReceiveToResult(String uri, Source requestPayload, Result responseResult)
|
||||
@@ -256,16 +256,16 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that contains the given payload. Writes the response, if any, to the given
|
||||
* <code>Result</code>.
|
||||
* <p/>
|
||||
* The given callback allows changing of the request message after the payload has been written to it.
|
||||
* <p/>
|
||||
* This will only work with a default uri specified!
|
||||
* {@code Result}.
|
||||
*
|
||||
* <p>The given callback allows changing of the request message after the payload has been written to it.
|
||||
*
|
||||
* <p>This will only work with a default uri specified!
|
||||
*
|
||||
* @param requestPayload the payload of the request message
|
||||
* @param requestCallback callback to change message, can be <code>null</code>
|
||||
* @param requestCallback callback to change message, can be {@code null}
|
||||
* @param responseResult the result to write the response payload to
|
||||
* @return <code>true</code> if a response was received; <code>false</code> otherwise
|
||||
* @return {@code true} if a response was received; {@code false} otherwise
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
*/
|
||||
boolean sendSourceAndReceiveToResult(Source requestPayload,
|
||||
@@ -274,15 +274,15 @@ public interface WebServiceOperations {
|
||||
|
||||
/**
|
||||
* Sends a web service message that contains the given payload. Writes the response, if any, to the given
|
||||
* <code>Result</code>.
|
||||
* <p/>
|
||||
* The given callback allows changing of the request message after the payload has been written to it.
|
||||
* {@code Result}.
|
||||
*
|
||||
* <p>The given callback allows changing of the request message after the payload has been written to it.
|
||||
*
|
||||
* @param uri the URI to send the message to
|
||||
* @param requestPayload the payload of the request message
|
||||
* @param requestCallback callback to change message, can be <code>null</code>
|
||||
* @param requestCallback callback to change message, can be {@code null}
|
||||
* @param responseResult the result to write the response payload to
|
||||
* @return <code>true</code> if a response was received; <code>false</code> otherwise
|
||||
* @return {@code true} if a response was received; {@code false} otherwise
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
*/
|
||||
boolean sendSourceAndReceiveToResult(String uri,
|
||||
|
||||
@@ -62,33 +62,33 @@ import org.springframework.ws.transport.support.TransportUtils;
|
||||
/**
|
||||
* <strong>The central class for client-side Web services.</strong> It provides a message-driven approach to sending and
|
||||
* receiving {@link WebServiceMessage} instances.
|
||||
* <p/>
|
||||
* Code using this class need only implement callback interfaces, provide {@link Source} objects to read data from, or
|
||||
*
|
||||
* <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. For invoking the {@link #marshalSendAndReceive marshalling methods},
|
||||
* the {@link #setMarshaller(Marshaller) marshaller} and {@link #setUnmarshaller(Unmarshaller) unmarshaller} properties
|
||||
* must be set.
|
||||
* <p/>
|
||||
* This template uses a {@link SoapFaultMessageResolver} to handle fault response messages. Another {@link
|
||||
*
|
||||
* <p>This template uses a {@link SoapFaultMessageResolver} to handle fault response messages. Another {@link
|
||||
* FaultMessageResolver} can be defined with with {@link #setFaultMessageResolver(FaultMessageResolver)
|
||||
* faultMessageResolver} property. If this property is set to <code>null</code>, no fault resolving is performed.
|
||||
* <p/>
|
||||
* This template uses the following algorithm for sending and receiving. <ol> <li>Call {@link #createConnection(URI)
|
||||
* faultMessageResolver} property. If this property is set to {@code null}, no fault resolving is performed.
|
||||
*
|
||||
* <p>This template uses the following algorithm for sending and receiving. <ol> <li>Call {@link #createConnection(URI)
|
||||
* createConnection()}.</li> <li>Call {@link WebServiceMessageFactory#createWebServiceMessage()
|
||||
* createWebServiceMessage()} on the registered message factory to create a request message.</li> <li>Invoke {@link
|
||||
* WebServiceMessageCallback#doWithMessage(WebServiceMessage) doWithMessage()} on the request callback, if any. This
|
||||
* step stores content in the request message, based on <code>Source</code>, marshalling, etc.</li> <li>Invoke {@link
|
||||
* step stores content in the request message, based on {@code Source}, marshalling, etc.</li> <li>Invoke {@link
|
||||
* ClientInterceptor#handleRequest(MessageContext) handleRequest()} on the registered {@link
|
||||
* #setInterceptors(ClientInterceptor[]) interceptors}. Interceptors are executed in order. If any of the interceptors
|
||||
* creates a response message in the message context, skip to step 7.</li> <li>Call {@link
|
||||
* WebServiceConnection#send(WebServiceMessage) send()} on the connection.</li> <li>Call {@link
|
||||
* #hasError(WebServiceConnection,WebServiceMessage) hasError()} to check if the connection has an error. For an HTTP
|
||||
* transport, a status code other than <code>2xx</code> indicates an error. However, since a status code of 500 can also
|
||||
* transport, a status code other than {@code 2xx} indicates an error. However, since a status code of 500 can also
|
||||
* indicate a SOAP fault, the template verifies whether the error is not a fault.</li> <ul> <li>If the connection has an
|
||||
* error, call the {@link #handleError handleError()} method, which by default throws a {@link
|
||||
* WebServiceTransportException}.</li> <li>If the connection has no error, continue with the next step.</li> </ul>
|
||||
* <li>Invoke {@link WebServiceConnection#receive(WebServiceMessageFactory) receive} on the connection to read the
|
||||
* response message, if any.</li> <ul> <li>If no response was received, return <code>null</code> or
|
||||
* <code>false</code></li> <li>Call {@link #hasFault(WebServiceConnection,WebServiceMessage) hasFault()} to determine
|
||||
* response message, if any.</li> <ul> <li>If no response was received, return {@code null} or
|
||||
* {@code false}</li> <li>Call {@link #hasFault(WebServiceConnection,WebServiceMessage) hasFault()} to determine
|
||||
* whether the response has a fault. If it has, call {@link ClientInterceptor#handleFault(MessageContext)} and the
|
||||
* {@link #handleFault handleFault()} method.</li> <li>Otherwise, invoke {@link ClientInterceptor#handleResponse(MessageContext)}
|
||||
* and {@link WebServiceMessageExtractor#extractData(WebServiceMessage) extractData()} on the response extractor, or
|
||||
@@ -125,13 +125,13 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
|
||||
private DestinationProvider destinationProvider;
|
||||
|
||||
/** Creates a new <code>WebServiceTemplate</code> using default settings. */
|
||||
/** Creates a new {@code WebServiceTemplate} using default settings. */
|
||||
public WebServiceTemplate() {
|
||||
initDefaultStrategies();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>WebServiceTemplate</code> based on the given message factory.
|
||||
* Creates a new {@code WebServiceTemplate} based on the given message factory.
|
||||
*
|
||||
* @param messageFactory the message factory to use
|
||||
*/
|
||||
@@ -141,15 +141,15 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>WebServiceTemplate</code> with the given marshaller. If the given {@link
|
||||
* Creates a new {@code WebServiceTemplate} with the given marshaller. If the given {@link
|
||||
* Marshaller} also implements the {@link Unmarshaller} interface, it is used for both marshalling and
|
||||
* unmarshalling. Otherwise, an exception is thrown.
|
||||
* <p/>
|
||||
* Note that all {@link Marshaller} implementations in Spring also implement the {@link Unmarshaller} interface,
|
||||
*
|
||||
* <p>Note that all {@link Marshaller} implementations in Spring also implement the {@link Unmarshaller} interface,
|
||||
* so that you can safely use this constructor.
|
||||
*
|
||||
* @param marshaller object used as marshaller and unmarshaller
|
||||
* @throws IllegalArgumentException when <code>marshaller</code> does not implement the {@link Unmarshaller}
|
||||
* @throws IllegalArgumentException when {@code marshaller} does not implement the {@link Unmarshaller}
|
||||
* interface
|
||||
* @since 2.0.3
|
||||
*/
|
||||
@@ -168,7 +168,7 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>MarshallingMethodEndpointAdapter</code> with the given marshaller and unmarshaller.
|
||||
* Creates a new {@code MarshallingMethodEndpointAdapter} with the given marshaller and unmarshaller.
|
||||
*
|
||||
* @param marshaller the marshaller to use
|
||||
* @param unmarshaller the unmarshaller to use
|
||||
@@ -195,8 +195,8 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
|
||||
/**
|
||||
* Set the default URI to be used on operations that do not have a URI parameter.
|
||||
* <p/>
|
||||
* Typically, either this property is set, or {@link #setDestinationProvider(DestinationProvider)}, but not both.
|
||||
*
|
||||
* <p>Typically, either this property is set, or {@link #setDestinationProvider(DestinationProvider)}, but not both.
|
||||
*
|
||||
* @see #marshalSendAndReceive(Object)
|
||||
* @see #marshalSendAndReceive(Object,WebServiceMessageCallback)
|
||||
@@ -222,8 +222,8 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
|
||||
/**
|
||||
* Set the destination provider URI to be used on operations that do not have a URI parameter.
|
||||
* <p/>
|
||||
* Typically, either this property is set, or {@link #setDefaultUri(String)}, but not both.
|
||||
*
|
||||
* <p>Typically, either this property is set, or {@link #setDefaultUri(String)}, but not both.
|
||||
*
|
||||
* @see #marshalSendAndReceive(Object)
|
||||
* @see #marshalSendAndReceive(Object,WebServiceMessageCallback)
|
||||
@@ -264,7 +264,7 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
|
||||
/**
|
||||
* Sets the fault resolver for this template. Default is the
|
||||
* {@link org.springframework.ws.soap.client.core.SoapFaultMessageResolver, SoapFaultMessageResolver}, but may be
|
||||
* {@link org.springframework.ws.soap.client.core.SoapFaultMessageResolver SoapFaultMessageResolver}, but may be
|
||||
* set to {@code null} to disable fault handling.
|
||||
*/
|
||||
public void setFaultMessageResolver(FaultMessageResolver faultMessageResolver) {
|
||||
@@ -273,12 +273,12 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
|
||||
/**
|
||||
* Indicates whether the {@linkplain WebServiceConnection#hasError() connection} should be checked for error
|
||||
* indicators (<code>true</code>), or whether these should be ignored (<code>false</code>). The default is
|
||||
* <code>true</code>.
|
||||
* <p/>
|
||||
* When using an HTTP transport, this property defines whether to check the HTTP response status code is in the 2xx
|
||||
* indicators ({@code true}), or whether these should be ignored ({@code false}). The default is
|
||||
* {@code true}.
|
||||
*
|
||||
* <p>When using an HTTP transport, this property defines whether to check the HTTP response status code is in the 2xx
|
||||
* Successful range. Both the SOAP specification and the WS-I Basic Profile define that a Web service must return a
|
||||
* "200 OK" or "202 Accepted" HTTP status code for a normal response. Setting this property to <code>false</code>
|
||||
* "200 OK" or "202 Accepted" HTTP status code for a normal response. Setting this property to {@code false}
|
||||
* allows this template to deal with non-conforming services.
|
||||
*
|
||||
* @see #hasError(WebServiceConnection, WebServiceMessage)
|
||||
@@ -292,13 +292,13 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
|
||||
/**
|
||||
* Indicates whether the {@linkplain FaultAwareWebServiceConnection#hasFault() connection} should be checked for
|
||||
* fault indicators (<code>true</code>), or whether we should rely on the {@link
|
||||
* FaultAwareWebServiceMessage#hasFault() message} only (<code>false</code>). The default is <code>true</code>.
|
||||
* <p/>
|
||||
* When using an HTTP transport, this property defines whether to check the HTTP response status code for fault
|
||||
* fault indicators ({@code true}), or whether we should rely on the {@link
|
||||
* FaultAwareWebServiceMessage#hasFault() message} only ({@code false}). The default is {@code true}.
|
||||
*
|
||||
* <p>When using an HTTP transport, this property defines whether to check the HTTP response status code for fault
|
||||
* indicators. Both the SOAP specification and the WS-I Basic Profile define that a Web service must return a "500
|
||||
* Internal Server Error" HTTP status code if the response envelope is a Fault. Setting this property to
|
||||
* <code>false</code> allows this template to deal with non-conforming services.
|
||||
* {@code false} allows this template to deal with non-conforming services.
|
||||
*
|
||||
* @see #hasFault(WebServiceConnection,WebServiceMessage)
|
||||
* @see <a href="http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383529">SOAP 1.1 specification</a>
|
||||
@@ -312,7 +312,7 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
/**
|
||||
* Returns the client interceptors to apply to all web service invocations made by this template.
|
||||
*
|
||||
* @return array of endpoint interceptors, or <code>null</code> if none
|
||||
* @return array of endpoint interceptors, or {@code null} if none
|
||||
*/
|
||||
public ClientInterceptor[] getInterceptors() {
|
||||
return interceptors;
|
||||
@@ -321,7 +321,7 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
/**
|
||||
* Sets the client interceptors to apply to all web service invocations made by this template.
|
||||
*
|
||||
* @param interceptors array of endpoint interceptors, or <code>null</code> if none
|
||||
* @param interceptors array of endpoint interceptors, or {@code null} if none
|
||||
*/
|
||||
public final void setInterceptors(ClientInterceptor[] interceptors) {
|
||||
this.interceptors = interceptors;
|
||||
@@ -575,7 +575,7 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
* @param connection the connection to use
|
||||
* @param requestCallback the requestCallback to be used for manipulating the request message
|
||||
* @param responseExtractor object that will extract results
|
||||
* @return an arbitrary result object, as returned by the <code>WebServiceMessageExtractor</code>
|
||||
* @return an arbitrary result object, as returned by the {@code WebServiceMessageExtractor}
|
||||
* @throws WebServiceClientException if there is a problem sending or receiving the message
|
||||
* @throws IOException in case of I/O errors
|
||||
*/
|
||||
@@ -656,13 +656,13 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
|
||||
/**
|
||||
* Determines whether the given connection or message context has an error.
|
||||
* <p/>
|
||||
* This implementation checks the {@link WebServiceConnection#hasError() connection} first. If it indicates an
|
||||
*
|
||||
* <p>This implementation checks the {@link WebServiceConnection#hasError() connection} first. If it indicates an
|
||||
* error, it makes sure that it is not a {@link FaultAwareWebServiceConnection#hasFault() fault}.
|
||||
*
|
||||
* @param connection the connection (possibly a {@link FaultAwareWebServiceConnection}
|
||||
* @param request the response message (possibly a {@link FaultAwareWebServiceMessage}
|
||||
* @return <code>true</code> if the connection has an error; <code>false</code> otherwise
|
||||
* @return {@code true} if the connection has an error; {@code false} otherwise
|
||||
* @throws IOException in case of I/O errors
|
||||
*/
|
||||
protected boolean hasError(WebServiceConnection connection, WebServiceMessage request) throws IOException {
|
||||
@@ -722,14 +722,14 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
|
||||
/**
|
||||
* Determines whether the given connection or message has a fault.
|
||||
* <p/>
|
||||
* This implementation checks the {@link FaultAwareWebServiceConnection#hasFault() connection} if the {@link
|
||||
*
|
||||
* <p>This implementation checks the {@link FaultAwareWebServiceConnection#hasFault() connection} if the {@link
|
||||
* #setCheckConnectionForFault(boolean) checkConnectionForFault} property is true, and defaults to the {@link
|
||||
* FaultAwareWebServiceMessage#hasFault() message} otherwise.
|
||||
*
|
||||
* @param connection the connection (possibly a {@link FaultAwareWebServiceConnection}
|
||||
* @param response the response message (possibly a {@link FaultAwareWebServiceMessage}
|
||||
* @return <code>true</code> if either the connection or the message has a fault; <code>false</code> otherwise
|
||||
* @return {@code true} if either the connection or the message has a fault; {@code false} otherwise
|
||||
* @throws IOException in case of I/O errors
|
||||
*/
|
||||
protected boolean hasFault(WebServiceConnection connection, WebServiceMessage response) throws IOException {
|
||||
@@ -750,8 +750,8 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
|
||||
/**
|
||||
* Trigger handleResponse on the defined ClientInterceptors. Will just invoke said method on all interceptors whose
|
||||
* handleRequest invocation returned <code>true</code>, in addition to the last interceptor who returned
|
||||
* <code>false</code>.
|
||||
* handleRequest invocation returned {@code true}, in addition to the last interceptor who returned
|
||||
* {@code false}.
|
||||
*
|
||||
* @param interceptorIndex index of last interceptor that was called
|
||||
* @param messageContext the message context, whose request and response are filled
|
||||
@@ -770,8 +770,8 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
|
||||
/**
|
||||
* Trigger handleFault on the defined ClientInterceptors. Will just invoke said method on all interceptors whose
|
||||
* handleRequest invocation returned <code>true</code>, in addition to the last interceptor who returned
|
||||
* <code>false</code>.
|
||||
* handleRequest invocation returned {@code true}, in addition to the last interceptor who returned
|
||||
* {@code false}.
|
||||
*
|
||||
* @param interceptorIndex index of last interceptor that was called
|
||||
* @param messageContext the message context, whose request and response are filled
|
||||
@@ -792,10 +792,10 @@ public class WebServiceTemplate extends WebServiceAccessor implements WebService
|
||||
* Trigger afterCompletion callbacks on the mapped ClientInterceptors. Will just
|
||||
* invoke afterCompletion for all interceptors whose handleRequest invocation has
|
||||
* successfully completed and returned true, in addition to the last interceptor who
|
||||
* returned <code>false</code>.
|
||||
* returned {@code false}.
|
||||
* @param mappedEndpoint the mapped EndpointInvocationChain
|
||||
* @param interceptorIndex index of last interceptor that successfully completed
|
||||
* @param ex Exception thrown on handler execution, or <code>null</code> if none
|
||||
* @param ex Exception thrown on handler execution, or {@code null} if none
|
||||
* @see ClientInterceptor#afterCompletion
|
||||
*/
|
||||
private void triggerAfterCompletion(int interceptorIndex,
|
||||
|
||||
@@ -31,15 +31,15 @@ import org.springframework.ws.transport.WebServiceMessageSender;
|
||||
|
||||
/**
|
||||
* Convenient super class for application classes that need Web service access.
|
||||
* <p/>
|
||||
* Requires a {@link WebServiceMessageFactory} or a {@link WebServiceTemplate} instance to be set. It will create its
|
||||
* own <code>WebServiceTemplate</code> if <code>WebServiceMessageFactory</code> is passed in.
|
||||
* <p/>
|
||||
* In addition to the message factory property, this gateway offers {@link Marshaller} and {@link Unmarshaller}
|
||||
*
|
||||
* <p>Requires a {@link WebServiceMessageFactory} or a {@link WebServiceTemplate} instance to be set. It will create its
|
||||
* own {@code WebServiceTemplate} if {@code WebServiceMessageFactory} is passed in.
|
||||
*
|
||||
* <p>In addition to the message factory property, this gateway offers {@link Marshaller} and {@link Unmarshaller}
|
||||
* properties. Setting these is required when the {@link WebServiceTemplate#marshalSendAndReceive(Object) marshalling
|
||||
* methods} of the template are to be used.
|
||||
* <p/>
|
||||
* Note that when {@link #setWebServiceTemplate(WebServiceTemplate) injecting a <code>WebServiceTemplate</code>}
|
||||
*
|
||||
* <p>Note that when {@link #setWebServiceTemplate(WebServiceTemplate) injecting a {@code WebServiceTemplate}}
|
||||
* directly, the convenience setters ({@link #setMarshaller(Marshaller)}, {@link #setUnmarshaller(Unmarshaller)}, {@link
|
||||
* #setMessageSender(WebServiceMessageSender)}, {@link #setMessageSenders(WebServiceMessageSender[])}, and {@link
|
||||
* #setDefaultUri(String)}) should not be used on this class, but on the template directly.
|
||||
@@ -58,15 +58,15 @@ public abstract class WebServiceGatewaySupport implements InitializingBean {
|
||||
private WebServiceTemplate webServiceTemplate;
|
||||
|
||||
/**
|
||||
* Creates a new instance of the <code>WebServiceGatewaySupport</code> class, with a default
|
||||
* <code>WebServiceTemplate</code>.
|
||||
* Creates a new instance of the {@code WebServiceGatewaySupport} class, with a default
|
||||
* {@code WebServiceTemplate}.
|
||||
*/
|
||||
protected WebServiceGatewaySupport() {
|
||||
webServiceTemplate = new WebServiceTemplate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>WebServiceGatewaySupport</code> instance based on the given message factory.
|
||||
* Creates a new {@code WebServiceGatewaySupport} instance based on the given message factory.
|
||||
*
|
||||
* @param messageFactory the message factory to use
|
||||
*/
|
||||
@@ -74,12 +74,12 @@ public abstract class WebServiceGatewaySupport implements InitializingBean {
|
||||
webServiceTemplate = new WebServiceTemplate(messageFactory);
|
||||
}
|
||||
|
||||
/** Returns the <code>WebServiceMessageFactory</code> used by the gateway. */
|
||||
/** Returns the {@code WebServiceMessageFactory} used by the gateway. */
|
||||
public final WebServiceMessageFactory getMessageFactory() {
|
||||
return webServiceTemplate.getMessageFactory();
|
||||
}
|
||||
|
||||
/** Set the <code>WebServiceMessageFactory</code> to be used by the gateway. */
|
||||
/** Set the {@code WebServiceMessageFactory} to be used by the gateway. */
|
||||
public final void setMessageFactory(WebServiceMessageFactory messageFactory) {
|
||||
webServiceTemplate.setMessageFactory(messageFactory);
|
||||
}
|
||||
@@ -104,30 +104,30 @@ public abstract class WebServiceGatewaySupport implements InitializingBean {
|
||||
webServiceTemplate.setDestinationProvider(destinationProvider);
|
||||
}
|
||||
|
||||
/** Sets a single <code>WebServiceMessageSender</code> to be used by the gateway. */
|
||||
/** Sets a single {@code WebServiceMessageSender} to be used by the gateway. */
|
||||
public final void setMessageSender(WebServiceMessageSender messageSender) {
|
||||
webServiceTemplate.setMessageSender(messageSender);
|
||||
}
|
||||
|
||||
/** Returns the <code>WebServiceMessageSender</code>s used by the gateway. */
|
||||
/** Returns the {@code WebServiceMessageSender}s used by the gateway. */
|
||||
public final WebServiceMessageSender[] getMessageSenders() {
|
||||
return webServiceTemplate.getMessageSenders();
|
||||
}
|
||||
|
||||
/** Sets multiple <code>WebServiceMessageSender</code> to be used by the gateway. */
|
||||
/** Sets multiple {@code WebServiceMessageSender} to be used by the gateway. */
|
||||
public final void setMessageSenders(WebServiceMessageSender[] messageSenders) {
|
||||
webServiceTemplate.setMessageSenders(messageSenders);
|
||||
}
|
||||
|
||||
/** Returns the <code>WebServiceTemplate</code> for the gateway. */
|
||||
/** Returns the {@code WebServiceTemplate} for the gateway. */
|
||||
public final WebServiceTemplate getWebServiceTemplate() {
|
||||
return webServiceTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the <code>WebServiceTemplate</code> to be used by the gateway.
|
||||
* <p/>
|
||||
* When using this property, the convenience setters ({@link #setMarshaller(Marshaller)}, {@link
|
||||
* Sets the {@code WebServiceTemplate} to be used by the gateway.
|
||||
*
|
||||
* <p>When using this property, the convenience setters ({@link #setMarshaller(Marshaller)}, {@link
|
||||
* #setUnmarshaller(Unmarshaller)}, {@link #setMessageSender(WebServiceMessageSender)}, {@link
|
||||
* #setMessageSenders(WebServiceMessageSender[])}, and {@link #setDefaultUri(String)}) should not be set on this
|
||||
* class, but on the template directly.
|
||||
@@ -137,14 +137,14 @@ public abstract class WebServiceGatewaySupport implements InitializingBean {
|
||||
this.webServiceTemplate = webServiceTemplate;
|
||||
}
|
||||
|
||||
/** Returns the <code>Marshaller</code> used by the gateway. */
|
||||
/** Returns the {@code Marshaller} used by the gateway. */
|
||||
public final Marshaller getMarshaller() {
|
||||
return webServiceTemplate.getMarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* Sets the {@code Marshaller} used by the gateway. Setting this property is only required if the marshalling
|
||||
* functionality of {@code WebServiceTemplate} is to be used.
|
||||
*
|
||||
* @see WebServiceTemplate#marshalSendAndReceive
|
||||
*/
|
||||
@@ -152,14 +152,14 @@ public abstract class WebServiceGatewaySupport implements InitializingBean {
|
||||
webServiceTemplate.setMarshaller(marshaller);
|
||||
}
|
||||
|
||||
/** Returns the <code>Unmarshaller</code> used by the gateway. */
|
||||
/** Returns the {@code Unmarshaller} used by the gateway. */
|
||||
public final Unmarshaller getUnmarshaller() {
|
||||
return webServiceTemplate.getUnmarshaller();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* Sets the {@code Unmarshaller} used by the gateway. Setting this property is only required if the marshalling
|
||||
* functionality of {@code WebServiceTemplate} is to be used.
|
||||
*
|
||||
* @see WebServiceTemplate#marshalSendAndReceive
|
||||
*/
|
||||
@@ -167,12 +167,12 @@ public abstract class WebServiceGatewaySupport implements InitializingBean {
|
||||
webServiceTemplate.setUnmarshaller(unmarshaller);
|
||||
}
|
||||
|
||||
/** Returns the <code>ClientInterceptors</code> used by the template. */
|
||||
/** Returns the {@code ClientInterceptors} used by the template. */
|
||||
public final ClientInterceptor[] getInterceptors() {
|
||||
return webServiceTemplate.getInterceptors();
|
||||
}
|
||||
|
||||
/** Sets the <code>ClientInterceptors</code> used by the gateway. */
|
||||
/** Sets the {@code ClientInterceptors} used by the gateway. */
|
||||
public final void setInterceptors(ClientInterceptor[] interceptors) {
|
||||
webServiceTemplate.setInterceptors(interceptors);
|
||||
}
|
||||
|
||||
@@ -28,10 +28,10 @@ import org.springframework.ws.transport.WebServiceMessageSender;
|
||||
import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
|
||||
/**
|
||||
* Base class for <code>WebServiceTemplate</code> and other WS-accessing helpers. Defines common properties like the
|
||||
* Base class for {@code WebServiceTemplate} and other WS-accessing helpers. Defines common properties like the
|
||||
* {@link WebServiceMessageFactory} and {@link WebServiceMessageSender}.
|
||||
* <p/>
|
||||
* Not intended to be used directly. See {@link org.springframework.ws.client.core.WebServiceTemplate}.
|
||||
*
|
||||
* <p>Not intended to be used directly. See {@link org.springframework.ws.client.core.WebServiceTemplate}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see org.springframework.ws.client.core.WebServiceTemplate
|
||||
@@ -60,8 +60,8 @@ public abstract class WebServiceAccessor extends TransformerObjectSupport implem
|
||||
|
||||
/**
|
||||
* Sets the single message sender used for sending messages.
|
||||
* <p/>
|
||||
* This message sender will be used to resolve an URI to a {@link WebServiceConnection}.
|
||||
*
|
||||
* <p>This message sender will be used to resolve an URI to a {@link WebServiceConnection}.
|
||||
*
|
||||
* @see #createConnection(URI)
|
||||
*/
|
||||
@@ -72,8 +72,8 @@ public abstract class WebServiceAccessor extends TransformerObjectSupport implem
|
||||
|
||||
/**
|
||||
* Sets the message senders used for sending messages.
|
||||
* <p/>
|
||||
* These message senders will be used to resolve an URI to a {@link WebServiceConnection}.
|
||||
*
|
||||
* <p>These message senders will be used to resolve an URI to a {@link WebServiceConnection}.
|
||||
*
|
||||
* @see #createConnection(URI)
|
||||
*/
|
||||
@@ -90,8 +90,8 @@ public abstract class WebServiceAccessor extends TransformerObjectSupport implem
|
||||
|
||||
/**
|
||||
* Creates a connection to the given URI, or throws an exception when it cannot be resolved.
|
||||
* <p/>
|
||||
* Default implementation iterates over all configured {@link WebServiceMessageSender} objects, and calls {@link
|
||||
*
|
||||
* <p>Default implementation iterates over all configured {@link WebServiceMessageSender} objects, and calls {@link
|
||||
* WebServiceMessageSender#supports(URI)} for each of them. If the sender supports the parameter URI, it creates a
|
||||
* connection using {@link WebServiceMessageSender#createConnection(URI)} .
|
||||
*
|
||||
|
||||
@@ -23,8 +23,8 @@ import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Abstract base class for {@link DestinationProvider} implementations that cache destination URI.
|
||||
* <p/>
|
||||
* Caching can be disabled by setting the {@link #setCache(boolean) cache} property to <code>false</code>; forcing a
|
||||
*
|
||||
* <p>Caching can be disabled by setting the {@link #setCache(boolean) cache} property to {@code false}; forcing a
|
||||
* destination lookup for every call.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -40,7 +40,7 @@ public abstract class AbstractCachingDestinationProvider implements DestinationP
|
||||
private boolean cache = true;
|
||||
|
||||
/**
|
||||
* Set whether to cache resolved destinations. Default is <code>true</code>. This flag can be turned off to
|
||||
* Set whether to cache resolved destinations. Default is {@code true}. This flag can be turned off to
|
||||
* re-lookup a destination for each operation, which allows for hot restarting of destinations. This is mainly
|
||||
* useful during development.
|
||||
*/
|
||||
@@ -63,8 +63,8 @@ public abstract class AbstractCachingDestinationProvider implements DestinationP
|
||||
|
||||
/**
|
||||
* Abstract template method that looks up the URI.
|
||||
* <p/>
|
||||
* If {@linkplain #setCache(boolean) caching} is enabled, this method will only be called once.
|
||||
*
|
||||
* <p>If {@linkplain #setCache(boolean) caching} is enabled, this method will only be called once.
|
||||
*
|
||||
* @return the destination URI
|
||||
*/
|
||||
|
||||
@@ -21,8 +21,8 @@ import java.net.URI;
|
||||
/**
|
||||
* Strategy interface for providing a {@link org.springframework.ws.client.core.WebServiceTemplate} destination URI at
|
||||
* runtime.
|
||||
* <p/>
|
||||
* Typically implemented by providers that use WSDL, a UDDI registry, or some other form to determine the destination
|
||||
*
|
||||
* <p>Typically implemented by providers that use WSDL, a UDDI registry, or some other form to determine the destination
|
||||
* URI.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
|
||||
@@ -37,8 +37,8 @@ import org.springframework.xml.xpath.XPathExpressionFactory;
|
||||
|
||||
/**
|
||||
* Implementation of the {@link DestinationProvider} that resolves a destination URI from a WSDL file.
|
||||
* <p/>
|
||||
* The extraction relies on an XPath expression to locate the URI. By default, the {@link
|
||||
*
|
||||
* <p>The extraction relies on an XPath expression to locate the URI. By default, the {@link
|
||||
* #DEFAULT_WSDL_LOCATION_EXPRESSION} will be used, but this expression can be overridden by setting the {@link
|
||||
* #setLocationExpression(String) locationExpression} property.
|
||||
*
|
||||
@@ -48,7 +48,7 @@ import org.springframework.xml.xpath.XPathExpressionFactory;
|
||||
*/
|
||||
public class Wsdl11DestinationProvider extends AbstractCachingDestinationProvider {
|
||||
|
||||
/** Default XPath expression used for extracting all <code>location</code> attributes from the WSDL definition. */
|
||||
/** Default XPath expression used for extracting all {@code location} attributes from the WSDL definition. */
|
||||
public static final String DEFAULT_WSDL_LOCATION_EXPRESSION =
|
||||
"/wsdl:definitions/wsdl:service/wsdl:port/soap:address/@location";
|
||||
|
||||
@@ -69,7 +69,7 @@ public class Wsdl11DestinationProvider extends AbstractCachingDestinationProvide
|
||||
.createXPathExpression(DEFAULT_WSDL_LOCATION_EXPRESSION, expressionNamespaces);
|
||||
}
|
||||
|
||||
/** Sets a WSDL location from which the service destination <code>URI</code> will be resolved. */
|
||||
/** Sets a WSDL location from which the service destination {@code URI} will be resolved. */
|
||||
public void setWsdl(Resource wsdlResource) {
|
||||
Assert.notNull(wsdlResource, "'wsdl' must not be null");
|
||||
Assert.isTrue(wsdlResource.exists(), wsdlResource + " does not exist");
|
||||
@@ -77,15 +77,15 @@ public class Wsdl11DestinationProvider extends AbstractCachingDestinationProvide
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the XPath expression to use when extracting the service location <code>URI</code> from a WSDL.
|
||||
* <p/>
|
||||
* The expression can use the following bound prefixes: <blockquote> <table> <tr><th>Prefix</th><th>Namespace</th></tr>
|
||||
* <tr><td><code>wsdl</code></td><td><code>http://schemas.xmlsoap.org/wsdl/</code></td></tr>
|
||||
* <tr><td><code>soap</code></td><td><code>http://schemas.xmlsoap.org/wsdl/soap/</code></td></tr>
|
||||
* <tr><td><code>soap12</code></td><td><code>http://schemas.xmlsoap.org/wsdl/soap12/</code></td></tr>
|
||||
* Sets the XPath expression to use when extracting the service location {@code URI} from a WSDL.
|
||||
*
|
||||
* <p>The expression can use the following bound prefixes: <blockquote> <table> <tr><th>Prefix</th><th>Namespace</th></tr>
|
||||
* <tr><td>{@code wsdl}</td><td>{@code http://schemas.xmlsoap.org/wsdl/}</td></tr>
|
||||
* <tr><td>{@code soap}</td><td>{@code http://schemas.xmlsoap.org/wsdl/soap/}</td></tr>
|
||||
* <tr><td>{@code soap12}</td><td>{@code http://schemas.xmlsoap.org/wsdl/soap12/}</td></tr>
|
||||
* </table></blockquote>
|
||||
* <p/>
|
||||
* Defaults to {@link #DEFAULT_WSDL_LOCATION_EXPRESSION}.
|
||||
*
|
||||
* <p>Defaults to {@link #DEFAULT_WSDL_LOCATION_EXPRESSION}.
|
||||
*/
|
||||
public void setLocationExpression(String expression) {
|
||||
Assert.hasText(expression, "'expression' must not be empty");
|
||||
|
||||
@@ -40,9 +40,9 @@ import org.springframework.xml.xsd.XsdSchemaCollection;
|
||||
* Abstract base class for {@link ClientInterceptor} implementations that validate part of the message using a schema.
|
||||
* The exact message part is determined by the {@link #getValidationRequestSource(WebServiceMessage)} and {@link
|
||||
* #getValidationResponseSource(WebServiceMessage)} template methods.
|
||||
* <p/>
|
||||
* By default, only the request message is validated, but this behaviour can be changed using the
|
||||
* <code>validateRequest</code> and <code>validateResponse</code> properties.
|
||||
*
|
||||
* <p>By default, only the request message is validated, but this behaviour can be changed using the
|
||||
* {@code validateRequest} and {@code validateResponse} properties.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see #getValidationRequestSource(WebServiceMessage)
|
||||
@@ -67,7 +67,7 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the schema language. Default is the W3C XML Schema: <code>http://www.w3.org/2001/XMLSchema"</code>.
|
||||
* Sets the schema language. Default is the W3C XML Schema: {@code http://www.w3.org/2001/XMLSchema"}.
|
||||
*
|
||||
* @see XmlValidatorFactory#SCHEMA_W3C_XML
|
||||
* @see XmlValidatorFactory#SCHEMA_RELAX_NG
|
||||
@@ -128,12 +128,12 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
this.validator = schemaCollection.createValidator();
|
||||
}
|
||||
|
||||
/** Indicates whether the request should be validated against the schema. Default is <code>true</code>. */
|
||||
/** Indicates whether the request should be validated against the schema. Default is {@code true}. */
|
||||
public void setValidateRequest(boolean validateRequest) {
|
||||
this.validateRequest = validateRequest;
|
||||
}
|
||||
|
||||
/** Indicates whether the response should be validated against the schema. Default is <code>false</code>. */
|
||||
/** Indicates whether the response should be validated against the schema. Default is {@code false}. */
|
||||
public void setValidateResponse(boolean validateResponse) {
|
||||
this.validateResponse = validateResponse;
|
||||
}
|
||||
@@ -155,12 +155,12 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
|
||||
/**
|
||||
* Validates the request message in the given message context. Validation only occurs if {@link
|
||||
* #setValidateRequest(boolean) validateRequest} is set to <code>true</code>, which is the default.
|
||||
* <p/>
|
||||
* Returns <code>true</code> if the request is valid, or <code>false</code> if it isn't.
|
||||
* #setValidateRequest(boolean) validateRequest} is set to {@code true}, which is the default.
|
||||
*
|
||||
* <p>Returns {@code true} if the request is valid, or {@code false} if it isn't.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @return <code>true</code> if the message is valid; <code>false</code> otherwise
|
||||
* @return {@code true} if the message is valid; {@code false} otherwise
|
||||
* @see #setValidateRequest(boolean)
|
||||
*/
|
||||
@Override
|
||||
@@ -188,13 +188,13 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
|
||||
/**
|
||||
* Template method that is called when the request message contains validation errors.
|
||||
* <p/>
|
||||
* Default implementation logs all errors, and throws a {@link WebServiceValidationException}. Subclasses can
|
||||
*
|
||||
* <p>Default implementation logs all errors, and throws a {@link WebServiceValidationException}. Subclasses can
|
||||
* override this method to customize this behavior.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @param errors the validation errors
|
||||
* @return <code>true</code> to continue processing the request, <code>false</code> otherwise
|
||||
* @return {@code true} to continue processing the request, {@code false} otherwise
|
||||
*/
|
||||
protected boolean handleRequestValidationErrors(MessageContext messageContext, SAXParseException[] errors) {
|
||||
for (SAXParseException error : errors) {
|
||||
@@ -205,13 +205,13 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
|
||||
/**
|
||||
* Validates the response message in the given message context. Validation only occurs if {@link
|
||||
* #setValidateResponse(boolean) validateResponse} is set to <code>true</code>, which is <strong>not</strong> the
|
||||
* #setValidateResponse(boolean) validateResponse} is set to {@code true}, which is <strong>not</strong> the
|
||||
* default.
|
||||
* <p/>
|
||||
* Returns <code>true</code> if the request is valid, or <code>false</code> if it isn't.
|
||||
*
|
||||
* <p>Returns {@code true} if the request is valid, or {@code false} if it isn't.
|
||||
*
|
||||
* @param messageContext the message context.
|
||||
* @return <code>true</code> if the response is valid; <code>false</code> otherwise
|
||||
* @return {@code true} if the response is valid; {@code false} otherwise
|
||||
* @see #setValidateResponse(boolean)
|
||||
*/
|
||||
@Override
|
||||
@@ -239,13 +239,13 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
|
||||
/**
|
||||
* Template method that is called when the response message contains validation errors.
|
||||
* <p/>
|
||||
* Default implementation logs all errors, and returns <code>false</code>, i.e. do not cot continue to process the
|
||||
*
|
||||
* <p>Default implementation logs all errors, and returns {@code false}, i.e. do not cot continue to process the
|
||||
* respone interceptor chain.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @param errors the validation errors
|
||||
* @return <code>true</code> to continue the reponse interceptor chain, <code>false</code> (the default) otherwise
|
||||
* @return {@code true} to continue the reponse interceptor chain, {@code false} (the default) otherwise
|
||||
*/
|
||||
protected boolean handleResponseValidationErrors(MessageContext messageContext, SAXParseException[] errors)
|
||||
throws WebServiceValidationException {
|
||||
@@ -271,7 +271,7 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
* Abstract template method that returns the part of the request message that is to be validated.
|
||||
*
|
||||
* @param request the request message
|
||||
* @return the part of the message that is to validated, or <code>null</code> not to validate anything
|
||||
* @return the part of the message that is to validated, or {@code null} not to validate anything
|
||||
*/
|
||||
protected abstract Source getValidationRequestSource(WebServiceMessage request);
|
||||
|
||||
@@ -279,7 +279,7 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
* Abstract template method that returns the part of the response message that is to be validated.
|
||||
*
|
||||
* @param response the response message
|
||||
* @return the part of the message that is to validated, or <code>null</code> not to validate anything
|
||||
* @return the part of the message that is to validated, or {@code null} not to validate anything
|
||||
*/
|
||||
protected abstract Source getValidationResponseSource(WebServiceMessage response);
|
||||
}
|
||||
|
||||
@@ -25,15 +25,15 @@ import org.springframework.ws.transport.WebServiceConnection;
|
||||
* Workflow interface that allows for customized client-side message interception. Applications can register any number
|
||||
* of existing or custom interceptors on a {@link org.springframework.ws.client.core.WebServiceTemplate}, to add common
|
||||
* pre- and postprocessing behavior without needing to modify payload handling code.
|
||||
* <p/>
|
||||
* A <code>ClientInterceptor</code> gets called after payload creation (using {@link
|
||||
*
|
||||
* <p>A {@code ClientInterceptor} gets called after payload creation (using {@link
|
||||
* org.springframework.ws.client.core.WebServiceTemplate#marshalSendAndReceive(Object)} or similar methods, and after
|
||||
* {@link org.springframework.ws.client.core.WebServiceMessageCallback callback} invocation, but before the message is
|
||||
* sent over the {@link WebServiceConnection}. This mechanism can be used for a large field of preprocessing aspects,
|
||||
* e.g. for authorization checks, or message header checks. Its main purpose is to allow for factoring out meta-data
|
||||
* (i.e. {@link SoapHeader}) related code.
|
||||
* <p/>
|
||||
* Client interceptors are defined on a {@link org.springframework.ws.client.core.WebServiceTemplate}, using the {@link
|
||||
*
|
||||
* <p>Client interceptors are defined on a {@link org.springframework.ws.client.core.WebServiceTemplate}, using the {@link
|
||||
* org.springframework.ws.client.core.WebServiceTemplate#setInterceptors(ClientInterceptor[]) interceptors} property.
|
||||
*
|
||||
* @author Giovanni Cuccu
|
||||
@@ -48,7 +48,7 @@ public interface ClientInterceptor {
|
||||
* message is sent.
|
||||
*
|
||||
* @param messageContext contains the outgoing request message
|
||||
* @return <code>true</code> to continue processing of the request interceptors; <code>false</code> to indicate
|
||||
* @return {@code true} to continue processing of the request interceptors; {@code false} to indicate
|
||||
* blocking of the request endpoint chain
|
||||
* @throws WebServiceClientException in case of errors
|
||||
* @see MessageContext#getRequest()
|
||||
@@ -58,11 +58,11 @@ public interface ClientInterceptor {
|
||||
/**
|
||||
* Processes the incoming response message. Called for non-fault response messages before payload handling in the
|
||||
* {@link org.springframework.ws.client.core.WebServiceTemplate}.
|
||||
* <p/>
|
||||
* Note: Will only be called if this interceptor's {@link #handleRequest} method has successfully completed.
|
||||
*
|
||||
* <p>Note: Will only be called if this interceptor's {@link #handleRequest} method has successfully completed.
|
||||
*
|
||||
* @param messageContext contains the outgoing request message
|
||||
* @return <code>true</code> to continue processing of the request interceptors; <code>false</code> to indicate
|
||||
* @return {@code true} to continue processing of the request interceptors; {@code false} to indicate
|
||||
* blocking of the response endpoint chain
|
||||
* @throws WebServiceClientException in case of errors
|
||||
* @see MessageContext#getResponse()
|
||||
@@ -72,11 +72,11 @@ public interface ClientInterceptor {
|
||||
/**
|
||||
* Processes the incoming response fault. Called for response fault messages before payload handling in the {@link
|
||||
* org.springframework.ws.client.core.WebServiceTemplate}.
|
||||
* <p/>
|
||||
* Note: Will only be called if this interceptor's {@link #handleRequest} method has successfully completed.
|
||||
*
|
||||
* <p>Note: Will only be called if this interceptor's {@link #handleRequest} method has successfully completed.
|
||||
*
|
||||
* @param messageContext contains the outgoing request message
|
||||
* @return <code>true</code> to continue processing of the request interceptors; <code>false</code> to indicate
|
||||
* @return {@code true} to continue processing of the request interceptors; {@code false} to indicate
|
||||
* blocking of the request endpoint chain
|
||||
* @throws WebServiceClientException in case of errors
|
||||
* @see MessageContext#getResponse()
|
||||
@@ -87,8 +87,8 @@ public interface ClientInterceptor {
|
||||
/**
|
||||
* Callback after completion of request and response (fault) processing. Will be called on any outcome, thus
|
||||
* allows for proper resource cleanup.
|
||||
* <p/>
|
||||
* Note: Will only be called if this interceptor's {@link #handleRequest} method has successfully completed.
|
||||
*
|
||||
* <p>Note: Will only be called if this interceptor's {@link #handleRequest} method has successfully completed.
|
||||
*
|
||||
* @param messageContext contains both request and response messages, the response should contains a Fault
|
||||
* @param ex exception thrown on handler execution, if any
|
||||
|
||||
@@ -21,14 +21,14 @@ import javax.xml.transform.Source;
|
||||
import org.springframework.ws.WebServiceMessage;
|
||||
|
||||
/**
|
||||
* Client-side interceptor that validates the contents of <code>WebServiceMessage</code>s using a schema. Allows for
|
||||
* Client-side interceptor that validates the contents of {@code WebServiceMessage}s using a schema. Allows for
|
||||
* both W3C XML and RELAX NG schemas.
|
||||
* <p/>
|
||||
* When the payload is invalid, this interceptor stops processing of the interceptor chain.
|
||||
* <p/>
|
||||
* The schema to validate against is set with the <code>schema</code> property or <code>schemas</code> property. By
|
||||
*
|
||||
* <p>When the payload is invalid, this interceptor stops processing of the interceptor chain.
|
||||
*
|
||||
* <p>The schema to validate against is set with the {@code schema} property or {@code schemas} property. By
|
||||
* default, only the request message is validated, but this behaviour can be changed using the
|
||||
* <code>validateRequest</code> and <code>validateResponse</code> properties. Responses that contains faults are not
|
||||
* {@code validateRequest} and {@code validateResponse} properties. Responses that contains faults are not
|
||||
* validated.
|
||||
*
|
||||
* @author Stefan Schmidt
|
||||
@@ -45,7 +45,7 @@ public class PayloadValidatingInterceptor extends AbstractValidatingInterceptor
|
||||
* Returns the part of the request message that is to be validated. Default
|
||||
*
|
||||
* @param request the request message
|
||||
* @return the part of the message that is to validated, or <code>null</code> not to validate anything
|
||||
* @return the part of the message that is to validated, or {@code null} not to validate anything
|
||||
*/
|
||||
@Override
|
||||
protected Source getValidationRequestSource(WebServiceMessage request) {
|
||||
@@ -56,7 +56,7 @@ public class PayloadValidatingInterceptor extends AbstractValidatingInterceptor
|
||||
* Returns the part of the response message that is to be validated.
|
||||
*
|
||||
* @param response the response message
|
||||
* @return the part of the message that is to validated, or <code>null</code> not to validate anything
|
||||
* @return the part of the message that is to validated, or {@code null} not to validate anything
|
||||
*/
|
||||
@Override
|
||||
protected Source getValidationResponseSource(WebServiceMessage response) {
|
||||
|
||||
@@ -32,7 +32,7 @@ public class WebServiceValidationException extends WebServiceClientException {
|
||||
private SAXParseException[] validationErrors;
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>WebServiceValidationException</code> class.
|
||||
* Create a new instance of the {@code WebServiceValidationException} class.
|
||||
*/
|
||||
public WebServiceValidationException(SAXParseException[] validationErrors) {
|
||||
super(createMessage(validationErrors));
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.beans.factory.xml.NamespaceHandler;
|
||||
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
|
||||
/**
|
||||
* {@link NamespaceHandler} for the '<code>web-services</code>' namespace.
|
||||
* {@link NamespaceHandler} for the '{@code web-services}' namespace.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.5.0
|
||||
|
||||
@@ -30,8 +30,8 @@ import org.springframework.util.StringUtils;
|
||||
public abstract class AbstractMessageContext implements MessageContext {
|
||||
|
||||
/**
|
||||
* Keys are <code>Strings</code>, values are <code>Objects</code>. Lazily initialized by
|
||||
* <code>getProperties()</code>.
|
||||
* Keys are {@code Strings}, values are {@code Objects}. Lazily initialized by
|
||||
* {@code getProperties()}.
|
||||
*/
|
||||
private Map<String, Object> properties;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.ws.WebServiceMessage;
|
||||
import org.springframework.ws.WebServiceMessageFactory;
|
||||
|
||||
/**
|
||||
* Default implementation of <code>MessageContext</code>.
|
||||
* Default implementation of {@code MessageContext}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
@@ -37,13 +37,13 @@ public class DefaultMessageContext extends AbstractMessageContext {
|
||||
|
||||
private WebServiceMessage response;
|
||||
|
||||
/** Construct a new, empty instance of the <code>DefaultMessageContext</code> with the given message factory. */
|
||||
/** Construct a new, empty instance of the {@code DefaultMessageContext} with the given message factory. */
|
||||
public DefaultMessageContext(WebServiceMessageFactory messageFactory) {
|
||||
this(messageFactory.createWebServiceMessage(), messageFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new instance of the <code>DefaultMessageContext</code> with the given request message and message
|
||||
* Construct a new instance of the {@code DefaultMessageContext} with the given request message and message
|
||||
* factory.
|
||||
*/
|
||||
public DefaultMessageContext(WebServiceMessage request, WebServiceMessageFactory messageFactory) {
|
||||
|
||||
@@ -24,11 +24,11 @@ import org.springframework.ws.server.EndpointInterceptor;
|
||||
|
||||
/**
|
||||
* Context holder for message requests.
|
||||
* <p/>
|
||||
* Contains both the message request as well as the response. Response message are usually lazily created (but do not
|
||||
*
|
||||
* <p>Contains both the message request as well as the response. Response message are usually lazily created (but do not
|
||||
* have to be).
|
||||
* <p/>
|
||||
* Also contains properties, which can be used to by {@link EndpointInterceptor interceptors} to pass information on to
|
||||
*
|
||||
* <p>Also contains properties, which can be used to by {@link EndpointInterceptor interceptors} to pass information on to
|
||||
* endpoints.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -46,7 +46,7 @@ public interface MessageContext {
|
||||
/**
|
||||
* Indicates whether this context has a response.
|
||||
*
|
||||
* @return <code>true</code> if this context has a response; <code>false</code> otherwise
|
||||
* @return {@code true} if this context has a response; {@code false} otherwise
|
||||
*/
|
||||
boolean hasResponse();
|
||||
|
||||
@@ -84,8 +84,8 @@ public interface MessageContext {
|
||||
void readResponse(InputStream inputStream) throws IOException;
|
||||
|
||||
/**
|
||||
* Sets the name and value of a property associated with the <code>MessageContext</code>. If the
|
||||
* <code>MessageContext</code> contains a value of the same property, the old value is replaced.
|
||||
* Sets the name and value of a property associated with the {@code MessageContext}. If the
|
||||
* {@code MessageContext} contains a value of the same property, the old value is replaced.
|
||||
*
|
||||
* @param name name of the property associated with the value
|
||||
* @param value value of the property
|
||||
@@ -93,7 +93,7 @@ public interface MessageContext {
|
||||
void setProperty(String name, Object value);
|
||||
|
||||
/**
|
||||
* Gets the value of a specific property from the <code>MessageContext</code>.
|
||||
* Gets the value of a specific property from the {@code MessageContext}.
|
||||
*
|
||||
* @param name name of the property whose value is to be retrieved
|
||||
* @return value of the property
|
||||
@@ -101,7 +101,7 @@ public interface MessageContext {
|
||||
Object getProperty(String name);
|
||||
|
||||
/**
|
||||
* Removes a property from the <code>MessageContext</code>.
|
||||
* Removes a property from the {@code MessageContext}.
|
||||
*
|
||||
* @param name name of the property to be removed
|
||||
*/
|
||||
@@ -111,12 +111,12 @@ public interface MessageContext {
|
||||
* Check if this message context contains a property with the given name.
|
||||
*
|
||||
* @param name the name of the property to look for
|
||||
* @return <code>true</code> if the <code>MessageContext</code> contains the property; <code>false</code> otherwise
|
||||
* @return {@code true} if the {@code MessageContext} contains the property; {@code false} otherwise
|
||||
*/
|
||||
boolean containsProperty(String name);
|
||||
|
||||
/**
|
||||
* Return the names of all properties in this <code>MessageContext</code>.
|
||||
* Return the names of all properties in this {@code MessageContext}.
|
||||
*
|
||||
* @return the names of all properties in this context, or an empty array if none defined
|
||||
*/
|
||||
|
||||
@@ -57,7 +57,7 @@ public abstract class AbstractMimeMessage implements MimeMessage {
|
||||
}
|
||||
|
||||
/**
|
||||
* Activation framework <code>DataSource</code> that wraps a Spring <code>InputStreamSource</code>.
|
||||
* Activation framework {@code DataSource} that wraps a Spring {@code InputStreamSource}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
|
||||
@@ -33,19 +33,19 @@ public interface Attachment {
|
||||
/**
|
||||
* Returns the content identifier of the attachment.
|
||||
*
|
||||
* @return the content id, or <code>null</code> if empty or not defined
|
||||
* @return the content id, or {@code null} if empty or not defined
|
||||
*/
|
||||
String getContentId();
|
||||
|
||||
/**
|
||||
* Returns the content type of the attachment.
|
||||
*
|
||||
* @return the content type, or <code>null</code> if empty or not defined
|
||||
* @return the content type, or {@code null} if empty or not defined
|
||||
*/
|
||||
String getContentType();
|
||||
|
||||
/**
|
||||
* Return an <code>InputStream</code> to read the contents of the attachment from. The user is responsible for
|
||||
* Return an {@code InputStream} to read the contents of the attachment from. The user is responsible for
|
||||
* closing the stream.
|
||||
*
|
||||
* @return the contents of the file as stream, or an empty stream if empty
|
||||
@@ -54,9 +54,9 @@ public interface Attachment {
|
||||
InputStream getInputStream() throws IOException;
|
||||
|
||||
/**
|
||||
* Returns the size of the attachment in bytes. Returns <code>-1</code> if the size cannot be determined.
|
||||
* Returns the size of the attachment in bytes. Returns {@code -1} if the size cannot be determined.
|
||||
*
|
||||
* @return the size of the attachment, <code>0</code> if empty, or <code>-1</code> if the size cannot be determined
|
||||
* @return the size of the attachment, {@code 0} if empty, or {@code -1} if the size cannot be determined
|
||||
*/
|
||||
long getSize();
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public interface MimeMessage extends WebServiceMessage {
|
||||
/**
|
||||
* Indicates whether this message is a XOP package.
|
||||
*
|
||||
* @return <code>true</code> when the constraints specified in <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#identifying_xop_documents">Identifying
|
||||
* @return {@code true} when the constraints specified in <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#identifying_xop_documents">Identifying
|
||||
* XOP Documents</a> are met.
|
||||
* @see <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#xop_packages">XOP Packages</a>
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public interface MimeMessage extends WebServiceMessage {
|
||||
/**
|
||||
* Turns this message into a XOP package.
|
||||
*
|
||||
* @return <code>true</code> when the message is a XOP package
|
||||
* @return {@code true} when the message is a XOP package
|
||||
* @see <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#xop_packages">XOP Packages</a>
|
||||
*/
|
||||
boolean convertToXopPackage();
|
||||
@@ -53,13 +53,13 @@ public interface MimeMessage extends WebServiceMessage {
|
||||
/**
|
||||
* Returns the {@link Attachment} with the specified content Id.
|
||||
*
|
||||
* @return the attachment with the specified content id; or <code>null</code> if it cannot be found
|
||||
* @return the attachment with the specified content id; or {@code null} if it cannot be found
|
||||
* @throws AttachmentException in case of errors
|
||||
*/
|
||||
Attachment getAttachment(String contentId) throws AttachmentException;
|
||||
|
||||
/**
|
||||
* Returns an <code>Iterator</code> over all {@link Attachment} objects that are part of this message.
|
||||
* Returns an {@code Iterator} over all {@link Attachment} objects that are part of this message.
|
||||
*
|
||||
* @return an iterator over all attachments
|
||||
* @throws AttachmentException in case of errors
|
||||
@@ -69,8 +69,8 @@ public interface MimeMessage extends WebServiceMessage {
|
||||
|
||||
/**
|
||||
* Add an attachment to the message, taking the content from a {@link File}.
|
||||
* <p/>
|
||||
* The content type will be determined by the name of the given content file. Do not use this for temporary files
|
||||
*
|
||||
* <p>The content type will be determined by the name of the given content file. Do not use this for temporary files
|
||||
* with arbitrary filenames (possibly ending in ".tmp" or the like)!
|
||||
*
|
||||
* @param contentId the content Id of the attachment
|
||||
@@ -82,8 +82,8 @@ public interface MimeMessage extends WebServiceMessage {
|
||||
|
||||
/**
|
||||
* Add an attachment to the message, taking the content from an {@link InputStreamSource}.
|
||||
* <p/>
|
||||
* Note that the stream returned by the source needs to be a <em>fresh one on each call</em>, as underlying
|
||||
*
|
||||
* <p>Note that the stream returned by the source needs to be a <em>fresh one on each call</em>, as underlying
|
||||
* implementations can invoke {@link InputStreamSource#getInputStream()} multiple times.
|
||||
*
|
||||
* @param contentId the content Id of the attachment
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.ws.pox;
|
||||
import org.springframework.ws.WebServiceMessageException;
|
||||
|
||||
/**
|
||||
* Specific subclass of <code>WebServiceMessageException</code> for Plain Old XML messages.
|
||||
* Specific subclass of {@code WebServiceMessageException} for Plain Old XML messages.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.springframework.ws.transport.TransportOutputStream;
|
||||
import org.springframework.xml.namespace.QNameUtils;
|
||||
|
||||
/**
|
||||
* Implementation of the <code>PoxMessage</code> interface that is based on a DOM Document.
|
||||
* Implementation of the {@code PoxMessage} interface that is based on a DOM Document.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see Document
|
||||
@@ -52,7 +52,7 @@ public class DomPoxMessage implements PoxMessage {
|
||||
private final Transformer transformer;
|
||||
|
||||
/**
|
||||
* Constructs a new instance of the <code>DomPoxMessage</code> with the given document.
|
||||
* Constructs a new instance of the {@code DomPoxMessage} with the given document.
|
||||
*
|
||||
* @param document the document to base the message on
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.ws.pox.dom;
|
||||
import org.springframework.ws.pox.PoxMessageException;
|
||||
|
||||
/**
|
||||
* Specific subclass of <code>PoxMessageException</code> for DOM Plain Old XML messages.
|
||||
* Specific subclass of {@code PoxMessageException} for DOM Plain Old XML messages.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
|
||||
@@ -58,12 +58,12 @@ public class DomPoxMessageFactory extends TransformerObjectSupport implements We
|
||||
this.contentType = contentType;
|
||||
}
|
||||
|
||||
/** Set whether or not the XML parser should be XML namespace aware. Default is <code>true</code>. */
|
||||
/** Set whether or not the XML parser should be XML namespace aware. Default is {@code true}. */
|
||||
public void setNamespaceAware(boolean namespaceAware) {
|
||||
documentBuilderFactory.setNamespaceAware(namespaceAware);
|
||||
}
|
||||
|
||||
/** Set if the XML parser should validate the document. Default is <code>false</code>. */
|
||||
/** Set if the XML parser should validate the document. Default is {@code false}. */
|
||||
public void setValidating(boolean validating) {
|
||||
documentBuilderFactory.setValidating(validating);
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ import org.springframework.ws.context.MessageContext;
|
||||
|
||||
/**
|
||||
* Interface that must be implemented for each endpoint type to handle a message request. This interface is used to
|
||||
* allow the <code>MessageDispatcher</code> to be indefinitely extensible. It accesses all installed endpoints through
|
||||
* allow the {@code MessageDispatcher} to be indefinitely extensible. It accesses all installed endpoints through
|
||||
* this interface, meaning that is does not contain code specific to any endpoint type.
|
||||
* <p/>
|
||||
*
|
||||
* <p>This interface is not intended for application developers. It is available for those who want to develop their own
|
||||
* message flow.
|
||||
*
|
||||
@@ -33,21 +33,21 @@ import org.springframework.ws.context.MessageContext;
|
||||
public interface EndpointAdapter {
|
||||
|
||||
/**
|
||||
* Does this <code>EndpointAdapter</code> support the given <code>endpoint</code>?
|
||||
* <p/>
|
||||
* <p>Typical <code>EndpointAdapters</code> will base the decision on the endpoint type.
|
||||
* Does this {@code EndpointAdapter} support the given {@code endpoint}?
|
||||
*
|
||||
* <p>Typical {@code EndpointAdapters} will base the decision on the endpoint type.
|
||||
*
|
||||
* @param endpoint endpoint object to check
|
||||
* @return <code>true</code> if this <code>EndpointAdapter</code> supports the supplied <code>endpoint</code>
|
||||
* @return {@code true} if this {@code EndpointAdapter} supports the supplied {@code endpoint}
|
||||
*/
|
||||
boolean supports(Object endpoint);
|
||||
|
||||
/**
|
||||
* Use the given <code>endpoint</code> to handle the request.
|
||||
* Use the given {@code endpoint} to handle the request.
|
||||
*
|
||||
* @param messageContext the current message context
|
||||
* @param endpoint the endpoint to use. This object must have previously been passed to the {@link
|
||||
* #supports(Object)} method of this interface, which must have returned <code>true</code>
|
||||
* #supports(Object)} method of this interface, which must have returned {@code true}
|
||||
* @throws Exception in case of errors
|
||||
*/
|
||||
void invoke(MessageContext messageContext, Object endpoint) throws Exception;
|
||||
|
||||
@@ -32,7 +32,7 @@ public interface EndpointExceptionResolver {
|
||||
* @param messageContext current message context
|
||||
* @param endpoint the executed endpoint, or null if none chosen at the time of the exception
|
||||
* @param ex the exception that got thrown during endpoint execution
|
||||
* @return <code>true</code> if resolved; <code>false</code> otherwise
|
||||
* @return {@code true} if resolved; {@code false} otherwise
|
||||
*/
|
||||
boolean resolveException(MessageContext messageContext, Object endpoint, Exception ex);
|
||||
}
|
||||
|
||||
@@ -22,13 +22,13 @@ import org.springframework.ws.context.MessageContext;
|
||||
* Workflow interface that allows for customized endpoint invocation chains. Applications can register any number of
|
||||
* existing or custom interceptors for certain groups of endpoints, to add common preprocessing behavior without needing
|
||||
* to modify each endpoint implementation.
|
||||
* <p/>
|
||||
* An {@code EndpointInterceptor} gets called before the appropriate {@link EndpointAdapter} triggers the
|
||||
*
|
||||
* <p>An {@code EndpointInterceptor} gets called before the appropriate {@link EndpointAdapter} triggers the
|
||||
* invocation of the endpoint itself. This mechanism can be used for a large field of preprocessing aspects, e.g. for
|
||||
* authorization checks, or message header checks. Its main purpose is to allow for factoring out repetitive endpoint
|
||||
* code.
|
||||
* <p/>
|
||||
* Typically an interceptor chain is defined per {@link EndpointMapping} bean, sharing its granularity. To be able to
|
||||
*
|
||||
* <p>Typically an interceptor chain is defined per {@link EndpointMapping} bean, sharing its granularity. To be able to
|
||||
* apply a certain interceptor chain to a group of handlers, one needs to map the desired handlers via one
|
||||
* {@code EndpointMapping} bean. The interceptors themselves are defined as beans in the application context,
|
||||
* referenced by the mapping bean definition via its {@code interceptors} property (in XML: a <list> of
|
||||
@@ -45,8 +45,8 @@ public interface EndpointInterceptor {
|
||||
/**
|
||||
* Processes the incoming request message. Called after {@link EndpointMapping} determined an appropriate endpoint
|
||||
* object, but before {@link EndpointAdapter} invokes the endpoint.
|
||||
* <p/>
|
||||
* {@link MessageDispatcher} processes an endpoint in an invocation chain, consisting of any number of interceptors,
|
||||
*
|
||||
* <p>{@link MessageDispatcher} processes an endpoint in an invocation chain, consisting of any number of interceptors,
|
||||
* with the endpoint itself at the end. With this method, each interceptor can decide to abort the chain, typically
|
||||
* creating a custom response.
|
||||
*
|
||||
@@ -62,12 +62,12 @@ public interface EndpointInterceptor {
|
||||
/**
|
||||
* Processes the outgoing response message. Called after {@link EndpointAdapter} actually invoked the endpoint. Can
|
||||
* manipulate the response, if any, by adding new headers, etc.
|
||||
* <p/>
|
||||
* {@link MessageDispatcher} processes an endpoint in an invocation chain, consisting of any number of interceptors,
|
||||
*
|
||||
* <p>{@link MessageDispatcher} processes an endpoint in an invocation chain, consisting of any number of interceptors,
|
||||
* with the endpoint itself at the end. With this method, each interceptor can post-process an invocation, getting
|
||||
* applied in inverse order of the execution chain.
|
||||
* <p/>
|
||||
* Note: Will only be called if this interceptor's {@link #handleRequest} method has successfully completed.
|
||||
*
|
||||
* <p>Note: Will only be called if this interceptor's {@link #handleRequest} method has successfully completed.
|
||||
*
|
||||
* @param messageContext contains both request and response messages
|
||||
* @param endpoint chosen endpoint to invoke
|
||||
@@ -83,12 +83,12 @@ public interface EndpointInterceptor {
|
||||
/**
|
||||
* Processes the outgoing response fault. Called after {@link EndpointAdapter} actually invoked the endpoint. Can
|
||||
* manipulate the response, if any, by adding new headers, etc.
|
||||
* <p/>
|
||||
* {@link MessageDispatcher} processes an endpoint in an invocation chain, consisting of any number of interceptors,
|
||||
*
|
||||
* <p>{@link MessageDispatcher} processes an endpoint in an invocation chain, consisting of any number of interceptors,
|
||||
* with the endpoint itself at the end. With this method, each interceptor can post-process an invocation, getting
|
||||
* applied in inverse order of the execution chain.
|
||||
* <p/>
|
||||
* Note: Will only be called if this interceptor's {@link #handleRequest} method has successfully completed.
|
||||
*
|
||||
* <p>Note: Will only be called if this interceptor's {@link #handleRequest} method has successfully completed.
|
||||
*
|
||||
* @param messageContext contains both request and response messages, the response should contains a Fault
|
||||
* @param endpoint chosen endpoint to invoke
|
||||
@@ -100,10 +100,10 @@ public interface EndpointInterceptor {
|
||||
/**
|
||||
* Callback after completion of request and response (fault) processing. Will be called on any outcome of endpoint
|
||||
* invocation, thus allows for proper resource cleanup.
|
||||
* <p/>
|
||||
* Note: Will only be called if this interceptor's {@link #handleRequest} method has successfully completed.
|
||||
* <p/>
|
||||
* As with the {@link #handleResponse} method, the method will be invoked on each interceptor in the chain in
|
||||
*
|
||||
* <p>Note: Will only be called if this interceptor's {@link #handleRequest} method has successfully completed.
|
||||
*
|
||||
* <p>As with the {@link #handleResponse} method, the method will be invoked on each interceptor in the chain in
|
||||
* reverse order, so the first interceptor will be the last to be invoked.
|
||||
*
|
||||
* @param messageContext contains both request and response messages, the response should contains a Fault
|
||||
|
||||
@@ -30,7 +30,7 @@ public class EndpointInvocationChain {
|
||||
private EndpointInterceptor[] interceptors;
|
||||
|
||||
/**
|
||||
* Create new <code>EndpointInvocationChain</code>.
|
||||
* Create new {@code EndpointInvocationChain}.
|
||||
*
|
||||
* @param endpoint the endpoint object to invoke
|
||||
*/
|
||||
@@ -39,7 +39,7 @@ public class EndpointInvocationChain {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new <code>EndpointInvocationChain</code>.
|
||||
* Create new {@code EndpointInvocationChain}.
|
||||
*
|
||||
* @param endpoint the endpoint object to invoke
|
||||
* @param interceptors the array of interceptors to apply
|
||||
|
||||
@@ -20,15 +20,15 @@ import org.springframework.ws.context.MessageContext;
|
||||
|
||||
/**
|
||||
* Defines a mapping between message requests and endpoint objects.
|
||||
* <p/>
|
||||
* This class can be implemented by application developers, although this is not always necessary, as
|
||||
* <code>PayloadRootQNameEndpointMapping</code> and <code>SoapActionEndpointMapping</code> are included.
|
||||
* <p/>
|
||||
* HandlerMapping implementations can support mapped interceptors but do not have to. An endpoint will always be wrapped
|
||||
* in a <code>EndpointExecutionChain</code> instance, optionally accompanied by some <code>EndpointInterceptor</code>
|
||||
* instances. The <code>MessageDispacher</code> will first call each <code>EndpointInterceptor</code>'s
|
||||
* <code>handlerRequest</code> method in the given order, finally invoking the endpoint itself if all
|
||||
* <code>handlerRequest</code> methods have returned <code>true</code>.
|
||||
*
|
||||
* <p>This class can be implemented by application developers, although this is not always necessary, as
|
||||
* {@code PayloadRootQNameEndpointMapping} and {@code SoapActionEndpointMapping} are included.
|
||||
*
|
||||
* <p>HandlerMapping implementations can support mapped interceptors but do not have to. An endpoint will always be wrapped
|
||||
* in a {@code EndpointExecutionChain} instance, optionally accompanied by some {@code EndpointInterceptor}
|
||||
* instances. The {@code MessageDispacher} will first call each {@code EndpointInterceptor}'s
|
||||
* {@code handlerRequest} method in the given order, finally invoking the endpoint itself if all
|
||||
* {@code handlerRequest} methods have returned {@code true}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping
|
||||
@@ -41,16 +41,16 @@ public interface EndpointMapping {
|
||||
/**
|
||||
* Returns an endpoint and any interceptors for this message context. The choice may be made on message contents,
|
||||
* transport request url, a routing table, or any factor the implementing class chooses.
|
||||
* <p/>
|
||||
* The returned <code>EndpointExecutionChain</code> contains an endpoint Object, rather than even a tag interface,
|
||||
* so that endpoints are not constrained in any way. For example, a <code>EndpointAdapter</code> could be written to
|
||||
*
|
||||
* <p>The returned {@code EndpointExecutionChain} contains an endpoint Object, rather than even a tag interface,
|
||||
* so that endpoints are not constrained in any way. For example, a {@code EndpointAdapter} could be written to
|
||||
* allow another framework's endpoint objects to be used.
|
||||
* <p/>
|
||||
* Returns <code>null</code> if no match was found. This is by design. The <code>MessageDispatcher</code> will query
|
||||
* all registered <code>EndpointMapping</code> beans to find a match, and only decide there is an error if none can
|
||||
*
|
||||
* <p>Returns {@code null} if no match was found. This is by design. The {@code MessageDispatcher} will query
|
||||
* all registered {@code EndpointMapping} beans to find a match, and only decide there is an error if none can
|
||||
* find an endpoint.
|
||||
*
|
||||
* @return a HandlerExecutionChain instance containing endpoint object and any interceptors, or <code>null</code> if
|
||||
* @return a HandlerExecutionChain instance containing endpoint object and any interceptors, or {@code null} if
|
||||
* no mapping is found
|
||||
* @throws Exception if there is an internal error
|
||||
*/
|
||||
|
||||
@@ -49,8 +49,8 @@ import org.springframework.ws.transport.WebServiceMessageReceiver;
|
||||
|
||||
/**
|
||||
* Central dispatcher for use within Spring-WS, dispatching Web service messages to registered endpoints.
|
||||
* <p/>
|
||||
* This dispatcher is quite similar to Spring MVCs {@link DispatcherServlet}. Just like its counterpart, this dispatcher
|
||||
*
|
||||
* <p>This dispatcher is quite similar to Spring MVCs {@link DispatcherServlet}. Just like its counterpart, this dispatcher
|
||||
* is very flexible. This class is SOAP agnostic; in typical SOAP Web Services, the {@link SoapMessageDispatcher}
|
||||
* subclass is used.
|
||||
* <ul>
|
||||
@@ -113,37 +113,37 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa
|
||||
/** List of EndpointMappings used in this dispatcher. */
|
||||
private List<EndpointMapping> endpointMappings;
|
||||
|
||||
/** Initializes a new instance of the <code>MessageDispatcher</code>. */
|
||||
/** Initializes a new instance of the {@code MessageDispatcher}. */
|
||||
public MessageDispatcher() {
|
||||
defaultStrategiesHelper = new DefaultStrategiesHelper(getClass());
|
||||
}
|
||||
|
||||
/** Returns the <code>EndpointAdapter</code>s to use by this <code>MessageDispatcher</code>. */
|
||||
/** Returns the {@code EndpointAdapter}s to use by this {@code MessageDispatcher}. */
|
||||
public List<EndpointAdapter> getEndpointAdapters() {
|
||||
return endpointAdapters;
|
||||
}
|
||||
|
||||
/** Sets the <code>EndpointAdapter</code>s to use by this <code>MessageDispatcher</code>. */
|
||||
/** Sets the {@code EndpointAdapter}s to use by this {@code MessageDispatcher}. */
|
||||
public void setEndpointAdapters(List<EndpointAdapter> endpointAdapters) {
|
||||
this.endpointAdapters = endpointAdapters;
|
||||
}
|
||||
|
||||
/** Returns the <code>EndpointExceptionResolver</code>s to use by this <code>MessageDispatcher</code>. */
|
||||
/** Returns the {@code EndpointExceptionResolver}s to use by this {@code MessageDispatcher}. */
|
||||
public List<EndpointExceptionResolver> getEndpointExceptionResolvers() {
|
||||
return endpointExceptionResolvers;
|
||||
}
|
||||
|
||||
/** Sets the <code>EndpointExceptionResolver</code>s to use by this <code>MessageDispatcher</code>. */
|
||||
/** Sets the {@code EndpointExceptionResolver}s to use by this {@code MessageDispatcher}. */
|
||||
public void setEndpointExceptionResolvers(List<EndpointExceptionResolver> endpointExceptionResolvers) {
|
||||
this.endpointExceptionResolvers = endpointExceptionResolvers;
|
||||
}
|
||||
|
||||
/** Returns the <code>EndpointMapping</code>s to use by this <code>MessageDispatcher</code>. */
|
||||
/** Returns the {@code EndpointMapping}s to use by this {@code MessageDispatcher}. */
|
||||
public List<EndpointMapping> getEndpointMappings() {
|
||||
return endpointMappings;
|
||||
}
|
||||
|
||||
/** Sets the <code>EndpointMapping</code>s to use by this <code>MessageDispatcher</code>. */
|
||||
/** Sets the {@code EndpointMapping}s to use by this {@code MessageDispatcher}. */
|
||||
public void setEndpointMappings(List<EndpointMapping> endpointMappings) {
|
||||
this.endpointMappings = endpointMappings;
|
||||
}
|
||||
@@ -265,7 +265,7 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa
|
||||
/**
|
||||
* Returns the endpoint for this request. All endpoint mappings are tried, in order.
|
||||
*
|
||||
* @return the <code>EndpointInvocationChain</code>, or <code>null</code> if no endpoint could be found.
|
||||
* @return the {@code EndpointInvocationChain}, or {@code null} if no endpoint could be found.
|
||||
*/
|
||||
protected EndpointInvocationChain getEndpoint(MessageContext messageContext) throws Exception {
|
||||
for (EndpointMapping endpointMapping : getEndpointMappings()) {
|
||||
@@ -285,7 +285,7 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the <code>EndpointAdapter</code> for the given endpoint.
|
||||
* Returns the {@code EndpointAdapter} for the given endpoint.
|
||||
*
|
||||
* @param endpoint the endpoint to find an adapter for
|
||||
* @return the adapter
|
||||
@@ -305,21 +305,21 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa
|
||||
|
||||
/**
|
||||
* Callback for pre-processing of given invocation chain and message context. Gets called before invocation of
|
||||
* <code>handleRequest</code> on the interceptors.
|
||||
* <p/>
|
||||
* Default implementation does nothing, and returns <code>true</code>.
|
||||
* {@code handleRequest} on the interceptors.
|
||||
*
|
||||
* @param mappedEndpoint the mapped <code>EndpointInvocationChain</code>
|
||||
* <p>Default implementation does nothing, and returns {@code true}.
|
||||
*
|
||||
* @param mappedEndpoint the mapped {@code EndpointInvocationChain}
|
||||
* @param messageContext the message context
|
||||
* @return <code>true</code> if processing should continue; <code>false</code> otherwise
|
||||
* @return {@code true} if processing should continue; {@code false} otherwise
|
||||
*/
|
||||
protected boolean handleRequest(EndpointInvocationChain mappedEndpoint, MessageContext messageContext) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine an error <code>SOAPMessage</code> response via the registered <code>EndpointExceptionResolvers</code>.
|
||||
* Most likely, the response contains a <code>SOAPFault</code>. If no suitable resolver was found, the exception is
|
||||
* Determine an error {@code SOAPMessage} response via the registered {@code EndpointExceptionResolvers}.
|
||||
* Most likely, the response contains a {@code SOAPFault}. If no suitable resolver was found, the exception is
|
||||
* rethrown.
|
||||
*
|
||||
* @param messageContext current SOAPMessage request
|
||||
@@ -345,8 +345,8 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa
|
||||
|
||||
/**
|
||||
* Trigger handleResponse or handleFault on the mapped EndpointInterceptors. Will just invoke said method on all
|
||||
* interceptors whose handleRequest invocation returned <code>true</code>, in addition to the last interceptor who
|
||||
* returned <code>false</code>.
|
||||
* interceptors whose handleRequest invocation returned {@code true}, in addition to the last interceptor who
|
||||
* returned {@code false}.
|
||||
*
|
||||
* @param mappedEndpoint the mapped EndpointInvocationChain
|
||||
* @param interceptorIndex index of last interceptor that was called
|
||||
@@ -381,11 +381,11 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa
|
||||
* Trigger afterCompletion callbacks on the mapped EndpointInterceptors.
|
||||
* Will just invoke afterCompletion for all interceptors whose handleRequest invocation
|
||||
* has successfully completed and returned true, in addition to the last interceptor who
|
||||
* returned <code>false</code>.
|
||||
* returned {@code false}.
|
||||
*
|
||||
* @param mappedEndpoint the mapped EndpointInvocationChain
|
||||
* @param interceptorIndex index of last interceptor that successfully completed
|
||||
* @param ex Exception thrown on handler execution, or <code>null</code> if none
|
||||
* @param ex Exception thrown on handler execution, or {@code null} if none
|
||||
* @see EndpointInterceptor#afterCompletion
|
||||
*/
|
||||
private void triggerAfterCompletion(EndpointInvocationChain mappedEndpoint,
|
||||
@@ -412,8 +412,8 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the <code>EndpointAdapters</code> used by this class. If no adapter beans are explicitly set by using
|
||||
* the <code>endpointAdapters</code> property, we use the default strategies.
|
||||
* Initialize the {@code EndpointAdapters} used by this class. If no adapter beans are explicitly set by using
|
||||
* the {@code endpointAdapters} property, we use the default strategies.
|
||||
*
|
||||
* @see #setEndpointAdapters(java.util.List)
|
||||
*/
|
||||
@@ -436,8 +436,8 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the <code>EndpointExceptionResolver</code> used by this class. If no resolver beans are explicitly set
|
||||
* by using the <code>endpointExceptionResolvers</code> property, we use the default strategies.
|
||||
* Initialize the {@code EndpointExceptionResolver} used by this class. If no resolver beans are explicitly set
|
||||
* by using the {@code endpointExceptionResolvers} property, we use the default strategies.
|
||||
*
|
||||
* @see #setEndpointExceptionResolvers(java.util.List)
|
||||
*/
|
||||
@@ -460,8 +460,8 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the <code>EndpointMappings</code> used by this class. If no mapping beans are explictely set by using
|
||||
* the <code>endpointMappings</code> property, we use the default strategies.
|
||||
* Initialize the {@code EndpointMappings} used by this class. If no mapping beans are explictely set by using
|
||||
* the {@code endpointMappings} property, we use the default strategies.
|
||||
*
|
||||
* @see #setEndpointMappings(java.util.List)
|
||||
*/
|
||||
|
||||
@@ -32,9 +32,9 @@ import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
|
||||
/**
|
||||
* Abstract base class for endpoints that handle the message payload as dom4j elements. Offers the message payload as a
|
||||
* dom4j <code>Element</code>, and allows subclasses to create a response by returning an <code>Element</code>.
|
||||
* <p/>
|
||||
* An <code>AbstractDom4JPayloadEndpoint</code> only accept one payload element. Multiple payload elements are not in
|
||||
* dom4j {@code Element}, and allows subclasses to create a response by returning an {@code Element}.
|
||||
*
|
||||
* <p>An {@code AbstractDom4JPayloadEndpoint} only accept one payload element. Multiple payload elements are not in
|
||||
* accordance with WS-I.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -49,8 +49,8 @@ public abstract class AbstractDom4jPayloadEndpoint extends TransformerObjectSupp
|
||||
|
||||
/**
|
||||
* Set if the request {@link Source} should always be transformed into a new {@link DocumentResult}.
|
||||
* <p/>
|
||||
* Default is {@code false}, which is faster.
|
||||
*
|
||||
* <p>Default is {@code false}, which is faster.
|
||||
*/
|
||||
public void setAlwaysTransform(boolean alwaysTransform) {
|
||||
this.alwaysTransform = alwaysTransform;
|
||||
@@ -71,8 +71,8 @@ public abstract class AbstractDom4jPayloadEndpoint extends TransformerObjectSupp
|
||||
|
||||
/**
|
||||
* Returns the payload element of the given source.
|
||||
* <p/>
|
||||
* Default implementation checks whether the source is a {@link javax.xml.transform.dom.DOMSource}, and uses a
|
||||
*
|
||||
* <p>Default implementation checks whether the source is a {@link javax.xml.transform.dom.DOMSource}, and uses a
|
||||
* {@link org.jdom.input.DOMBuilder} to create a JDOM {@link org.jdom.Element}. In all other cases, or when
|
||||
* {@linkplain #setAlwaysTransform(boolean) alwaysTransform} is {@code true}, the source is transformed into a
|
||||
* {@link org.jdom.transform.JDOMResult}, which is more expensive. If the passed source is {@code null}, {@code
|
||||
@@ -102,15 +102,15 @@ public abstract class AbstractDom4jPayloadEndpoint extends TransformerObjectSupp
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method. Subclasses must implement this. Offers the request payload as a dom4j <code>Element</code>, and
|
||||
* allows subclasses to return a response <code>Element</code>.
|
||||
* <p/>
|
||||
* The given dom4j <code>Document</code> is to be used for constructing a response element, by using
|
||||
* <code>addElement</code>.
|
||||
* Template method. Subclasses must implement this. Offers the request payload as a dom4j {@code Element}, and
|
||||
* allows subclasses to return a response {@code Element}.
|
||||
*
|
||||
* <p>The given dom4j {@code Document} is to be used for constructing a response element, by using
|
||||
* {@code addElement}.
|
||||
*
|
||||
* @param requestElement the contents of the SOAP message as dom4j elements
|
||||
* @param responseDocument a dom4j document to be used for constructing a response
|
||||
* @return the response element. Can be <code>null</code> to specify no response.
|
||||
* @return the response element. Can be {@code null} to specify no response.
|
||||
*/
|
||||
protected abstract Element invokeInternal(Element requestElement, Document responseDocument) throws Exception;
|
||||
}
|
||||
|
||||
@@ -32,11 +32,11 @@ import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
|
||||
/**
|
||||
* Abstract base class for endpoints that handle the message payload as DOM elements.
|
||||
* <p/>
|
||||
* Offers the message payload as a DOM <code>Element</code>, and allows subclasses to create a response by returning an
|
||||
* <code>Element</code>.
|
||||
* <p/>
|
||||
* An <code>AbstractDomPayloadEndpoint</code> only accept <em>one</em> payload element. Multiple payload elements are
|
||||
*
|
||||
* <p>Offers the message payload as a DOM {@code Element}, and allows subclasses to create a response by returning an
|
||||
* {@code Element}.
|
||||
*
|
||||
* <p>An {@code AbstractDomPayloadEndpoint} only accept <em>one</em> payload element. Multiple payload elements are
|
||||
* not in accordance with WS-I.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -58,12 +58,12 @@ public abstract class AbstractDomPayloadEndpoint extends TransformerObjectSuppor
|
||||
|
||||
private boolean alwaysTransform = false;
|
||||
|
||||
/** Set whether or not the XML parser should be XML namespace aware. Default is <code>true</code>. */
|
||||
/** Set whether or not the XML parser should be XML namespace aware. Default is {@code true}. */
|
||||
public void setNamespaceAware(boolean namespaceAware) {
|
||||
this.namespaceAware = namespaceAware;
|
||||
}
|
||||
|
||||
/** Set if the XML parser should validate the document. Default is <code>false</code>. */
|
||||
/** Set if the XML parser should validate the document. Default is {@code false}. */
|
||||
public void setValidating(boolean validating) {
|
||||
this.validating = validating;
|
||||
}
|
||||
@@ -79,8 +79,8 @@ public abstract class AbstractDomPayloadEndpoint extends TransformerObjectSuppor
|
||||
|
||||
/**
|
||||
* Set if the request {@link Source} should always be transformed into a new {@link DOMResult}.
|
||||
* <p/>
|
||||
* Default is {@code false}, which is faster.
|
||||
*
|
||||
* <p>Default is {@code false}, which is faster.
|
||||
*/
|
||||
public void setAlwaysTransform(boolean alwaysTransform) {
|
||||
this.alwaysTransform = alwaysTransform;
|
||||
@@ -99,11 +99,11 @@ public abstract class AbstractDomPayloadEndpoint extends TransformerObjectSuppor
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>DocumentBuilder</code> that this endpoint will use for parsing XML documents. Can be overridden in
|
||||
* Create a {@code DocumentBuilder} that this endpoint will use for parsing XML documents. Can be overridden in
|
||||
* subclasses, adding further initialization of the builder.
|
||||
*
|
||||
* @param factory the <code>DocumentBuilderFactory</code> that the DocumentBuilder should be created with
|
||||
* @return the <code>DocumentBuilder</code>
|
||||
* @param factory the {@code DocumentBuilderFactory} that the DocumentBuilder should be created with
|
||||
* @return the {@code DocumentBuilder}
|
||||
* @throws ParserConfigurationException if thrown by JAXP methods
|
||||
*/
|
||||
protected DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory)
|
||||
@@ -112,9 +112,9 @@ public abstract class AbstractDomPayloadEndpoint extends TransformerObjectSuppor
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>DocumentBuilderFactory</code> that this endpoint will use for constructing XML documents. Can be
|
||||
* Create a {@code DocumentBuilderFactory} that this endpoint will use for constructing XML documents. Can be
|
||||
* overridden in subclasses, adding further initialization of the factory. The resulting
|
||||
* <code>DocumentBuilderFactory</code> is cached, so this method will only be called once.
|
||||
* {@code DocumentBuilderFactory} is cached, so this method will only be called once.
|
||||
*
|
||||
* @return the DocumentBuilderFactory
|
||||
* @throws ParserConfigurationException if thrown by JAXP methods
|
||||
@@ -129,8 +129,8 @@ public abstract class AbstractDomPayloadEndpoint extends TransformerObjectSuppor
|
||||
|
||||
/**
|
||||
* Returns the payload element of the given source.
|
||||
* <p/>
|
||||
* Default implementation checks whether the source is a {@link DOMSource}, and returns the {@linkplain
|
||||
*
|
||||
* <p>Default implementation checks whether the source is a {@link DOMSource}, and returns the {@linkplain
|
||||
* DOMSource#getNode() node} of that. In all other cases, or when {@linkplain #setAlwaysTransform(boolean)
|
||||
* alwaysTransform} is {@code true}, the source is transformed into a {@link DOMResult}, which is more expensive. If
|
||||
* the passed source is {@code null}, {@code null} is returned.
|
||||
@@ -162,16 +162,16 @@ public abstract class AbstractDomPayloadEndpoint extends TransformerObjectSuppor
|
||||
|
||||
/**
|
||||
* Template method that subclasses must implement to process the request.
|
||||
* <p/>
|
||||
* <p>Offers the request payload as a DOM <code>Element</code>, and allows subclasses to return a response
|
||||
* <code>Element</code>.
|
||||
* <p/>
|
||||
* <p>The given DOM <code>Document</code> is to be used for constructing <code>Node</code>s, by using the various
|
||||
* <code>create</code> methods.
|
||||
*
|
||||
* <p>Offers the request payload as a DOM {@code Element}, and allows subclasses to return a response
|
||||
* {@code Element}.
|
||||
*
|
||||
* <p>The given DOM {@code Document} is to be used for constructing {@code Node}s, by using the various
|
||||
* {@code create} methods.
|
||||
*
|
||||
* @param requestElement the contents of the SOAP message as DOM elements
|
||||
* @param responseDocument a DOM document to be used for constructing <code>Node</code>s
|
||||
* @return the response element. Can be <code>null</code> to specify no response.
|
||||
* @param responseDocument a DOM document to be used for constructing {@code Node}s
|
||||
* @return the response element. Can be {@code null} to specify no response.
|
||||
*/
|
||||
protected abstract Element invokeInternal(Element requestElement, Document responseDocument) throws Exception;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.ws.server.EndpointExceptionResolver;
|
||||
|
||||
/**
|
||||
* Abstract base class for {@link EndpointExceptionResolver EndpointExceptionResolvers}.
|
||||
* <p/>
|
||||
*
|
||||
* <p>Provides a set of mapped endpoints that the resolver should map.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -48,10 +48,10 @@ public abstract class AbstractEndpointExceptionResolver implements EndpointExcep
|
||||
/**
|
||||
* Specify the set of endpoints that this exception resolver should map. <p>The exception mappings and the default
|
||||
* fault will only apply to the specified endpoints.
|
||||
* <p/>
|
||||
* If no endpoints are set, both the exception mappings and the default fault will apply to all handlers. This means
|
||||
*
|
||||
* <p>If no endpoints are set, both the exception mappings and the default fault will apply to all handlers. This means
|
||||
* that a specified default fault will be used as fallback for all exceptions; any further
|
||||
* <code>EndpointExceptionResolvers</code> in the chain will be ignored in this case.
|
||||
* {@code EndpointExceptionResolvers} in the chain will be ignored in this case.
|
||||
*/
|
||||
public void setMappedEndpoints(Set<?> mappedEndpoints) {
|
||||
this.mappedEndpoints = mappedEndpoints;
|
||||
@@ -60,8 +60,8 @@ public abstract class AbstractEndpointExceptionResolver implements EndpointExcep
|
||||
/**
|
||||
* Set the log category for warn logging. The name will be passed to the underlying logger implementation through
|
||||
* Commons Logging, getting interpreted as log category according to the logger's configuration.
|
||||
* <p/>
|
||||
* Default is no warn logging. Specify this setting to activate warn logging into a specific category.
|
||||
*
|
||||
* <p>Default is no warn logging. Specify this setting to activate warn logging into a specific category.
|
||||
* Alternatively, override the {@link #logException} method for custom logging.
|
||||
*
|
||||
* @see org.apache.commons.logging.LogFactory#getLog(String)
|
||||
@@ -74,8 +74,8 @@ public abstract class AbstractEndpointExceptionResolver implements EndpointExcep
|
||||
|
||||
/**
|
||||
* Specify the order value for this mapping.
|
||||
* <p/>
|
||||
* Default value is {@link Integer#MAX_VALUE}, meaning that it's non-ordered.
|
||||
*
|
||||
* <p>Default value is {@link Integer#MAX_VALUE}, meaning that it's non-ordered.
|
||||
*
|
||||
* @see org.springframework.core.Ordered#getOrder()
|
||||
*/
|
||||
@@ -89,7 +89,7 @@ public abstract class AbstractEndpointExceptionResolver implements EndpointExcep
|
||||
}
|
||||
|
||||
/**
|
||||
* Default implementation that checks whether the given <code>endpoint</code> is in the set of {@link
|
||||
* Default implementation that checks whether the given {@code endpoint} is in the set of {@link
|
||||
* #setMappedEndpoints mapped endpoints}.
|
||||
*
|
||||
* @see #resolveExceptionInternal(MessageContext,Object,Exception)
|
||||
@@ -111,8 +111,8 @@ public abstract class AbstractEndpointExceptionResolver implements EndpointExcep
|
||||
/**
|
||||
* Log the given exception at warn level, provided that warn logging has been activated through the {@link
|
||||
* #setWarnLogCategory "warnLogCategory"} property.
|
||||
* <p/>
|
||||
* Calls {@link #buildLogMessage} in order to determine the concrete message to log. Always passes the full
|
||||
*
|
||||
* <p>Calls {@link #buildLogMessage} in order to determine the concrete message to log. Always passes the full
|
||||
* exception to the logger.
|
||||
*
|
||||
* @param ex the exception that got thrown during handler execution
|
||||
@@ -142,9 +142,9 @@ public abstract class AbstractEndpointExceptionResolver implements EndpointExcep
|
||||
* Template method for resolving exceptions that is called by {@link #resolveException}.
|
||||
*
|
||||
* @param messageContext current message context
|
||||
* @param endpoint the executed endpoint, or <code>null</code> if none chosen at the time of the exception
|
||||
* @param endpoint the executed endpoint, or {@code null} if none chosen at the time of the exception
|
||||
* @param ex the exception that got thrown during endpoint execution
|
||||
* @return <code>true</code> if resolved; <code>false</code> otherwise
|
||||
* @return {@code true} if resolved; {@code false} otherwise
|
||||
* @see #resolveException(MessageContext,Object,Exception)
|
||||
*/
|
||||
protected abstract boolean resolveExceptionInternal(MessageContext messageContext, Object endpoint, Exception ex);
|
||||
|
||||
@@ -31,11 +31,11 @@ import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
|
||||
/**
|
||||
* Abstract base class for endpoints that handle the message payload as JDOM elements.
|
||||
* <p/>
|
||||
*
|
||||
* <p>Offers the message payload as a JDOM {@link Element}, and allows subclasses to create a response by returning an
|
||||
* <code>Element</code>.
|
||||
* <p/>
|
||||
* <pAn <code>AbstractJDomPayloadEndpoint</code> can accept only <i>one</i> payload element. Multiple payload elements
|
||||
* {@code Element}.
|
||||
*
|
||||
* <pAn {@code AbstractJDomPayloadEndpoint} can accept only <i>one</i> payload element. Multiple payload elements
|
||||
* are not in accordance with WS-I.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -49,8 +49,8 @@ public abstract class AbstractJDomPayloadEndpoint extends TransformerObjectSuppo
|
||||
|
||||
/**
|
||||
* Set if the request {@link Source} should always be transformed into a new {@link JDOMResult}.
|
||||
* <p/>
|
||||
* Default is {@code false}, which is faster.
|
||||
*
|
||||
* <p>Default is {@code false}, which is faster.
|
||||
*/
|
||||
public void setAlwaysTransform(boolean alwaysTransform) {
|
||||
this.alwaysTransform = alwaysTransform;
|
||||
@@ -65,8 +65,8 @@ public abstract class AbstractJDomPayloadEndpoint extends TransformerObjectSuppo
|
||||
|
||||
/**
|
||||
* Returns the payload element of the given source.
|
||||
* <p/>
|
||||
* Default implementation checks whether the source is a {@link DOMSource}, and uses a {@link DOMBuilder} to create
|
||||
*
|
||||
* <p>Default implementation checks whether the source is a {@link DOMSource}, and uses a {@link DOMBuilder} to create
|
||||
* a JDOM {@link Element}. In all other cases, or when {@linkplain #setAlwaysTransform(boolean) alwaysTransform} is
|
||||
* {@code true}, the source is transformed into a {@link JDOMResult}, which is more expensive. If the passed source
|
||||
* is {@code null}, {@code null} is returned.
|
||||
@@ -97,11 +97,11 @@ public abstract class AbstractJDomPayloadEndpoint extends TransformerObjectSuppo
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method. Subclasses must implement this. Offers the request payload as a JDOM <code>Element</code>, and
|
||||
* allows subclasses to return a response <code>Element</code>.
|
||||
* Template method. Subclasses must implement this. Offers the request payload as a JDOM {@code Element}, and
|
||||
* allows subclasses to return a response {@code Element}.
|
||||
*
|
||||
* @param requestElement the contents of the SOAP message as JDOM element
|
||||
* @return the response element. Can be <code>null</code> to specify no response.
|
||||
* @return the response element. Can be {@code null} to specify no response.
|
||||
*/
|
||||
protected abstract Element invokeInternal(Element requestElement) throws Exception;
|
||||
}
|
||||
|
||||
@@ -33,9 +33,9 @@ import org.springframework.ws.server.EndpointInterceptor;
|
||||
import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
|
||||
/**
|
||||
* Abstract base class for <code>EndpointInterceptor</code> instances that log a part of a
|
||||
* <code>WebServiceMessage</code>. By default, both request and response messages are logged, but this behaviour can be
|
||||
* changed using the <code>logRequest</code> and <code>logResponse</code> properties.
|
||||
* Abstract base class for {@code EndpointInterceptor} instances that log a part of a
|
||||
* {@code WebServiceMessage}. By default, both request and response messages are logged, but this behaviour can be
|
||||
* changed using the {@code logRequest} and {@code logResponse} properties.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
@@ -43,8 +43,8 @@ import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
public abstract class AbstractLoggingInterceptor extends TransformerObjectSupport implements EndpointInterceptor {
|
||||
|
||||
/**
|
||||
* The default <code>Log</code> instance used to write trace messages. This instance is mapped to the implementing
|
||||
* <code>Class</code>.
|
||||
* The default {@code Log} instance used to write trace messages. This instance is mapped to the implementing
|
||||
* {@code Class}.
|
||||
*/
|
||||
protected transient Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
@@ -52,12 +52,12 @@ public abstract class AbstractLoggingInterceptor extends TransformerObjectSuppor
|
||||
|
||||
private boolean logResponse = true;
|
||||
|
||||
/** Indicates whether the request should be logged. Default is <code>true</code>. */
|
||||
/** Indicates whether the request should be logged. Default is {@code true}. */
|
||||
public final void setLogRequest(boolean logRequest) {
|
||||
this.logRequest = logRequest;
|
||||
}
|
||||
|
||||
/** Indicates whether the response should be logged. Default is <code>true</code>. */
|
||||
/** Indicates whether the response should be logged. Default is {@code true}. */
|
||||
public final void setLogResponse(boolean logResponse) {
|
||||
this.logResponse = logResponse;
|
||||
}
|
||||
@@ -65,8 +65,8 @@ public abstract class AbstractLoggingInterceptor extends TransformerObjectSuppor
|
||||
/**
|
||||
* Set the name of the logger to use. The name will be passed to the underlying logger implementation through
|
||||
* Commons Logging, getting interpreted as log category according to the logger's configuration.
|
||||
* <p/>
|
||||
* This can be specified to not log into the category of a class but rather into a specific named category.
|
||||
*
|
||||
* <p>This can be specified to not log into the category of a class but rather into a specific named category.
|
||||
*
|
||||
* @see org.apache.commons.logging.LogFactory#getLog(String)
|
||||
* @see org.apache.log4j.Logger#getLogger(String)
|
||||
@@ -77,11 +77,11 @@ public abstract class AbstractLoggingInterceptor extends TransformerObjectSuppor
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs the request message payload. Logging only occurs if <code>logRequest</code> is set to <code>true</code>,
|
||||
* Logs the request message payload. Logging only occurs if {@code logRequest} is set to {@code true},
|
||||
* which is the default.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @return <code>true</code>
|
||||
* @return {@code true}
|
||||
* @throws TransformerException when the payload cannot be transformed to a string
|
||||
*/
|
||||
@Override
|
||||
@@ -93,11 +93,11 @@ public abstract class AbstractLoggingInterceptor extends TransformerObjectSuppor
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs the response message payload. Logging only occurs if <code>logResponse</code> is set to <code>true</code>,
|
||||
* Logs the response message payload. Logging only occurs if {@code logResponse} is set to {@code true},
|
||||
* which is the default.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @return <code>true</code>
|
||||
* @return {@code true}
|
||||
* @throws TransformerException when the payload cannot be transformed to a string
|
||||
*/
|
||||
@Override
|
||||
@@ -121,8 +121,8 @@ public abstract class AbstractLoggingInterceptor extends TransformerObjectSuppor
|
||||
|
||||
/**
|
||||
* Determine whether the {@link #logger} field is enabled.
|
||||
* <p/>
|
||||
* Default is <code>true</code> when the "debug" level is enabled. Subclasses can override this to change the level
|
||||
*
|
||||
* <p>Default is {@code true} when the "debug" level is enabled. Subclasses can override this to change the level
|
||||
* under which logging occurs.
|
||||
*/
|
||||
protected boolean isLogEnabled() {
|
||||
@@ -138,8 +138,8 @@ public abstract class AbstractLoggingInterceptor extends TransformerObjectSuppor
|
||||
|
||||
/**
|
||||
* Logs the given {@link Source source} to the {@link #logger}, using the message as a prefix.
|
||||
* <p/>
|
||||
* By default, this message creates a string representation of the given source, and delegates to {@link
|
||||
*
|
||||
* <p>By default, this message creates a string representation of the given source, and delegates to {@link
|
||||
* #logMessage(String)}.
|
||||
*
|
||||
* @param logMessage the log message
|
||||
@@ -158,8 +158,8 @@ public abstract class AbstractLoggingInterceptor extends TransformerObjectSuppor
|
||||
|
||||
/**
|
||||
* Logs the given string message.
|
||||
* <p/>
|
||||
* By default, this method uses a "debug" level of logging. Subclasses can override this method to change the level
|
||||
*
|
||||
* <p>By default, this method uses a "debug" level of logging. Subclasses can override this method to change the level
|
||||
* of logging used by the logger.
|
||||
*
|
||||
* @param message the message
|
||||
@@ -169,7 +169,7 @@ public abstract class AbstractLoggingInterceptor extends TransformerObjectSuppor
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract template method that returns the <code>Source</code> for the given <code>WebServiceMessage</code>.
|
||||
* Abstract template method that returns the {@code Source} for the given {@code WebServiceMessage}.
|
||||
*
|
||||
* @param message the message
|
||||
* @return the source of the message
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.ws.support.MarshallingUtils;
|
||||
|
||||
/**
|
||||
* Endpoint that unmarshals the request payload, and marshals the response object. This endpoint needs a
|
||||
* <code>Marshaller</code> and <code>Unmarshaller</code>, both of which can be set using properties. An abstract
|
||||
* {@code Marshaller} and {@code Unmarshaller}, both of which can be set using properties. An abstract
|
||||
* template method is invoked using the request object as a parameter, and allows for a response object to be returned.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -54,7 +54,7 @@ public abstract class AbstractMarshallingPayloadEndpoint implements MessageEndpo
|
||||
private Unmarshaller unmarshaller;
|
||||
|
||||
/**
|
||||
* Creates a new <code>AbstractMarshallingPayloadEndpoint</code>. The {@link Marshaller} and {@link Unmarshaller}
|
||||
* Creates a new {@code AbstractMarshallingPayloadEndpoint}. The {@link Marshaller} and {@link Unmarshaller}
|
||||
* must be injected using properties.
|
||||
*
|
||||
* @see #setMarshaller(org.springframework.oxm.Marshaller)
|
||||
@@ -64,15 +64,15 @@ public abstract class AbstractMarshallingPayloadEndpoint implements MessageEndpo
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>AbstractMarshallingPayloadEndpoint</code> with the given marshaller. The given {@link
|
||||
* Creates a new {@code AbstractMarshallingPayloadEndpoint} with the given marshaller. The given {@link
|
||||
* Marshaller} should also implements the {@link Unmarshaller}, since it is used for both marshalling and
|
||||
* unmarshalling. If it is not, an exception is thrown.
|
||||
* <p/>
|
||||
* Note that all {@link Marshaller} implementations in Spring-WS also implement the {@link Unmarshaller} interface,
|
||||
*
|
||||
* <p>Note that all {@link Marshaller} implementations in Spring-WS also implement the {@link Unmarshaller} interface,
|
||||
* so that you can safely use this constructor.
|
||||
*
|
||||
* @param marshaller object used as marshaller and unmarshaller
|
||||
* @throws IllegalArgumentException when <code>marshaller</code> does not implement the {@link Unmarshaller}
|
||||
* @throws IllegalArgumentException when {@code marshaller} does not implement the {@link Unmarshaller}
|
||||
* interface
|
||||
* @see #AbstractMarshallingPayloadEndpoint(Marshaller,Unmarshaller)
|
||||
*/
|
||||
@@ -90,7 +90,7 @@ public abstract class AbstractMarshallingPayloadEndpoint implements MessageEndpo
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>AbstractMarshallingPayloadEndpoint</code> with the given marshaller and unmarshaller.
|
||||
* Creates a new {@code AbstractMarshallingPayloadEndpoint} with the given marshaller and unmarshaller.
|
||||
*
|
||||
* @param marshaller the marshaller to use
|
||||
* @param unmarshaller the unmarshaller to use
|
||||
@@ -154,12 +154,12 @@ public abstract class AbstractMarshallingPayloadEndpoint implements MessageEndpo
|
||||
/**
|
||||
* Callback for post-processing in terms of unmarshalling. Called on each message request, after standard
|
||||
* unmarshalling.
|
||||
* <p/>
|
||||
* Default implementation returns <code>true</code>.
|
||||
*
|
||||
* <p>Default implementation returns {@code true}.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @param requestObject the object unmarshalled from the {@link MessageContext#getRequest() request}
|
||||
* @return <code>true</code> to continue and call {@link #invokeInternal(Object)}; <code>false</code> otherwise
|
||||
* @return {@code true} to continue and call {@link #invokeInternal(Object)}; {@code false} otherwise
|
||||
*/
|
||||
protected boolean onUnmarshalRequest(MessageContext messageContext, Object requestObject) throws Exception {
|
||||
return true;
|
||||
@@ -177,8 +177,8 @@ public abstract class AbstractMarshallingPayloadEndpoint implements MessageEndpo
|
||||
/**
|
||||
* Callback for post-processing in terms of marshalling. Called on each message request, after standard marshalling
|
||||
* of the response. Only invoked when {@link #invokeInternal(Object)} returns an object.
|
||||
* <p/>
|
||||
* Default implementation is empty.
|
||||
*
|
||||
* <p>Default implementation is empty.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @param requestObject the object unmarshalled from the {@link MessageContext#getRequest() request}
|
||||
@@ -189,8 +189,8 @@ public abstract class AbstractMarshallingPayloadEndpoint implements MessageEndpo
|
||||
|
||||
/**
|
||||
* Template method that gets called after the marshaller and unmarshaller have been set.
|
||||
* <p/>
|
||||
* The default implementation does nothing.
|
||||
*
|
||||
* <p>The default implementation does nothing.
|
||||
*
|
||||
* @deprecated as of Spring Web Services 1.5: {@link #afterPropertiesSet()} is no longer final, so this can safely
|
||||
* be overridden in subclasses
|
||||
@@ -201,12 +201,12 @@ public abstract class AbstractMarshallingPayloadEndpoint implements MessageEndpo
|
||||
|
||||
/**
|
||||
* Template method that subclasses must implement to process a request.
|
||||
* <p/>
|
||||
* The unmarshalled request object is passed as a parameter, and the returned object is marshalled to a response. If
|
||||
* no response is required, return <code>null</code>.
|
||||
*
|
||||
* <p>The unmarshalled request object is passed as a parameter, and the returned object is marshalled to a response. If
|
||||
* no response is required, return {@code null}.
|
||||
*
|
||||
* @param requestObject the unmarshalled message payload as an object
|
||||
* @return the object to be marshalled as response, or <code>null</code> if a response is not required
|
||||
* @return the object to be marshalled as response, or {@code null} if a response is not required
|
||||
*/
|
||||
protected abstract Object invokeInternal(Object requestObject) throws Exception;
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@ import org.xml.sax.ContentHandler;
|
||||
import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
|
||||
/**
|
||||
* Abstract base class for endpoints that handle the message payload with a SAX <code>ContentHandler</code>. Allows
|
||||
* subclasses to create a response by returning a <code>Source</code>.
|
||||
* <p/>
|
||||
* Implementations of this class should create a new handler for each call of <code>createContentHandler</code>, because
|
||||
* of thread safety. The handlers is later passed on to <code>createResponse</code>, so it can be used for holding
|
||||
* Abstract base class for endpoints that handle the message payload with a SAX {@code ContentHandler}. Allows
|
||||
* subclasses to create a response by returning a {@code Source}.
|
||||
*
|
||||
* <p>Implementations of this class should create a new handler for each call of {@code createContentHandler}, because
|
||||
* of thread safety. The handlers is later passed on to {@code createResponse}, so it can be used for holding
|
||||
* request-specific state.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -41,7 +41,7 @@ import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
public abstract class AbstractSaxPayloadEndpoint extends TransformerObjectSupport implements PayloadEndpoint {
|
||||
|
||||
/**
|
||||
* Invokes the provided <code>ContentHandler</code> on the given request. After parsing has been done, the provided
|
||||
* Invokes the provided {@code ContentHandler} on the given request. After parsing has been done, the provided
|
||||
* response is returned.
|
||||
*
|
||||
* @see #createContentHandler()
|
||||
@@ -59,10 +59,10 @@ public abstract class AbstractSaxPayloadEndpoint extends TransformerObjectSuppor
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the SAX <code>ContentHandler</code> used to parse the incoming request payload. A new instance should be
|
||||
* Returns the SAX {@code ContentHandler} used to parse the incoming request payload. A new instance should be
|
||||
* created for each call, because of thread-safety. The content handler can be used to hold request-specific state.
|
||||
* <p/>
|
||||
* If an incoming message does not contain a payload, this method will not be invoked.
|
||||
*
|
||||
* <p>If an incoming message does not contain a payload, this method will not be invoked.
|
||||
*
|
||||
* @return a SAX content handler to be used for parsing
|
||||
*/
|
||||
@@ -70,10 +70,10 @@ public abstract class AbstractSaxPayloadEndpoint extends TransformerObjectSuppor
|
||||
|
||||
/**
|
||||
* Returns the response to be given, if any. This method is called after the request payload has been parsed using
|
||||
* the SAX <code>ContentHandler</code>. The passed <code>ContentHandler</code> is created by {@link
|
||||
* the SAX {@code ContentHandler}. The passed {@code ContentHandler} is created by {@link
|
||||
* #createContentHandler()}: it can be used to hold request-specific state.
|
||||
* <p/>
|
||||
* If an incoming message does not contain a payload, this method will be invoked with <code>null</code> as content
|
||||
*
|
||||
* <p>If an incoming message does not contain a payload, this method will be invoked with {@code null} as content
|
||||
* handler.
|
||||
*
|
||||
* @param contentHandler the content handler used to parse the request
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.ws.context.MessageContext;
|
||||
|
||||
/**
|
||||
* Abstract base class for endpoints that handle the message payload with event-based StAX. Allows subclasses to read
|
||||
* the request with a <code>XMLEventReader</code>, and to create a response using a <code>XMLEventWriter</code>.
|
||||
* the request with a {@code XMLEventReader}, and to create a response using a {@code XMLEventWriter}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see #invokeInternal(javax.xml.stream.XMLEventReader,javax.xml.stream.util.XMLEventConsumer,
|
||||
@@ -62,17 +62,17 @@ public abstract class AbstractStaxEventPayloadEndpoint extends AbstractStaxPaylo
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>XMLEventFactory</code> that this endpoint will use to create <code>XMLEvent</code>s. Can be
|
||||
* Create a {@code XMLEventFactory} that this endpoint will use to create {@code XMLEvent}s. Can be
|
||||
* overridden in subclasses, adding further initialization of the factory. The resulting
|
||||
* <code>XMLEventFactory</code> is cached, so this method will only be called once.
|
||||
* {@code XMLEventFactory} is cached, so this method will only be called once.
|
||||
*
|
||||
* @return the created <code>XMLEventFactory</code>
|
||||
* @return the created {@code XMLEventFactory}
|
||||
*/
|
||||
protected XMLEventFactory createXmlEventFactory() {
|
||||
return XMLEventFactory.newInstance();
|
||||
}
|
||||
|
||||
/** Returns an <code>XMLEventFactory</code> to read XML from. */
|
||||
/** Returns an {@code XMLEventFactory} to read XML from. */
|
||||
private XMLEventFactory getEventFactory() {
|
||||
if (eventFactory == null) {
|
||||
eventFactory = createXmlEventFactory();
|
||||
@@ -137,20 +137,20 @@ public abstract class AbstractStaxEventPayloadEndpoint extends AbstractStaxPaylo
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method. Subclasses must implement this. Offers the request payload as a <code>XMLEventReader</code>, and
|
||||
* a <code>XMLEventWriter</code> to write the response payload to.
|
||||
* Template method. Subclasses must implement this. Offers the request payload as a {@code XMLEventReader}, and
|
||||
* a {@code XMLEventWriter} to write the response payload to.
|
||||
*
|
||||
* @param eventReader the reader to read the payload events from
|
||||
* @param eventWriter the writer to write payload events to
|
||||
* @param eventFactory an <code>XMLEventFactory</code> that can be used to create events
|
||||
* @param eventFactory an {@code XMLEventFactory} that can be used to create events
|
||||
*/
|
||||
protected abstract void invokeInternal(XMLEventReader eventReader,
|
||||
XMLEventConsumer eventWriter,
|
||||
XMLEventFactory eventFactory) throws Exception;
|
||||
|
||||
/**
|
||||
* Implementation of the <code>XMLEventWriter</code> interface that creates a response
|
||||
* <code>WebServiceMessage</code> as soon as any method is called, thus lazily creating the response.
|
||||
* Implementation of the {@code XMLEventWriter} interface that creates a response
|
||||
* {@code WebServiceMessage} as soon as any method is called, thus lazily creating the response.
|
||||
*/
|
||||
private class ResponseCreatingEventWriter implements XMLEventWriter {
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ import javax.xml.stream.XMLOutputFactory;
|
||||
import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
|
||||
/**
|
||||
* Abstract base class for endpoints use StAX. Provides an <code>XMLInputFactory</code> and an
|
||||
* <code>XMLOutputFactory</code>.
|
||||
* Abstract base class for endpoints use StAX. Provides an {@code XMLInputFactory} and an
|
||||
* {@code XMLOutputFactory}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see XMLInputFactory
|
||||
@@ -39,7 +39,7 @@ public abstract class AbstractStaxPayloadEndpoint extends TransformerObjectSuppo
|
||||
|
||||
private XMLOutputFactory outputFactory;
|
||||
|
||||
/** Returns an <code>XMLInputFactory</code> to read XML from. */
|
||||
/** Returns an {@code XMLInputFactory} to read XML from. */
|
||||
protected final XMLInputFactory getInputFactory() {
|
||||
if (inputFactory == null) {
|
||||
inputFactory = createXmlInputFactory();
|
||||
@@ -47,7 +47,7 @@ public abstract class AbstractStaxPayloadEndpoint extends TransformerObjectSuppo
|
||||
return inputFactory;
|
||||
}
|
||||
|
||||
/** Returns an <code>XMLOutputFactory</code> to write XML to. */
|
||||
/** Returns an {@code XMLOutputFactory} to write XML to. */
|
||||
protected final XMLOutputFactory getOutputFactory() {
|
||||
if (outputFactory == null) {
|
||||
outputFactory = createXmlOutputFactory();
|
||||
@@ -56,22 +56,22 @@ public abstract class AbstractStaxPayloadEndpoint extends TransformerObjectSuppo
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>XMLInputFactory</code> that this endpoint will use to create <code>XMLStreamReader</code>s or
|
||||
* <code>XMLEventReader</code>. Can be overridden in subclasses, adding further initialization of the factory. The
|
||||
* resulting <code>XMLInputFactory</code> is cached, so this method will only be called once.
|
||||
* Create a {@code XMLInputFactory} that this endpoint will use to create {@code XMLStreamReader}s or
|
||||
* {@code XMLEventReader}. Can be overridden in subclasses, adding further initialization of the factory. The
|
||||
* resulting {@code XMLInputFactory} is cached, so this method will only be called once.
|
||||
*
|
||||
* @return the created <code>XMLInputFactory</code>
|
||||
* @return the created {@code XMLInputFactory}
|
||||
*/
|
||||
protected XMLInputFactory createXmlInputFactory() {
|
||||
return XMLInputFactory.newInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>XMLOutputFactory</code> that this endpoint will use to create <code>XMLStreamWriters</code>s or
|
||||
* <code>XMLEventWriters</code>. Can be overridden in subclasses, adding further initialization of the factory. The
|
||||
* resulting <code>XMLOutputFactory</code> is cached, so this method will only be called once.
|
||||
* Create a {@code XMLOutputFactory} that this endpoint will use to create {@code XMLStreamWriters}s or
|
||||
* {@code XMLEventWriters}. Can be overridden in subclasses, adding further initialization of the factory. The
|
||||
* resulting {@code XMLOutputFactory} is cached, so this method will only be called once.
|
||||
*
|
||||
* @return the created <code>XMLOutputFactory</code>
|
||||
* @return the created {@code XMLOutputFactory}
|
||||
*/
|
||||
protected XMLOutputFactory createXmlOutputFactory() {
|
||||
return XMLOutputFactory.newInstance();
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.springframework.ws.context.MessageContext;
|
||||
|
||||
/**
|
||||
* Abstract base class for endpoints that handle the message payload with streaming StAX. Allows subclasses to read the
|
||||
* request with a <code>XMLStreamReader</code>, and to create a response using a <code>XMLStreamWriter</code>.
|
||||
* request with a {@code XMLStreamReader}, and to create a response using a {@code XMLStreamWriter}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see #invokeInternal(javax.xml.stream.XMLStreamReader,javax.xml.stream.XMLStreamWriter)
|
||||
@@ -114,8 +114,8 @@ public abstract class AbstractStaxStreamPayloadEndpoint extends AbstractStaxPayl
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method. Subclasses must implement this. Offers the request payload as a <code>XMLStreamReader</code>,
|
||||
* and a <code>XMLStreamWriter</code> to write the response payload to.
|
||||
* Template method. Subclasses must implement this. Offers the request payload as a {@code XMLStreamReader},
|
||||
* and a {@code XMLStreamWriter} to write the response payload to.
|
||||
*
|
||||
* @param streamReader the reader to read the payload from
|
||||
* @param streamWriter the writer to write the payload to
|
||||
@@ -123,8 +123,8 @@ public abstract class AbstractStaxStreamPayloadEndpoint extends AbstractStaxPayl
|
||||
protected abstract void invokeInternal(XMLStreamReader streamReader, XMLStreamWriter streamWriter) throws Exception;
|
||||
|
||||
/**
|
||||
* Implementation of the <code>XMLStreamWriter</code> interface that creates a response
|
||||
* <code>WebServiceMessage</code> as soon as any method is called, thus lazily creating the response.
|
||||
* Implementation of the {@code XMLStreamWriter} interface that creates a response
|
||||
* {@code WebServiceMessage} as soon as any method is called, thus lazily creating the response.
|
||||
*/
|
||||
private class ResponseCreatingStreamWriter implements XMLStreamWriter {
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ public abstract class AbstractValidatingMarshallingPayloadEndpoint extends Abstr
|
||||
* @param messageContext the message context
|
||||
* @param requestObject the object unmarshalled from the {@link MessageContext#getRequest() request}
|
||||
* @param errors validation errors holder
|
||||
* @return <code>true</code> to continue and call {@link #invokeInternal(Object)}; <code>false</code> otherwise
|
||||
* @return {@code true} to continue and call {@link #invokeInternal(Object)}; {@code false} otherwise
|
||||
*/
|
||||
protected abstract boolean onValidationErrors(MessageContext messageContext, Object requestObject, Errors errors);
|
||||
}
|
||||
|
||||
@@ -52,9 +52,9 @@ import org.springframework.xml.transform.TraxUtils;
|
||||
|
||||
/**
|
||||
* Abstract base class for endpoints that handle the message payload as XOM elements. Offers the message payload as a
|
||||
* XOM <code>Element</code>, and allows subclasses to create a response by returning an <code>Element</code>.
|
||||
* <p/>
|
||||
* An <code>AbstractXomPayloadEndpoint</code> only accept one payload element. Multiple payload elements are not in
|
||||
* XOM {@code Element}, and allows subclasses to create a response by returning an {@code Element}.
|
||||
*
|
||||
* <p>An {@code AbstractXomPayloadEndpoint} only accept one payload element. Multiple payload elements are not in
|
||||
* accordance with WS-I.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -97,8 +97,8 @@ public abstract class AbstractXomPayloadEndpoint extends TransformerObjectSuppor
|
||||
|
||||
/**
|
||||
* Creates a {@link Serializer} to be used for writing the response to.
|
||||
* <p/>
|
||||
* Default implementation uses the UTF-8 encoding and does not set any options, but this may be changed in
|
||||
*
|
||||
* <p>Default implementation uses the UTF-8 encoding and does not set any options, but this may be changed in
|
||||
* subclasses.
|
||||
*
|
||||
* @param outputStream the output stream to serialize to
|
||||
@@ -109,11 +109,11 @@ public abstract class AbstractXomPayloadEndpoint extends TransformerObjectSuppor
|
||||
}
|
||||
|
||||
/**
|
||||
* Template method. Subclasses must implement this. Offers the request payload as a XOM <code>Element</code>, and
|
||||
* allows subclasses to return a response <code>Element</code>.
|
||||
* Template method. Subclasses must implement this. Offers the request payload as a XOM {@code Element}, and
|
||||
* allows subclasses to return a response {@code Element}.
|
||||
*
|
||||
* @param requestElement the contents of the SOAP message as XOM element
|
||||
* @return the response element. Can be <code>null</code> to specify no response.
|
||||
* @return the response element. Can be {@code null} to specify no response.
|
||||
*/
|
||||
protected abstract Element invokeInternal(Element requestElement) throws Exception;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.ws.context.MessageContext;
|
||||
|
||||
/**
|
||||
* Defines the basic contract for Web Services interested in the entire message payload.
|
||||
* <p/>
|
||||
*
|
||||
* <p>The main entrypoint is {@link #invoke(MessageContext)}, which gets invoked with the message context. This context
|
||||
* contains the {@link MessageContext#getRequest() request}, and can be used to create a response.
|
||||
*
|
||||
@@ -32,8 +32,8 @@ public interface MessageEndpoint {
|
||||
|
||||
/**
|
||||
* Invokes an operation.
|
||||
* <p/>
|
||||
* <p>The given <code>messageContext</code> can be used to create a response.
|
||||
*
|
||||
* <p>The given {@code messageContext} can be used to create a response.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @throws Exception if an exception occurs
|
||||
|
||||
@@ -26,8 +26,8 @@ import org.springframework.util.ReflectionUtils;
|
||||
|
||||
/**
|
||||
* Represents a bean method that will be invoked as part of an incoming Web service message.
|
||||
* <p/>
|
||||
* Consists of a {@link Method}, and a bean {@link Object}.
|
||||
*
|
||||
* <p>Consists of a {@link Method}, and a bean {@link Object}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
|
||||
@@ -20,8 +20,8 @@ import javax.xml.transform.Source;
|
||||
|
||||
/**
|
||||
* Defines the basic contract for Web Services interested in just the message payload.
|
||||
* <p/>
|
||||
* The main entrypoint is {@link #invoke(Source)}, which gets invoked with the contents of the requesting message.
|
||||
*
|
||||
* <p>The main entrypoint is {@link #invoke(Source)}, which gets invoked with the contents of the requesting message.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
@@ -31,8 +31,8 @@ public interface PayloadEndpoint {
|
||||
/**
|
||||
* Invokes the endpoint with the given request payload, and possibly returns a response.
|
||||
*
|
||||
* @param request the payload of the request message, may be <code>null</code>
|
||||
* @return the payload of the response message, may be <code>null</code> to indicate no response
|
||||
* @param request the payload of the request message, may be {@code null}
|
||||
* @return the payload of the response message, may be {@code null} to indicate no response
|
||||
* @throws Exception if an exception occurs
|
||||
*/
|
||||
Source invoke(Source request) throws Exception;
|
||||
|
||||
@@ -46,8 +46,8 @@ public abstract class AbstractMethodEndpointAdapter extends TransformerObjectSup
|
||||
*
|
||||
* @param messageContext the current message context
|
||||
* @param endpoint the endpoint to use. This object must have previously been passed to the
|
||||
* <code>supportsInternal</code> method of this interface, which must have returned
|
||||
* <code>true</code>
|
||||
* {@code supportsInternal} method of this interface, which must have returned
|
||||
* {@code true}
|
||||
* @throws Exception in case of errors
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -302,8 +302,8 @@ public class DefaultMethodEndpointAdapter extends AbstractMethodEndpointAdapter
|
||||
|
||||
/**
|
||||
* Returns the argument array for the given method endpoint.
|
||||
* <p/>
|
||||
* This implementation iterates over the set {@linkplain #setMethodArgumentResolvers(List) argument resolvers} to
|
||||
*
|
||||
* <p>This implementation iterates over the set {@linkplain #setMethodArgumentResolvers(List) argument resolvers} to
|
||||
* resolve each argument.
|
||||
*
|
||||
* @param messageContext the current message context
|
||||
@@ -328,8 +328,8 @@ public class DefaultMethodEndpointAdapter extends AbstractMethodEndpointAdapter
|
||||
|
||||
/**
|
||||
* Handle the return value for the given method endpoint.
|
||||
* <p/>
|
||||
* This implementation iterates over the set {@linkplain #setMethodReturnValueHandlers(java.util.List)} return value
|
||||
*
|
||||
* <p>This implementation iterates over the set {@linkplain #setMethodReturnValueHandlers(java.util.List)} return value
|
||||
* handlers} to resolve the return value.
|
||||
*
|
||||
* @param messageContext the current message context
|
||||
|
||||
@@ -29,8 +29,8 @@ import org.springframework.ws.server.endpoint.MethodEndpoint;
|
||||
* Subclass of {@link MarshallingMethodEndpointAdapter} that supports {@link GenericMarshaller} and {@link
|
||||
* GenericUnmarshaller}. More specifically, this adapter is aware of the {@link Method#getGenericParameterTypes()} and
|
||||
* {@link Method#getGenericReturnType()}.
|
||||
* <p/>
|
||||
* Prefer to use this adapter rather than the plain {@link MarshallingMethodEndpointAdapter} in combination with Java 5
|
||||
*
|
||||
* <p>Prefer to use this adapter rather than the plain {@link MarshallingMethodEndpointAdapter} in combination with Java 5
|
||||
* marshallers, such as the {@link Jaxb2Marshaller}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -43,7 +43,7 @@ import org.springframework.ws.server.endpoint.MethodEndpoint;
|
||||
public class GenericMarshallingMethodEndpointAdapter extends MarshallingMethodEndpointAdapter {
|
||||
|
||||
/**
|
||||
* Creates a new <code>GenericMarshallingMethodEndpointAdapter</code>. The {@link Marshaller} and {@link
|
||||
* Creates a new {@code GenericMarshallingMethodEndpointAdapter}. The {@link Marshaller} and {@link
|
||||
* Unmarshaller} must be injected using properties.
|
||||
*
|
||||
* @see #setMarshaller(org.springframework.oxm.Marshaller)
|
||||
@@ -53,15 +53,15 @@ public class GenericMarshallingMethodEndpointAdapter extends MarshallingMethodEn
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>GenericMarshallingMethodEndpointAdapter</code> with the given marshaller. If the given {@link
|
||||
* Creates a new {@code GenericMarshallingMethodEndpointAdapter} with the given marshaller. If the given {@link
|
||||
* Marshaller} also implements the {@link Unmarshaller} interface, it is used for both marshalling and
|
||||
* unmarshalling. Otherwise, an exception is thrown.
|
||||
* <p/>
|
||||
* Note that all {@link Marshaller} implementations in Spring-WS also implement the {@link Unmarshaller} interface,
|
||||
*
|
||||
* <p>Note that all {@link Marshaller} implementations in Spring-WS also implement the {@link Unmarshaller} interface,
|
||||
* so that you can safely use this constructor.
|
||||
*
|
||||
* @param marshaller object used as marshaller and unmarshaller
|
||||
* @throws IllegalArgumentException when <code>marshaller</code> does not implement the {@link Unmarshaller}
|
||||
* @throws IllegalArgumentException when {@code marshaller} does not implement the {@link Unmarshaller}
|
||||
* interface
|
||||
*/
|
||||
public GenericMarshallingMethodEndpointAdapter(Marshaller marshaller) {
|
||||
@@ -69,7 +69,7 @@ public class GenericMarshallingMethodEndpointAdapter extends MarshallingMethodEn
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>GenericMarshallingMethodEndpointAdapter</code> with the given marshaller and unmarshaller.
|
||||
* Creates a new {@code GenericMarshallingMethodEndpointAdapter} with the given marshaller and unmarshaller.
|
||||
*
|
||||
* @param marshaller the marshaller to use
|
||||
* @param unmarshaller the unmarshaller to use
|
||||
|
||||
@@ -39,10 +39,10 @@ import org.springframework.ws.support.MarshallingUtils;
|
||||
* MyMarshalledType handleMyMessage(MyUnmarshalledType request);
|
||||
* </pre>
|
||||
* I.e. methods that take a single parameter that {@link Unmarshaller#supports(Class) is supported} by the {@link
|
||||
* Unmarshaller}, and return either <code>void</code> or a type {@link Marshaller#supports(Class) supported} by the
|
||||
* Unmarshaller}, and return either {@code void} or a type {@link Marshaller#supports(Class) supported} by the
|
||||
* {@link Marshaller}. The method can have any name, as long as it is mapped by an {@link EndpointMapping}.
|
||||
* <p/>
|
||||
* This endpoint needs a <code>Marshaller</code> and <code>Unmarshaller</code>, both of which can be set using
|
||||
*
|
||||
* <p>This endpoint needs a {@code Marshaller} and {@code Unmarshaller}, both of which can be set using
|
||||
* properties.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -61,7 +61,7 @@ public class MarshallingMethodEndpointAdapter extends AbstractMethodEndpointAdap
|
||||
private Unmarshaller unmarshaller;
|
||||
|
||||
/**
|
||||
* Creates a new <code>MarshallingMethodEndpointAdapter</code>. The {@link Marshaller} and {@link Unmarshaller} must
|
||||
* Creates a new {@code MarshallingMethodEndpointAdapter}. The {@link Marshaller} and {@link Unmarshaller} must
|
||||
* be injected using properties.
|
||||
*
|
||||
* @see #setMarshaller(org.springframework.oxm.Marshaller)
|
||||
@@ -71,15 +71,15 @@ public class MarshallingMethodEndpointAdapter extends AbstractMethodEndpointAdap
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>MarshallingMethodEndpointAdapter</code> with the given marshaller. If the given {@link
|
||||
* Creates a new {@code MarshallingMethodEndpointAdapter} with the given marshaller. If the given {@link
|
||||
* Marshaller} also implements the {@link Unmarshaller} interface, it is used for both marshalling and
|
||||
* unmarshalling. Otherwise, an exception is thrown.
|
||||
* <p/>
|
||||
* Note that all {@link Marshaller} implementations in Spring also implement the {@link Unmarshaller} interface,
|
||||
*
|
||||
* <p>Note that all {@link Marshaller} implementations in Spring also implement the {@link Unmarshaller} interface,
|
||||
* so that you can safely use this constructor.
|
||||
*
|
||||
* @param marshaller object used as marshaller and unmarshaller
|
||||
* @throws IllegalArgumentException when <code>marshaller</code> does not implement the {@link Unmarshaller}
|
||||
* @throws IllegalArgumentException when {@code marshaller} does not implement the {@link Unmarshaller}
|
||||
* interface
|
||||
*/
|
||||
public MarshallingMethodEndpointAdapter(Marshaller marshaller) {
|
||||
@@ -96,7 +96,7 @@ public class MarshallingMethodEndpointAdapter extends AbstractMethodEndpointAdap
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>MarshallingMethodEndpointAdapter</code> with the given marshaller and unmarshaller.
|
||||
* Creates a new {@code MarshallingMethodEndpointAdapter} with the given marshaller and unmarshaller.
|
||||
*
|
||||
* @param marshaller the marshaller to use
|
||||
* @param unmarshaller the unmarshaller to use
|
||||
@@ -161,7 +161,7 @@ public class MarshallingMethodEndpointAdapter extends AbstractMethodEndpointAdap
|
||||
}
|
||||
|
||||
/**
|
||||
* Supports a method with a single, unmarshallable parameter, and that return <code>void</code> or a marshallable
|
||||
* Supports a method with a single, unmarshallable parameter, and that return {@code void} or a marshallable
|
||||
* type.
|
||||
*
|
||||
* @see Marshaller#supports(Class)
|
||||
|
||||
@@ -23,9 +23,9 @@ import org.springframework.ws.server.endpoint.MessageEndpoint;
|
||||
import org.springframework.ws.soap.server.SoapMessageDispatcher;
|
||||
|
||||
/**
|
||||
* Adapter to use a <code>MessageEndpoint</code> as the endpoint for a <code>EndpointInvocationChain</code>.
|
||||
* <p/>
|
||||
* This adapter is registered by default by the {@link MessageDispatcher} and {@link SoapMessageDispatcher}.
|
||||
* Adapter to use a {@code MessageEndpoint} as the endpoint for a {@code EndpointInvocationChain}.
|
||||
*
|
||||
* <p>This adapter is registered by default by the {@link MessageDispatcher} and {@link SoapMessageDispatcher}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see org.springframework.ws.server.EndpointInvocationChain
|
||||
|
||||
@@ -28,10 +28,10 @@ import org.springframework.ws.soap.server.SoapMessageDispatcher;
|
||||
* <pre>
|
||||
* void handleMyMessage(MessageContext request);
|
||||
* </pre>
|
||||
* I.e. methods that take a single {@link MessageContext} parameter, and return <code>void</code>. The method can have
|
||||
* I.e. methods that take a single {@link MessageContext} parameter, and return {@code void}. The method can have
|
||||
* any name, as long as it is mapped by an {@link org.springframework.ws.server.EndpointMapping}.
|
||||
* <p/>
|
||||
* This adapter is registered by default by the {@link MessageDispatcher} and {@link SoapMessageDispatcher}.
|
||||
*
|
||||
* <p>This adapter is registered by default by the {@link MessageDispatcher} and {@link SoapMessageDispatcher}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
|
||||
@@ -27,9 +27,9 @@ import org.springframework.ws.soap.server.SoapMessageDispatcher;
|
||||
import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
|
||||
/**
|
||||
* Adapter to use a <code>PayloadEndpoint</code> as the endpoint for a <code>EndpointInvocationChain</code>.
|
||||
* <p/>
|
||||
* This adapter is registered by default by the {@link MessageDispatcher} and {@link SoapMessageDispatcher}.
|
||||
* Adapter to use a {@code PayloadEndpoint} as the endpoint for a {@code EndpointInvocationChain}.
|
||||
*
|
||||
* <p>This adapter is registered by default by the {@link MessageDispatcher} and {@link SoapMessageDispatcher}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see org.springframework.ws.server.endpoint.PayloadEndpoint
|
||||
|
||||
@@ -34,10 +34,10 @@ import org.springframework.ws.soap.server.SoapMessageDispatcher;
|
||||
* <pre>
|
||||
* Source handleMyMessage(Source request);
|
||||
* </pre>
|
||||
* I.e. methods that take a single {@link Source} parameter, and return either <code>void</code> or a {@link Source}.
|
||||
* I.e. methods that take a single {@link Source} parameter, and return either {@code void} or a {@link Source}.
|
||||
* The method can have any name, as long as it is mapped by an {@link org.springframework.ws.server.EndpointMapping}.
|
||||
* <p/>
|
||||
* This adapter is registered by default by the {@link MessageDispatcher} and {@link SoapMessageDispatcher}.
|
||||
*
|
||||
* <p>This adapter is registered by default by the {@link MessageDispatcher} and {@link SoapMessageDispatcher}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
|
||||
@@ -50,9 +50,9 @@ import org.springframework.xml.namespace.SimpleNamespaceContext;
|
||||
* Source handleMyMessage(@XPathParam("/root/child/text")String param1, @XPathParam("/root/child/number")double
|
||||
* param2);
|
||||
* </pre>
|
||||
* I.e. methods that return either <code>void</code> or a {@link Source}, and have parameters annotated with {@link
|
||||
* I.e. methods that return either {@code void} or a {@link Source}, and have parameters annotated with {@link
|
||||
* XPathParam} that specify the XPath expression that should be bound to that parameter. The parameter can be of the
|
||||
* following types: <ul> <li><code>boolean</code>, or {@link Boolean}</li> <li><code>double</code>, or {@link
|
||||
* following types: <ul> <li>{@code boolean}, or {@link Boolean}</li> <li>{@code double}, or {@link
|
||||
* Double}</li> <li>{@link String}</li> <li>{@link Node}</li> <li>{@link NodeList}</li> </ul>
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -79,7 +79,7 @@ public class XPathParamAnnotationMethodEndpointAdapter extends AbstractMethodEnd
|
||||
xpathFactory = XPathFactory.newInstance();
|
||||
}
|
||||
|
||||
/** Supports methods with @XPathParam parameters, and return either <code>Source</code> or nothing. */
|
||||
/** Supports methods with @XPathParam parameters, and return either {@code Source} or nothing. */
|
||||
@Override
|
||||
protected boolean supportsInternal(MethodEndpoint methodEndpoint) {
|
||||
Method method = methodEndpoint.getMethod();
|
||||
|
||||
@@ -42,8 +42,8 @@ public abstract class AbstractPayloadMethodProcessor extends TransformerObjectSu
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p/>
|
||||
* This implementation gets checks if the given parameter is annotated with {@link RequestPayload}, and invokes
|
||||
*
|
||||
* <p>This implementation gets checks if the given parameter is annotated with {@link RequestPayload}, and invokes
|
||||
* {@link #supportsRequestPayloadParameter(org.springframework.core.MethodParameter)} afterwards.
|
||||
*/
|
||||
@Override
|
||||
@@ -70,8 +70,8 @@ public abstract class AbstractPayloadMethodProcessor extends TransformerObjectSu
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p/>
|
||||
* This implementation gets checks if the method of the given return type is annotated with {@link ResponsePayload},
|
||||
*
|
||||
* <p>This implementation gets checks if the method of the given return type is annotated with {@link ResponsePayload},
|
||||
* and invokes {@link #supportsResponsePayloadReturnType(org.springframework.core.MethodParameter)} afterwards.
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -53,8 +53,8 @@ public class MarshallingPayloadMethodProcessor extends AbstractPayloadMethodProc
|
||||
* Creates a new {@code MarshallingPayloadMethodProcessor} with the given marshaller. If the given {@link
|
||||
* Marshaller} also implements the {@link Unmarshaller} interface, it is used for both marshalling and
|
||||
* unmarshalling. Otherwise, an exception is thrown.
|
||||
* <p/>
|
||||
* Note that all {@link Marshaller} implementations in Spring also implement the {@link Unmarshaller} interface, so
|
||||
*
|
||||
* <p>Note that all {@link Marshaller} implementations in Spring also implement the {@link Unmarshaller} interface, so
|
||||
* that you can safely use this constructor.
|
||||
*
|
||||
* @param marshaller object used as marshaller and unmarshaller
|
||||
|
||||
@@ -118,8 +118,8 @@ public class SourcePayloadMethodProcessor extends AbstractPayloadSourceMethodPro
|
||||
/**
|
||||
* Create a {@code XMLInputFactory} that this resolver will use to create {@link javax.xml.stream.XMLStreamReader}
|
||||
* and {@link javax.xml.stream.XMLEventReader} objects.
|
||||
* <p/>
|
||||
* Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
*
|
||||
* <p>Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
* so this method will only be called once.
|
||||
*
|
||||
* @return the created factory
|
||||
|
||||
@@ -145,8 +145,8 @@ public class StaxPayloadMethodArgumentResolver extends TransformerObjectSupport
|
||||
/**
|
||||
* Create a {@code XMLInputFactory} that this resolver will use to create {@link XMLStreamReader} and {@link
|
||||
* XMLEventReader} objects.
|
||||
* <p/>
|
||||
* Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
*
|
||||
* <p>Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
* so this method will only be called once.
|
||||
*
|
||||
* @return the created factory
|
||||
|
||||
@@ -40,8 +40,8 @@ import org.springframework.xml.transform.TransformerHelper;
|
||||
|
||||
/**
|
||||
* Implementation of {@link MethodArgumentResolver} that supports the {@link XPathParam @XPathParam} annotation.
|
||||
* <p/>
|
||||
* This resolver supports parameters annotated with {@link XPathParam @XPathParam} that specifies the XPath expression
|
||||
*
|
||||
* <p>This resolver supports parameters annotated with {@link XPathParam @XPathParam} that specifies the XPath expression
|
||||
* that should be bound to that parameter. The parameter can either a "natively supported" XPath type ({@link Boolean
|
||||
* boolean}, {@link Double double}, {@link String}, {@link Node}, or {@link NodeList}), or a type that is {@linkplain
|
||||
* ConversionService#canConvert(Class, Class) supported} by the {@link ConversionService}.
|
||||
@@ -59,8 +59,8 @@ public class XPathParamMethodArgumentResolver implements MethodArgumentResolver
|
||||
|
||||
/**
|
||||
* Sets the conversion service to use.
|
||||
* <p/>
|
||||
* Defaults to the {@linkplain ConversionServiceFactory#createDefaultConversionService() default conversion
|
||||
*
|
||||
* <p>Defaults to the {@linkplain ConversionServiceFactory#createDefaultConversionService() default conversion
|
||||
* service}.
|
||||
*/
|
||||
public void setConversionService(ConversionService conversionService) {
|
||||
@@ -144,8 +144,8 @@ public class XPathParamMethodArgumentResolver implements MethodArgumentResolver
|
||||
|
||||
/**
|
||||
* Create a {@code XPathFactory} that this resolver will use to create {@link XPath} objects.
|
||||
* <p/>
|
||||
* Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
*
|
||||
* <p>Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
* so this method will only be called once.
|
||||
*
|
||||
* @return the created factory
|
||||
|
||||
@@ -97,8 +97,8 @@ public class XomPayloadMethodProcessor extends AbstractPayloadSourceMethodProces
|
||||
|
||||
/**
|
||||
* Create a {@code DocumentBuilderFactory} that this resolver will use to create response payloads.
|
||||
* <p/>
|
||||
* Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
*
|
||||
* <p>Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached,
|
||||
* so this method will only be called once.
|
||||
*
|
||||
* @return the created factory
|
||||
|
||||
@@ -28,8 +28,8 @@ import org.springframework.ws.soap.server.endpoint.mapping.SoapActionAnnotationM
|
||||
|
||||
/**
|
||||
* Indicates that an annotated class is an "Endpoint" (e.g. a web service endpoint).
|
||||
* <p/>
|
||||
* This annotation serves as a specialization of {@link Component @Component}, allowing for implementation classes to be
|
||||
*
|
||||
* <p>This annotation serves as a specialization of {@link Component @Component}, allowing for implementation classes to be
|
||||
* autodetected through classpath scanning. Instances of this class are typically picked up by an {@link
|
||||
* AbstractAnnotationMethodEndpointMapping} implementation, such as {@link SoapActionAnnotationMethodEndpointMapping}.
|
||||
*
|
||||
|
||||
@@ -25,8 +25,8 @@ import javax.xml.XMLConstants;
|
||||
|
||||
/**
|
||||
* Sets up a namespace to be used in an {@link Endpoint @Endpoint} method, class, or package.
|
||||
* <p/>
|
||||
* Typically used in combination with {@link XPathParam @XPathParam}, or {@link PayloadRoot @PayloadRoot}.
|
||||
*
|
||||
* <p>Typically used in combination with {@link XPathParam @XPathParam}, or {@link PayloadRoot @PayloadRoot}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see XPathParam
|
||||
|
||||
@@ -24,8 +24,8 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Indicates that a method parameter should be bound to an XPath expression. The annotation value signifies the XPath
|
||||
* expression to use. The parameter can be of the following types: <ul> <li><code>boolean</code>, or {@link
|
||||
* Boolean}</li> <li><code>double</code>, or {@link Double}</li> <li>{@link String}</li> <li>{@link
|
||||
* expression to use. The parameter can be of the following types: <ul> <li>{@code boolean}, or {@link
|
||||
* Boolean}</li> <li>{@code double}, or {@link Double}</li> <li>{@link String}</li> <li>{@link
|
||||
* org.w3c.dom.Node}</li> <li>{@link org.w3c.dom.NodeList}</li> </ul>
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
|
||||
@@ -41,12 +41,12 @@ import org.springframework.xml.xsd.XsdSchema;
|
||||
import org.springframework.xml.xsd.XsdSchemaCollection;
|
||||
|
||||
/**
|
||||
* Abstract base class for <code>EndpointInterceptor</code> implementations that validate part of the message using a
|
||||
* schema. The exact message part is determined by the <code>getValidationRequestSource</code> and
|
||||
* <code>getValidationResponseSource</code> template methods.
|
||||
* <p/>
|
||||
* By default, only the request message is validated, but this behaviour can be changed using the
|
||||
* <code>validateRequest</code> and <code>validateResponse</code> properties.
|
||||
* Abstract base class for {@code EndpointInterceptor} implementations that validate part of the message using a
|
||||
* schema. The exact message part is determined by the {@code getValidationRequestSource} and
|
||||
* {@code getValidationResponseSource} template methods.
|
||||
*
|
||||
* <p>By default, only the request message is validated, but this behaviour can be changed using the
|
||||
* {@code validateRequest} and {@code validateResponse} properties.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see #getValidationRequestSource(org.springframework.ws.WebServiceMessage)
|
||||
@@ -73,7 +73,7 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the schema language. Default is the W3C XML Schema: <code>http://www.w3.org/2001/XMLSchema"</code>.
|
||||
* Sets the schema language. Default is the W3C XML Schema: {@code http://www.w3.org/2001/XMLSchema"}.
|
||||
*
|
||||
* @see org.springframework.xml.validation.XmlValidatorFactory#SCHEMA_W3C_XML
|
||||
* @see org.springframework.xml.validation.XmlValidatorFactory#SCHEMA_RELAX_NG
|
||||
@@ -143,12 +143,12 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
this.errorHandler = errorHandler;
|
||||
}
|
||||
|
||||
/** Indicates whether the request should be validated against the schema. Default is <code>true</code>. */
|
||||
/** Indicates whether the request should be validated against the schema. Default is {@code true}. */
|
||||
public void setValidateRequest(boolean validateRequest) {
|
||||
this.validateRequest = validateRequest;
|
||||
}
|
||||
|
||||
/** Indicates whether the response should be validated against the schema. Default is <code>false</code>. */
|
||||
/** Indicates whether the response should be validated against the schema. Default is {@code false}. */
|
||||
public void setValidateResponse(boolean validateResponse) {
|
||||
this.validateResponse = validateResponse;
|
||||
}
|
||||
@@ -170,13 +170,13 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
|
||||
/**
|
||||
* Validates the request message in the given message context. Validation only occurs if
|
||||
* <code>validateRequest</code> is set to <code>true</code>, which is the default.
|
||||
* <p/>
|
||||
* Returns <code>true</code> if the request is valid, or <code>false</code> if it isn't. Additionally, when the
|
||||
* {@code validateRequest} is set to {@code true}, which is the default.
|
||||
*
|
||||
* <p>Returns {@code true} if the request is valid, or {@code false} if it isn't. Additionally, when the
|
||||
* request message is a {@link SoapMessage}, a {@link SoapFault} is added as response.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @return <code>true</code> if the message is valid; <code>false</code> otherwise
|
||||
* @return {@code true} if the message is valid; {@code false} otherwise
|
||||
* @see #setValidateRequest(boolean)
|
||||
*/
|
||||
@Override
|
||||
@@ -199,11 +199,11 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
|
||||
/**
|
||||
* Template method that is called when the request message contains validation errors. Default implementation logs
|
||||
* all errors, and returns <code>false</code>, i.e. do not process the request.
|
||||
* all errors, and returns {@code false}, i.e. do not process the request.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @param errors the validation errors
|
||||
* @return <code>true</code> to continue processing the request, <code>false</code> (the default) otherwise
|
||||
* @return {@code true} to continue processing the request, {@code false} (the default) otherwise
|
||||
*/
|
||||
protected boolean handleRequestValidationErrors(MessageContext messageContext, SAXParseException[] errors)
|
||||
throws TransformerException {
|
||||
@@ -215,12 +215,12 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
|
||||
/**
|
||||
* Validates the response message in the given message context. Validation only occurs if
|
||||
* <code>validateResponse</code> is set to <code>true</code>, which is <strong>not</strong> the default.
|
||||
* <p/>
|
||||
* Returns <code>true</code> if the request is valid, or <code>false</code> if it isn't.
|
||||
* {@code validateResponse} is set to {@code true}, which is <strong>not</strong> the default.
|
||||
*
|
||||
* <p>Returns {@code true} if the request is valid, or {@code false} if it isn't.
|
||||
*
|
||||
* @param messageContext the message context.
|
||||
* @return <code>true</code> if the response is valid; <code>false</code> otherwise
|
||||
* @return {@code true} if the response is valid; {@code false} otherwise
|
||||
* @see #setValidateResponse(boolean)
|
||||
*/
|
||||
@Override
|
||||
@@ -242,11 +242,11 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
|
||||
/**
|
||||
* Template method that is called when the response message contains validation errors. Default implementation logs
|
||||
* all errors, and returns <code>false</code>, i.e. do not cot continue to process the response interceptor chain.
|
||||
* all errors, and returns {@code false}, i.e. do not cot continue to process the response interceptor chain.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @param errors the validation errors
|
||||
* @return <code>true</code> to continue the response interceptor chain, <code>false</code> (the default) otherwise
|
||||
* @return {@code true} to continue the response interceptor chain, {@code false} (the default) otherwise
|
||||
*/
|
||||
protected boolean handleResponseValidationErrors(MessageContext messageContext, SAXParseException[] errors) {
|
||||
for (SAXParseException error : errors) {
|
||||
@@ -270,7 +270,7 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
* Abstract template method that returns the part of the request message that is to be validated.
|
||||
*
|
||||
* @param request the request message
|
||||
* @return the part of the message that is to validated, or <code>null</code> not to validate anything
|
||||
* @return the part of the message that is to validated, or {@code null} not to validate anything
|
||||
*/
|
||||
protected abstract Source getValidationRequestSource(WebServiceMessage request);
|
||||
|
||||
@@ -278,7 +278,7 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
* Abstract template method that returns the part of the response message that is to be validated.
|
||||
*
|
||||
* @param response the response message
|
||||
* @return the part of the message that is to validated, or <code>null</code> not to validate anything
|
||||
* @return the part of the message that is to validated, or {@code null} not to validate anything
|
||||
*/
|
||||
protected abstract Source getValidationResponseSource(WebServiceMessage response);
|
||||
}
|
||||
|
||||
@@ -53,8 +53,8 @@ public class DelegatingSmartEndpointInterceptor implements SmartEndpointIntercep
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p/>
|
||||
* This implementation delegates to {@link #shouldIntercept(WebServiceMessage, Object)}.
|
||||
*
|
||||
* <p>This implementation delegates to {@link #shouldIntercept(WebServiceMessage, Object)}.
|
||||
*/
|
||||
@Override
|
||||
public boolean shouldIntercept(MessageContext messageContext, Object endpoint) {
|
||||
@@ -64,8 +64,8 @@ public class DelegatingSmartEndpointInterceptor implements SmartEndpointIntercep
|
||||
|
||||
/**
|
||||
* Indicates whether this interceptor should intercept the given request message.
|
||||
* <p/>
|
||||
* This implementation always returns {@code true}.
|
||||
*
|
||||
* <p>This implementation always returns {@code true}.
|
||||
*
|
||||
* @param request the request message
|
||||
* @param endpoint chosen endpoint to invoke
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.ws.context.MessageContext;
|
||||
import org.springframework.ws.server.EndpointInterceptor;
|
||||
|
||||
/**
|
||||
* Default implementation of the <code>EndpointInterceptor</code> interface, for simplified implementation of
|
||||
* Default implementation of the {@code EndpointInterceptor} interface, for simplified implementation of
|
||||
* pre-only/post-only interceptors.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -35,15 +35,15 @@ public class EndpointInterceptorAdapter implements EndpointInterceptor {
|
||||
/** Logger available to subclasses */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
/** Returns <code>false</code>. */
|
||||
/** Returns {@code false}. */
|
||||
public boolean understands(Element header) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code>.
|
||||
* Returns {@code true}.
|
||||
*
|
||||
* @return <code>true</code>
|
||||
* @return {@code true}
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRequest(MessageContext messageContext, Object endpoint) throws Exception {
|
||||
@@ -51,9 +51,9 @@ public class EndpointInterceptorAdapter implements EndpointInterceptor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code>.
|
||||
* Returns {@code true}.
|
||||
*
|
||||
* @return <code>true</code>
|
||||
* @return {@code true}
|
||||
*/
|
||||
@Override
|
||||
public boolean handleResponse(MessageContext messageContext, Object endpoint) throws Exception {
|
||||
@@ -61,9 +61,9 @@ public class EndpointInterceptorAdapter implements EndpointInterceptor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code>.
|
||||
* Returns {@code true}.
|
||||
*
|
||||
* @return <code>true</code>
|
||||
* @return {@code true}
|
||||
*/
|
||||
@Override
|
||||
public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception {
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.ws.server.endpoint.AbstractLoggingInterceptor;
|
||||
/**
|
||||
* Simple {@link org.springframework.ws.server.EndpointInterceptor EndpointInterceptor} that logs the payload of request
|
||||
* and response messages.
|
||||
* <p/>
|
||||
*
|
||||
* <p>By default, both request and response messages are logged, but this behaviour can be changed using the {@link
|
||||
* #logRequest} and {@link #logResponse} properties.
|
||||
*
|
||||
|
||||
@@ -41,11 +41,11 @@ import org.springframework.xml.transform.ResourceSource;
|
||||
import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
|
||||
/**
|
||||
* Interceptor that transforms the payload of <code>WebServiceMessage</code>s using XSLT stylesheet. Allows for seperate
|
||||
* Interceptor that transforms the payload of {@code WebServiceMessage}s using XSLT stylesheet. Allows for seperate
|
||||
* stylesheets for request and response. This interceptor is especially useful when supporting with multiple version of
|
||||
* a Web service: you can transform the older message format to the new format.
|
||||
* <p/>
|
||||
* The stylesheets to use can be set using the <code>requestXslt</code> and <code>responseXslt</code> properties. Both
|
||||
*
|
||||
* <p>The stylesheets to use can be set using the {@code requestXslt} and {@code responseXslt} properties. Both
|
||||
* of these are optional: if not set, the message is simply not transformed. Setting one of the two is required,
|
||||
* though.
|
||||
*
|
||||
@@ -79,10 +79,10 @@ public class PayloadTransformingInterceptor extends TransformerObjectSupport
|
||||
|
||||
/**
|
||||
* Transforms the request message in the given message context using a provided stylesheet. Transformation only
|
||||
* occurs if the <code>requestXslt</code> has been set.
|
||||
* occurs if the {@code requestXslt} has been set.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @return always returns <code>true</code>
|
||||
* @return always returns {@code true}
|
||||
* @see #setRequestXslt(org.springframework.core.io.Resource)
|
||||
*/
|
||||
@Override
|
||||
@@ -98,10 +98,10 @@ public class PayloadTransformingInterceptor extends TransformerObjectSupport
|
||||
|
||||
/**
|
||||
* Transforms the response message in the given message context using a stylesheet. Transformation only occurs if
|
||||
* the <code>responseXslt</code> has been set.
|
||||
* the {@code responseXslt} has been set.
|
||||
*
|
||||
* @param messageContext the message context
|
||||
* @return always returns <code>true</code>
|
||||
* @return always returns {@code true}
|
||||
* @see #setResponseXslt(org.springframework.core.io.Resource)
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -26,8 +26,8 @@ import org.springframework.ws.server.endpoint.annotation.Endpoint;
|
||||
/**
|
||||
* Abstract base for {@link org.springframework.ws.server.EndpointMapping} implementations that map classes tagged with
|
||||
* an annotation. By default the annotation is {@link Endpoint}, but this can be overriden in subclasses.
|
||||
* <p/>
|
||||
* The methods of each bean carrying @Endpoint will be registered using {@link #registerMethods(String)}.
|
||||
*
|
||||
* <p>The methods of each bean carrying @Endpoint will be registered using {@link #registerMethods(String)}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
@@ -38,12 +38,12 @@ public abstract class AbstractAnnotationMethodEndpointMapping<T> extends Abstrac
|
||||
|
||||
/**
|
||||
* Set whether to detect endpoint beans in ancestor ApplicationContexts.
|
||||
* <p/>
|
||||
* Default is "false": Only endpoint beans in the current ApplicationContext will be detected, i.e. only in the
|
||||
*
|
||||
* <p>Default is "false": Only endpoint beans in the current ApplicationContext will be detected, i.e. only in the
|
||||
* context that this EndpointMapping itself is defined in (typically the current MessageDispatcherServlet's
|
||||
* context).
|
||||
* <p/>
|
||||
* Switch this flag on to detect endpoint beans in ancestor contexts (typically the Spring root
|
||||
*
|
||||
* <p>Switch this flag on to detect endpoint beans in ancestor contexts (typically the Spring root
|
||||
* WebApplicationContext) as well.
|
||||
*/
|
||||
public void setDetectEndpointsInAncestorContexts(boolean detectEndpointsInAncestorContexts) {
|
||||
|
||||
@@ -52,7 +52,7 @@ public abstract class AbstractEndpointMapping extends ApplicationObjectSupport i
|
||||
/**
|
||||
* Returns the the endpoint interceptors to apply to all endpoints mapped by this endpoint mapping.
|
||||
*
|
||||
* @return array of endpoint interceptors, or <code>null</code> if none
|
||||
* @return array of endpoint interceptors, or {@code null} if none
|
||||
*/
|
||||
public EndpointInterceptor[] getInterceptors() {
|
||||
return interceptors;
|
||||
@@ -61,7 +61,7 @@ public abstract class AbstractEndpointMapping extends ApplicationObjectSupport i
|
||||
/**
|
||||
* Sets the endpoint interceptors to apply to all endpoints mapped by this endpoint mapping.
|
||||
*
|
||||
* @param interceptors array of endpoint interceptors, or <code>null</code> if none
|
||||
* @param interceptors array of endpoint interceptors, or {@code null} if none
|
||||
*/
|
||||
public final void setInterceptors(EndpointInterceptor[] interceptors) {
|
||||
this.interceptors = interceptors;
|
||||
@@ -74,8 +74,8 @@ public abstract class AbstractEndpointMapping extends ApplicationObjectSupport i
|
||||
|
||||
/**
|
||||
* Specify the order value for this mapping.
|
||||
* <p/>
|
||||
* Default value is {@link Integer#MAX_VALUE}, meaning that it's non-ordered.
|
||||
*
|
||||
* <p>Default value is {@link Integer#MAX_VALUE}, meaning that it's non-ordered.
|
||||
*
|
||||
* @see org.springframework.core.Ordered#getOrder()
|
||||
*/
|
||||
@@ -149,8 +149,8 @@ public abstract class AbstractEndpointMapping extends ApplicationObjectSupport i
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new <code>EndpointInvocationChain</code> based on the given message context, endpoint, and
|
||||
* interceptors. Default implementation creates a simple <code>EndpointInvocationChain</code> based on the set
|
||||
* Creates a new {@code EndpointInvocationChain} based on the given message context, endpoint, and
|
||||
* interceptors. Default implementation creates a simple {@code EndpointInvocationChain} based on the set
|
||||
* interceptors.
|
||||
*
|
||||
* @param endpoint the endpoint
|
||||
@@ -176,8 +176,8 @@ public abstract class AbstractEndpointMapping extends ApplicationObjectSupport i
|
||||
/**
|
||||
* Sets the default endpoint for this endpoint mapping. This endpoint will be returned if no specific mapping was
|
||||
* found.
|
||||
* <p/>
|
||||
* Default is <code>null</code>, indicating no default endpoint.
|
||||
*
|
||||
* <p>Default is {@code null}, indicating no default endpoint.
|
||||
*
|
||||
* @param defaultEndpoint the default endpoint, or null if none
|
||||
*/
|
||||
@@ -190,7 +190,7 @@ public abstract class AbstractEndpointMapping extends ApplicationObjectSupport i
|
||||
* context.
|
||||
*
|
||||
* @param endpointName the endpoint name
|
||||
* @return the resolved endpoint, or <code>null</code> if the name could not be resolved
|
||||
* @return the resolved endpoint, or {@code null} if the name could not be resolved
|
||||
*/
|
||||
protected Object resolveStringEndpoint(String endpointName) {
|
||||
if (getApplicationContext().containsBean(endpointName)) {
|
||||
@@ -202,12 +202,12 @@ public abstract class AbstractEndpointMapping extends ApplicationObjectSupport i
|
||||
}
|
||||
|
||||
/**
|
||||
* Lookup an endpoint for the given request, returning <code>null</code> if no specific one is found. This template
|
||||
* method is called by getEndpoint, a <code>null</code> return value will lead to the default handler, if one is
|
||||
* Lookup an endpoint for the given request, returning {@code null} if no specific one is found. This template
|
||||
* method is called by getEndpoint, a {@code null} return value will lead to the default handler, if one is
|
||||
* set.
|
||||
* <p/>
|
||||
* The returned endpoint can be a string, in which case it is resolved as a bean name. Also, it can take the form
|
||||
* <code>beanName#method</code>, in which case the method is resolved.
|
||||
*
|
||||
* <p>The returned endpoint can be a string, in which case it is resolved as a bean name. Also, it can take the form
|
||||
* {@code beanName#method}, in which case the method is resolved.
|
||||
*
|
||||
* @return the looked up endpoint instance, or null
|
||||
* @throws Exception if there is an error
|
||||
|
||||
@@ -26,10 +26,10 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.ws.context.MessageContext;
|
||||
|
||||
/**
|
||||
* Abstract base class for endpoint mapping that are based on a <code>Map</code>. Provides mappings of application
|
||||
* Abstract base class for endpoint mapping that are based on a {@code Map}. Provides mappings of application
|
||||
* context beans as well as a settable map.
|
||||
* <p/>
|
||||
* Subclasses determine the exact nature of the key in the enpoint map; this can be a qualified name, a SOAP Header, the
|
||||
*
|
||||
* <p>Subclasses determine the exact nature of the key in the enpoint map; this can be a qualified name, a SOAP Header, the
|
||||
* result of a XPath validation. The values are always endpoint objects, or bean names of endpoint objects.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -48,11 +48,11 @@ public abstract class AbstractMapBasedEndpointMapping extends AbstractEndpointMa
|
||||
|
||||
/**
|
||||
* Set whether to lazily initialize endpoints. Only applicable to singleton endpoints, as prototypes are always
|
||||
* lazily initialized. Default is <code>false</code>, as eager initialization allows for more efficiency through
|
||||
* lazily initialized. Default is {@code false}, as eager initialization allows for more efficiency through
|
||||
* referencing the controller objects directly.
|
||||
* <p/>
|
||||
* If you want to allow your endpoints to be lazily initialized, make them "lazy-init" and set this flag to
|
||||
* <code>true</code>. Just making them "lazy-init" will not work, as they are initialized through the references
|
||||
*
|
||||
* <p>If you want to allow your endpoints to be lazily initialized, make them "lazy-init" and set this flag to
|
||||
* {@code true}. Just making them "lazy-init" will not work, as they are initialized through the references
|
||||
* from the endpoint mapping in this case.
|
||||
*/
|
||||
public void setLazyInitEndpoints(boolean lazyInitEndpoints) {
|
||||
@@ -60,8 +60,8 @@ public abstract class AbstractMapBasedEndpointMapping extends AbstractEndpointMa
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether to register bean names found in the application context. Setting this to <code>true</code> will
|
||||
* register all beans found in the application context under their name. Default is <code>false</code>.
|
||||
* Set whether to register bean names found in the application context. Setting this to {@code true} will
|
||||
* register all beans found in the application context under their name. Default is {@code false}.
|
||||
*/
|
||||
public final void setRegisterBeanNames(boolean registerBeanNames) {
|
||||
this.registerBeanNames = registerBeanNames;
|
||||
@@ -89,13 +89,13 @@ public abstract class AbstractMapBasedEndpointMapping extends AbstractEndpointMa
|
||||
}
|
||||
}
|
||||
|
||||
/** Validates the given endpoint key. Should return <code>true</code> is the given string is valid. */
|
||||
/** Validates the given endpoint key. Should return {@code true} is the given string is valid. */
|
||||
protected abstract boolean validateLookupKey(String key);
|
||||
|
||||
/**
|
||||
* Returns the the endpoint key for the given message context. Returns <code>null</code> if a key cannot be found.
|
||||
* Returns the the endpoint key for the given message context. Returns {@code null} if a key cannot be found.
|
||||
*
|
||||
* @return the registration key; or <code>null</code>
|
||||
* @return the registration key; or {@code null}
|
||||
*/
|
||||
protected abstract String getLookupKeyForMessage(MessageContext messageContext) throws Exception;
|
||||
|
||||
@@ -103,7 +103,7 @@ public abstract class AbstractMapBasedEndpointMapping extends AbstractEndpointMa
|
||||
* Lookup an endpoint for the given message. The extraction of the endpoint key is delegated to the concrete
|
||||
* subclass.
|
||||
*
|
||||
* @return the looked up endpoint, or <code>null</code>
|
||||
* @return the looked up endpoint, or {@code null}
|
||||
*/
|
||||
@Override
|
||||
protected final Object getEndpointInternal(MessageContext messageContext) throws Exception {
|
||||
@@ -121,7 +121,7 @@ public abstract class AbstractMapBasedEndpointMapping extends AbstractEndpointMa
|
||||
* Looks up an endpoint instance for the given keys. All keys are tried in order.
|
||||
*
|
||||
* @param key key the beans are mapped to
|
||||
* @return the associated endpoint instance, or <code>null</code> if not found
|
||||
* @return the associated endpoint instance, or {@code null} if not found
|
||||
*/
|
||||
protected Object lookupEndpoint(String key) {
|
||||
return endpointMap.get(key);
|
||||
@@ -155,12 +155,12 @@ public abstract class AbstractMapBasedEndpointMapping extends AbstractEndpointMa
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers annd checks the set endpoints. Checks the beans set through <code>setEndpointMap</code> and
|
||||
* <code>setMappings</code>, and registers the bean names found in the application context, if
|
||||
* <code>registerBeanNames</code> is set to <code>true</code>.
|
||||
* Registers annd checks the set endpoints. Checks the beans set through {@code setEndpointMap} and
|
||||
* {@code setMappings}, and registers the bean names found in the application context, if
|
||||
* {@code registerBeanNames} is set to {@code true}.
|
||||
*
|
||||
* @throws ApplicationContextException if either of the endpoints defined via <code>setEndpointMap</code> or
|
||||
* <code>setMappings</code> is invalid
|
||||
* @throws ApplicationContextException if either of the endpoints defined via {@code setEndpointMap} or
|
||||
* {@code setMappings} is invalid
|
||||
* @see #setEndpointMap(java.util.Map)
|
||||
* @see #setMappings(java.util.Properties)
|
||||
* @see #setRegisterBeanNames(boolean)
|
||||
|
||||
@@ -38,8 +38,8 @@ import org.springframework.ws.server.endpoint.MethodEndpoint;
|
||||
|
||||
/**
|
||||
* Abstract base class for {@link MethodEndpoint} mappings.
|
||||
* <p/>
|
||||
* Subclasses typically implement {@link org.springframework.beans.factory.config.BeanPostProcessor} to look for beans
|
||||
*
|
||||
* <p>Subclasses typically implement {@link org.springframework.beans.factory.config.BeanPostProcessor} to look for beans
|
||||
* that qualify as endpoint. The methods of this bean are then registered under a specific key with {@link
|
||||
* #registerEndpoint(Object, MethodEndpoint)}.
|
||||
*
|
||||
@@ -54,7 +54,7 @@ public abstract class AbstractMethodEndpointMapping<T> extends AbstractEndpointM
|
||||
* Lookup an endpoint for the given message. The extraction of the endpoint key is delegated to the concrete
|
||||
* subclass.
|
||||
*
|
||||
* @return the looked up endpoint, or <code>null</code>
|
||||
* @return the looked up endpoint, or {@code null}
|
||||
* @see #getLookupKeyForMessage(MessageContext)
|
||||
*/
|
||||
@Override
|
||||
@@ -80,7 +80,7 @@ public abstract class AbstractMethodEndpointMapping<T> extends AbstractEndpointM
|
||||
* Looks up an endpoint instance for the given keys. All keys are tried in order.
|
||||
*
|
||||
* @param key key the beans are mapped to
|
||||
* @return the associated endpoint instance, or <code>null</code> if not found
|
||||
* @return the associated endpoint instance, or {@code null} if not found
|
||||
*/
|
||||
protected MethodEndpoint lookupEndpoint(T key) {
|
||||
return endpointMap.get(key);
|
||||
@@ -184,11 +184,11 @@ public abstract class AbstractMethodEndpointMapping<T> extends AbstractEndpointM
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the the endpoint key for the given method. Returns <code>null</code> if the method is not to be
|
||||
* Returns the the endpoint key for the given method. Returns {@code null} if the method is not to be
|
||||
* registered, which is the default.
|
||||
*
|
||||
* @param method the method
|
||||
* @return a registration key, or <code>null</code> if the method is not to be registered
|
||||
* @return a registration key, or {@code null} if the method is not to be registered
|
||||
* @see #getLookupKeysForMethod(Method)
|
||||
*/
|
||||
protected T getLookupKeyForMethod(Method method) {
|
||||
@@ -210,8 +210,8 @@ public abstract class AbstractMethodEndpointMapping<T> extends AbstractEndpointM
|
||||
|
||||
/**
|
||||
* Return the class or interface to use for method reflection.
|
||||
* <p/>
|
||||
* Default implementation delegates to {@link AopUtils#getTargetClass(Object)}.
|
||||
*
|
||||
* <p>Default implementation delegates to {@link AopUtils#getTargetClass(Object)}.
|
||||
*
|
||||
* @param endpoint the bean instance (might be an AOP proxy)
|
||||
* @return the bean class to expose
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.ws.context.MessageContext;
|
||||
import org.springframework.xml.namespace.QNameUtils;
|
||||
|
||||
/**
|
||||
* Abstract base class for <code>EndpointMapping</code>s that resolve qualified names as registration keys.
|
||||
* Abstract base class for {@code EndpointMapping}s that resolve qualified names as registration keys.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
|
||||
@@ -33,8 +33,8 @@ import org.springframework.ws.server.endpoint.support.PayloadRootUtils;
|
||||
/**
|
||||
* Implementation of the {@link EndpointMapping} interface that uses the {@link PayloadRoot} annotation to map methods
|
||||
* to request payload root elements.
|
||||
* <p/>
|
||||
* Endpoints typically have the following form:
|
||||
*
|
||||
* <p>Endpoints typically have the following form:
|
||||
* <pre>
|
||||
* @Endpoint
|
||||
* public class MyEndpoint{
|
||||
|
||||
@@ -24,21 +24,21 @@ import org.springframework.ws.context.MessageContext;
|
||||
import org.springframework.ws.server.endpoint.support.PayloadRootUtils;
|
||||
|
||||
/**
|
||||
* Implementation of the <code>EndpointMapping</code> interface to map from the qualified name of the request payload
|
||||
* Implementation of the {@code EndpointMapping} interface to map from the qualified name of the request payload
|
||||
* root element. Supports both mapping to bean instances and mapping to bean names: the latter is required for prototype
|
||||
* endpoints.
|
||||
* <p/>
|
||||
* The <code>endpointMap</code> property is suitable for populating the endpoint map with bean references, e.g. via the
|
||||
*
|
||||
* <p>The {@code endpointMap} property is suitable for populating the endpoint map with bean references, e.g. via the
|
||||
* map element in XML bean definitions.
|
||||
* <p/>
|
||||
* Mappings to bean names can be set via the <code>mappings</code> property, in a form accepted by the
|
||||
* <code>java.util.Properties</code> class, like as follows:
|
||||
*
|
||||
* <p>Mappings to bean names can be set via the {@code mappings} property, in a form accepted by the
|
||||
* {@code java.util.Properties} class, like as follows:
|
||||
* <pre>
|
||||
* {http://www.springframework.org/spring-ws/samples/airline/schemas}BookFlight=bookFlightEndpoint
|
||||
* {http://www.springframework.org/spring-ws/samples/airline/schemas}GetFlights=getFlightsEndpoint
|
||||
* </pre>
|
||||
* The syntax is QNAME=ENDPOINT_BEAN_NAME. Qualified names are parsed using the syntax described in
|
||||
* <code>QNameEditor</code>.
|
||||
* {@code QNameEditor}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see org.springframework.xml.namespace.QNameEditor
|
||||
|
||||
@@ -29,19 +29,19 @@ import org.springframework.ws.server.endpoint.support.PayloadRootUtils;
|
||||
|
||||
/**
|
||||
* Simple subclass of {@link AbstractMethodEndpointMapping} that maps from the local name of the request payload to
|
||||
* methods. Endpoint beans are registered using the <code>endpoints</code> property; the endpoint methods that start
|
||||
* with <code>methodPrefix</code> and end with <code>methodSuffix</code> will be registered.
|
||||
* <p/>
|
||||
* Endpoints typically have the following form:
|
||||
* methods. Endpoint beans are registered using the {@code endpoints} property; the endpoint methods that start
|
||||
* with {@code methodPrefix} and end with {@code methodSuffix} will be registered.
|
||||
*
|
||||
* <p>Endpoints typically have the following form:
|
||||
* <pre>
|
||||
* public class MyEndpoint{
|
||||
* <p/>
|
||||
*
|
||||
* public Source handleMyMessage(Source source) {
|
||||
* ...
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
* This method will handle any message that has the <code>MyMessage</code> as a payload root local name.
|
||||
* This method will handle any message that has the {@code MyMessage} as a payload root local name.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see #setEndpoints(Object[])
|
||||
@@ -68,8 +68,8 @@ public class SimpleMethodEndpointMapping extends AbstractMethodEndpointMapping<S
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the endpoints. The endpoint methods that start with <code>methodPrefix</code> and end with
|
||||
* <code>methodSuffix</code> will be registered.
|
||||
* Sets the endpoints. The endpoint methods that start with {@code methodPrefix} and end with
|
||||
* {@code methodSuffix} will be registered.
|
||||
*/
|
||||
public void setEndpoints(Object[] endpoints) {
|
||||
this.endpoints = endpoints;
|
||||
@@ -82,7 +82,7 @@ public class SimpleMethodEndpointMapping extends AbstractMethodEndpointMapping<S
|
||||
|
||||
/**
|
||||
* Sets the method prefix. All methods with names starting with this string will be registered. Default is
|
||||
* "<code>handle</code>".
|
||||
* "{@code handle}".
|
||||
*
|
||||
* @see #DEFAULT_METHOD_PREFIX
|
||||
*/
|
||||
|
||||
@@ -29,14 +29,14 @@ import org.springframework.ws.transport.context.TransportContextHolder;
|
||||
* Implementation of the {@code EndpointMapping} interface to map from the full request URI or request URI path to
|
||||
* endpoint beans. Supports both mapping to bean instances and mapping to bean names: the latter is required for
|
||||
* prototype handlers.
|
||||
* <p/>
|
||||
* When the {@link #setUsePath(boolean) usePath} property is enabled, the mapping will be based on the URI path rather
|
||||
*
|
||||
* <p>When the {@link #setUsePath(boolean) usePath} property is enabled, the mapping will be based on the URI path rather
|
||||
* than the full URI.
|
||||
* <p/>
|
||||
* The {@code endpointMap} property is suitable for populating the endpoint map with bean references, e.g. via the map
|
||||
*
|
||||
* <p>The {@code endpointMap} property is suitable for populating the endpoint map with bean references, e.g. via the map
|
||||
* element in XML bean definitions.
|
||||
* <p/>
|
||||
* Mappings to bean names can be set via the {@code mappings} property, in a form accepted by the {@code
|
||||
*
|
||||
* <p>Mappings to bean names can be set via the {@code mappings} property, in a form accepted by the {@code
|
||||
* java.util.Properties} class, like as follows:
|
||||
* <pre>
|
||||
* http://example.com:8080/services/bookFlight=bookFlightEndpoint
|
||||
@@ -47,8 +47,8 @@ import org.springframework.ws.transport.context.TransportContextHolder;
|
||||
* /services/bookFlight=bookFlightEndpoint
|
||||
* </pre>
|
||||
* The syntax is [URI|PATH]=ENDPOINT_BEAN_NAME.
|
||||
* <p/>
|
||||
* This endpoint mapping does not read from the request message, and therefore is more suitable for message factories
|
||||
*
|
||||
* <p>This endpoint mapping does not read from the request message, and therefore is more suitable for message factories
|
||||
* which directly read from the transport request (such as the {@link AxiomSoapMessageFactory} with the {@code
|
||||
* payloadCaching} disabled). However, this endpoint mapping obviously is transport specific.
|
||||
*
|
||||
|
||||
@@ -33,18 +33,18 @@ import org.springframework.xml.xpath.XPathExpression;
|
||||
import org.springframework.xml.xpath.XPathExpressionFactory;
|
||||
|
||||
/**
|
||||
* Implementation of the <code>EndpointMapping</code> interface that maps to endpoint using an XPath expression.
|
||||
* Implementation of the {@code EndpointMapping} interface that maps to endpoint using an XPath expression.
|
||||
* Supports both mapping to bean instances and mapping to bean names: the latter is required for prototype endpoints.
|
||||
* <p/>
|
||||
* The XPath expression can be set using the <code>expression</code> property. Setting this property is required. There
|
||||
* is also an optional <code>namespaces</code> property, which defines to set namespace bindings that are used in the
|
||||
*
|
||||
* <p>The XPath expression can be set using the {@code expression} property. Setting this property is required. There
|
||||
* is also an optional {@code namespaces} property, which defines to set namespace bindings that are used in the
|
||||
* expression.
|
||||
* <p/>
|
||||
* The <code>endpointMap</code> property is suitable for populating the endpoint map with bean references, e.g. via the
|
||||
*
|
||||
* <p>The {@code endpointMap} property is suitable for populating the endpoint map with bean references, e.g. via the
|
||||
* map element in XML bean definitions.
|
||||
* <p/>
|
||||
* Mappings to bean names can be set via the <code>mappings</code> property, in a form accepted by the
|
||||
* <code>java.util.Properties</code> class, like as follows:
|
||||
*
|
||||
* <p>Mappings to bean names can be set via the {@code mappings} property, in a form accepted by the
|
||||
* {@code java.util.Properties} class, like as follows:
|
||||
* <pre>
|
||||
* BookFlight=bookFlightEndpoint
|
||||
* GetFlights=getFlightsEndpoint
|
||||
|
||||
@@ -32,8 +32,8 @@ import org.springframework.xml.transform.TransformerHelper;
|
||||
/**
|
||||
* Implementation of the {@link org.springframework.ws.server.EndpointMapping EndpointMapping} interface that uses the
|
||||
* JAXB2 {@link XmlRootElement} annotation to map methods to request payload root elements.
|
||||
* <p/>
|
||||
* Endpoints typically have the following form:
|
||||
*
|
||||
* <p>Endpoints typically have the following form:
|
||||
* <pre>
|
||||
* @Endpoint
|
||||
* public class MyEndpoint{
|
||||
|
||||
@@ -39,8 +39,8 @@ public abstract class NamespaceUtils {
|
||||
/**
|
||||
* Creates a {@code NamespaceContext} for the specified method, based on {@link Namespaces @Namespaces} and {@link
|
||||
* Namespace @Namespace} annotations.
|
||||
* <p/>
|
||||
* This method will search for {@link Namespaces @Namespaces} and {@link Namespace @Namespace} annotation in the
|
||||
*
|
||||
* <p>This method will search for {@link Namespaces @Namespaces} and {@link Namespace @Namespace} annotation in the
|
||||
* given method, its class, and its package, in reverse order. That is: package-level annotations are overridden by
|
||||
* class-level annotations, which again are overridden by method-level annotations.
|
||||
*
|
||||
|
||||
@@ -53,8 +53,8 @@ public abstract class PayloadRootUtils {
|
||||
* Returns the root qualified name of the given source, transforming it if necessary.
|
||||
*
|
||||
* @param source the source to get the root element from
|
||||
* @param transformerFactory a transformer factory, necessary if the given source is not a <code>DOMSource</code>
|
||||
* @return the root element, or <code>null</code> if <code>source</code> is <code>null</code>
|
||||
* @param transformerFactory a transformer factory, necessary if the given source is not a {@code DOMSource}
|
||||
* @return the root element, or {@code null} if {@code source} is {@code null}
|
||||
*/
|
||||
public static QName getPayloadRootQName(Source source, TransformerFactory transformerFactory)
|
||||
throws TransformerException {
|
||||
|
||||
@@ -31,37 +31,37 @@ public abstract class AbstractSoapMessage extends AbstractMimeMessage implements
|
||||
|
||||
private SoapVersion version;
|
||||
|
||||
/** Returns <code>getEnvelope().getBody()</code>. */
|
||||
/** Returns {@code getEnvelope().getBody()}. */
|
||||
@Override
|
||||
public final SoapBody getSoapBody() {
|
||||
return getEnvelope().getBody();
|
||||
}
|
||||
|
||||
/** Returns <code>getEnvelope().getHeader()</code>. */
|
||||
/** Returns {@code getEnvelope().getHeader()}. */
|
||||
@Override
|
||||
public final SoapHeader getSoapHeader() {
|
||||
return getEnvelope().getHeader();
|
||||
}
|
||||
|
||||
/** Returns <code>getSoapBody().getPayloadSource()</code>. */
|
||||
/** Returns {@code getSoapBody().getPayloadSource()}. */
|
||||
@Override
|
||||
public final Source getPayloadSource() {
|
||||
return getSoapBody().getPayloadSource();
|
||||
}
|
||||
|
||||
/** Returns <code>getSoapBody().getPayloadResult()</code>. */
|
||||
/** Returns {@code getSoapBody().getPayloadResult()}. */
|
||||
@Override
|
||||
public final Result getPayloadResult() {
|
||||
return getSoapBody().getPayloadResult();
|
||||
}
|
||||
|
||||
/** Returns <code>getSoapBody().hasFault()</code>. */
|
||||
/** Returns {@code getSoapBody().hasFault()}. */
|
||||
@Override
|
||||
public final boolean hasFault() {
|
||||
return getSoapBody().hasFault();
|
||||
}
|
||||
|
||||
/** Returns <code>getSoapBody().getFault().getFaultStringOrReason()</code>. */
|
||||
/** Returns {@code getSoapBody().getFault().getFaultStringOrReason()}. */
|
||||
@Override
|
||||
public final String getFaultReason() {
|
||||
if (hasFault()) {
|
||||
|
||||
@@ -23,11 +23,11 @@ import javax.xml.transform.Source;
|
||||
import org.springframework.ws.WebServiceMessage;
|
||||
|
||||
/**
|
||||
* Represents the <code>Body</code> element in a SOAP message. A SOAP body contains the <strong>payload</strong> of the
|
||||
* message. This payload can be custom XML, or a <code>SoapFault</code> (but not both).
|
||||
* <p/>
|
||||
* Note that the source returned by <code>getSource()</code> includes the SOAP Body element itself. For the contents of
|
||||
* the body, use <code>getPayloadSource()</code>.
|
||||
* Represents the {@code Body} element in a SOAP message. A SOAP body contains the <strong>payload</strong> of the
|
||||
* message. This payload can be custom XML, or a {@code SoapFault} (but not both).
|
||||
*
|
||||
* <p>Note that the source returned by {@code getSource()} includes the SOAP Body element itself. For the contents of
|
||||
* the body, use {@code getPayloadSource()}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see SoapEnvelope#getBody()
|
||||
@@ -39,7 +39,7 @@ import org.springframework.ws.WebServiceMessage;
|
||||
public interface SoapBody extends SoapElement {
|
||||
|
||||
/**
|
||||
* Returns a <code>Source</code> that represents the contents of the body.
|
||||
* Returns a {@code Source} that represents the contents of the body.
|
||||
*
|
||||
* @return the message contents
|
||||
* @see WebServiceMessage#getPayloadSource()
|
||||
@@ -47,9 +47,9 @@ public interface SoapBody extends SoapElement {
|
||||
Source getPayloadSource();
|
||||
|
||||
/**
|
||||
* Returns a <code>Result</code> that represents the contents of the body.
|
||||
* <p/>
|
||||
* Calling this method removes the current content of the body.
|
||||
* Returns a {@code Result} that represents the contents of the body.
|
||||
*
|
||||
* <p>Calling this method removes the current content of the body.
|
||||
*
|
||||
* @return the message contents
|
||||
* @see WebServiceMessage#getPayloadResult()
|
||||
@@ -57,63 +57,63 @@ public interface SoapBody extends SoapElement {
|
||||
Result getPayloadResult();
|
||||
|
||||
/**
|
||||
* Adds a <code>MustUnderstand</code> fault to the body. A <code>MustUnderstand</code> is returned when a SOAP
|
||||
* header with a <code>MustUnderstand</code> attribute is not understood.
|
||||
* <p/>
|
||||
* Adding a fault removes the current content of the body.
|
||||
* Adds a {@code MustUnderstand} fault to the body. A {@code MustUnderstand} is returned when a SOAP
|
||||
* header with a {@code MustUnderstand} attribute is not understood.
|
||||
*
|
||||
* <p>Adding a fault removes the current content of the body.
|
||||
*
|
||||
* @param faultStringOrReason the SOAP 1.1 fault string or SOAP 1.2 reason text
|
||||
* @param locale the language of faultStringOrReason. Optional for SOAP 1.1
|
||||
* @return the created <code>SoapFault</code>
|
||||
* @return the created {@code SoapFault}
|
||||
*/
|
||||
SoapFault addMustUnderstandFault(String faultStringOrReason, Locale locale) throws SoapFaultException;
|
||||
|
||||
/**
|
||||
* Adds a <code>Client</code>/<code>Sender</code> fault to the body. For SOAP 1.1, this adds a fault with a
|
||||
* <code>Client</code> fault code. For SOAP 1.2, this adds a fault with a <code>Sender</code> code.
|
||||
* <p/>
|
||||
* Adding a fault removes the current content of the body.
|
||||
* Adds a {@code Client}/{@code Sender} fault to the body. For SOAP 1.1, this adds a fault with a
|
||||
* {@code Client} fault code. For SOAP 1.2, this adds a fault with a {@code Sender} code.
|
||||
*
|
||||
* <p>Adding a fault removes the current content of the body.
|
||||
*
|
||||
* @param faultStringOrReason the SOAP 1.1 fault string or SOAP 1.2 reason text
|
||||
* @param locale the language of faultStringOrReason. Optional for SOAP 1.1
|
||||
* @return the created <code>SoapFault</code>
|
||||
* @return the created {@code SoapFault}
|
||||
*/
|
||||
SoapFault addClientOrSenderFault(String faultStringOrReason, Locale locale) throws SoapFaultException;
|
||||
|
||||
/**
|
||||
* Adds a <code>Server</code>/<code>Receiver</code> fault to the body. For SOAP 1.1, this adds a fault with a
|
||||
* <code>Server</code> fault code. For SOAP 1.2, this adds a fault with a <code>Receiver</code> code.
|
||||
* <p/>
|
||||
* Adding a fault removes the current content of the body.
|
||||
* Adds a {@code Server}/{@code Receiver} fault to the body. For SOAP 1.1, this adds a fault with a
|
||||
* {@code Server} fault code. For SOAP 1.2, this adds a fault with a {@code Receiver} code.
|
||||
*
|
||||
* <p>Adding a fault removes the current content of the body.
|
||||
*
|
||||
* @param faultStringOrReason the SOAP 1.1 fault string or SOAP 1.2 reason text
|
||||
* @param locale the language of faultStringOrReason. Optional for SOAP 1.1
|
||||
* @return the created <code>SoapFault</code>
|
||||
* @return the created {@code SoapFault}
|
||||
*/
|
||||
SoapFault addServerOrReceiverFault(String faultStringOrReason, Locale locale) throws SoapFaultException;
|
||||
|
||||
/**
|
||||
* Adds a <code>VersionMismatch</code> fault to the body.
|
||||
* <p/>
|
||||
* Adding a fault removes the current content of the body.
|
||||
* Adds a {@code VersionMismatch} fault to the body.
|
||||
*
|
||||
* <p>Adding a fault removes the current content of the body.
|
||||
*
|
||||
* @param faultStringOrReason the SOAP 1.1 fault string or SOAP 1.2 reason text
|
||||
* @param locale the language of faultStringOrReason. Optional for SOAP 1.1
|
||||
* @return the created <code>SoapFault</code>
|
||||
* @return the created {@code SoapFault}
|
||||
*/
|
||||
SoapFault addVersionMismatchFault(String faultStringOrReason, Locale locale) throws SoapFaultException;
|
||||
|
||||
/**
|
||||
* Indicates whether this body has a <code>SoapFault</code>.
|
||||
* Indicates whether this body has a {@code SoapFault}.
|
||||
*
|
||||
* @return <code>true</code> if the body has a fault; <code>false</code> otherwise
|
||||
* @return {@code true} if the body has a fault; {@code false} otherwise
|
||||
*/
|
||||
boolean hasFault();
|
||||
|
||||
/**
|
||||
* Returns the <code>SoapFault</code> of this body.
|
||||
* Returns the {@code SoapFault} of this body.
|
||||
*
|
||||
* @return the <code>SoapFault</code>, or <code>null</code> if none is present
|
||||
* @return the {@code SoapFault}, or {@code null} if none is present
|
||||
*/
|
||||
SoapFault getFault();
|
||||
}
|
||||
|
||||
@@ -37,10 +37,10 @@ public interface SoapElement {
|
||||
QName getName();
|
||||
|
||||
/**
|
||||
* Returns the <code>Source</code> of this element. This includes the element itself, i.e.
|
||||
* <code>SoapEnvelope.getSource()</code> will include the <code>Envelope</code> tag.
|
||||
* Returns the {@code Source} of this element. This includes the element itself, i.e.
|
||||
* {@code SoapEnvelope.getSource()} will include the {@code Envelope} tag.
|
||||
*
|
||||
* @return the <code>Source</code> of this element
|
||||
* @return the {@code Source} of this element
|
||||
*/
|
||||
Source getSource();
|
||||
|
||||
@@ -63,12 +63,12 @@ public interface SoapElement {
|
||||
* Returns the value of the attribute with the specified qualified name.
|
||||
*
|
||||
* @param name the qualified name
|
||||
* @return the value, or <code>null</code> if there is no such attribute
|
||||
* @return the value, or {@code null} if there is no such attribute
|
||||
*/
|
||||
String getAttributeValue(QName name);
|
||||
|
||||
/**
|
||||
* Returns an <code>Iterator</code> over all of the attributes in element as {@link QName qualified names}.
|
||||
* Returns an {@code Iterator} over all of the attributes in element as {@link QName qualified names}.
|
||||
*
|
||||
* @return an iterator over all the attribute names
|
||||
*/
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
package org.springframework.ws.soap;
|
||||
|
||||
/**
|
||||
* Represents the <code>Envelope</code> element in a SOAP message. The header contains the optional
|
||||
* <code>SoapHeader</code> and <code>SoapBody</code>.
|
||||
* Represents the {@code Envelope} element in a SOAP message. The header contains the optional
|
||||
* {@code SoapHeader} and {@code SoapBody}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
@@ -26,17 +26,17 @@ package org.springframework.ws.soap;
|
||||
public interface SoapEnvelope extends SoapElement {
|
||||
|
||||
/**
|
||||
* Returns the <code>SoapHeader</code>. Returns <code>null</code> if no header is present.
|
||||
* Returns the {@code SoapHeader}. Returns {@code null} if no header is present.
|
||||
*
|
||||
* @return the <code>SoapHeader</code>, or <code>null</code>
|
||||
* @return the {@code SoapHeader}, or {@code null}
|
||||
* @throws SoapHeaderException if the header cannot be returned
|
||||
*/
|
||||
SoapHeader getHeader() throws SoapHeaderException;
|
||||
|
||||
/**
|
||||
* Returns the <code>SoapBody</code>.
|
||||
* Returns the {@code SoapBody}.
|
||||
*
|
||||
* @return the <code>SoapBody</code>
|
||||
* @return the {@code SoapBody}
|
||||
* @throws SoapBodyException if the header cannot be returned
|
||||
*/
|
||||
SoapBody getBody() throws SoapBodyException;
|
||||
|
||||
@@ -19,9 +19,9 @@ package org.springframework.ws.soap;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Represents the <code>Fault</code> element in the body of a SOAP message.
|
||||
* <p/>
|
||||
* A fault consists of a {@link #getFaultCode() fault code}, {@link #getFaultActorOrRole fault string/reason}, and
|
||||
* Represents the {@code Fault} element in the body of a SOAP message.
|
||||
*
|
||||
* <p>A fault consists of a {@link #getFaultCode() fault code}, {@link #getFaultActorOrRole fault string/reason}, and
|
||||
* {@link #getFaultActorOrRole() role}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
@@ -45,14 +45,14 @@ public interface SoapFault extends SoapElement {
|
||||
void setFaultActorOrRole(String faultActor);
|
||||
|
||||
/**
|
||||
* Returns the optional detail element for this <code>SoapFault</code>.
|
||||
* Returns the optional detail element for this {@code SoapFault}.
|
||||
*
|
||||
* @return a fault detail
|
||||
*/
|
||||
SoapFaultDetail getFaultDetail();
|
||||
|
||||
/**
|
||||
* Creates an optional <code>SoapFaultDetail</code> object and assigns it to this fault.
|
||||
* Creates an optional {@code SoapFaultDetail} object and assigns it to this fault.
|
||||
*
|
||||
* @return the created detail
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user