Javadoc
This commit is contained in:
@@ -28,6 +28,8 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.ws.WebServiceMessage;
|
||||
import org.springframework.ws.context.MessageContext;
|
||||
import org.springframework.ws.server.EndpointInterceptor;
|
||||
import org.springframework.ws.soap.SoapFault;
|
||||
import org.springframework.ws.soap.SoapMessage;
|
||||
import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
import org.springframework.xml.validation.XmlValidator;
|
||||
import org.springframework.xml.validation.XmlValidatorFactory;
|
||||
@@ -73,9 +75,7 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
this.schemaLanguage = schemaLanguage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the schema resources to use for validation.
|
||||
*/
|
||||
/** Returns the schema resources to use for validation. */
|
||||
public Resource[] getSchemas() {
|
||||
return schemas;
|
||||
}
|
||||
@@ -101,16 +101,12 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
setSchemas(new Resource[]{schema});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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</code>. */
|
||||
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</code>. */
|
||||
public void setValidateResponse(boolean validateResponse) {
|
||||
this.validateResponse = validateResponse;
|
||||
}
|
||||
@@ -120,7 +116,7 @@ public abstract class AbstractValidatingInterceptor extends TransformerObjectSup
|
||||
* <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>messageContext</code> is a <code>SoapMessageContext</code>, a SOAP Fault is added as response.
|
||||
* 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
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.springframework.ws.server.EndpointInvocationChain;
|
||||
import org.springframework.ws.server.endpoint.mapping.AbstractMapBasedEndpointMapping;
|
||||
import org.springframework.ws.soap.SoapEndpointMapping;
|
||||
import org.springframework.ws.soap.SoapMessage;
|
||||
import org.springframework.ws.soap.axiom.AxiomSoapMessageFactory;
|
||||
import org.springframework.ws.soap.server.SoapEndpointInvocationChain;
|
||||
|
||||
/**
|
||||
@@ -42,8 +43,8 @@ import org.springframework.ws.soap.server.SoapEndpointInvocationChain;
|
||||
* </pre>
|
||||
* The syntax is SOAP_ACTION=ENDPOINT_BEAN_NAME.
|
||||
* <p/>
|
||||
* This endpoint mapping does not read from the request message, and therefore is more suitable for message contexts
|
||||
* which directly read from the transport request (such as the <code>AxiomSoapMessageContextFactory</code> with the
|
||||
* 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</code> disabled).
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
|
||||
@@ -41,25 +41,19 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
|
||||
private static final QName WS_SECURITY_NAME =
|
||||
new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Security");
|
||||
|
||||
/**
|
||||
* Logger available to subclasses.
|
||||
*/
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private boolean secureResponse = true;
|
||||
|
||||
private boolean validateRequest = true;
|
||||
|
||||
/**
|
||||
* Indicates whether outgoing responsed are to be secured. Defaults to <code>true</code>.
|
||||
*/
|
||||
/** Indicates whether outgoing responsed are to be secured. Defaults to <code>true</code>. */
|
||||
public void setSecureResponse(boolean secureResponse) {
|
||||
this.secureResponse = secureResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether incoming request are to be validated. Defaults to <code>true</code>.
|
||||
*/
|
||||
/** Indicates whether incoming request are to be validated. Defaults to <code>true</code>. */
|
||||
public void setValidateRequest(boolean validateRequest) {
|
||||
this.validateRequest = validateRequest;
|
||||
}
|
||||
@@ -98,9 +92,7 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code>, i.e. faults are not secured.
|
||||
*/
|
||||
/** Returns <code>true</code>, i.e. faults are not secured. */
|
||||
public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception {
|
||||
return true;
|
||||
}
|
||||
@@ -142,8 +134,8 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract template method. Subclasses are required to validate the request contained in the given
|
||||
* <code>SoapMessageContext</code>, and replace the original request with the validated version.
|
||||
* Abstract template method. Subclasses are required to validate the request contained in the given {@link
|
||||
* SoapMessage}, and replace the original request with the validated version.
|
||||
*
|
||||
* @param soapMessage the soap message to validate
|
||||
* @throws WsSecurityValidationException in case of validation errors
|
||||
@@ -151,8 +143,8 @@ public abstract class AbstractWsSecurityInterceptor implements SoapEndpointInter
|
||||
protected abstract void validateMessage(SoapMessage soapMessage) throws WsSecurityValidationException;
|
||||
|
||||
/**
|
||||
* Abstract template method. Subclasses are required to secure the response contained in the given
|
||||
* <code>SoapMessageContext</code>, and replace the original response with the secured version.
|
||||
* Abstract template method. Subclasses are required to secure the response contained in the given {@link
|
||||
* SoapMessage}, and replace the original response with the secured version.
|
||||
*
|
||||
* @param soapMessage the soap message to secure
|
||||
* @throws WsSecuritySecurementException in case of securement errors
|
||||
|
||||
Reference in New Issue
Block a user