Added @Override annotations.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -92,6 +92,7 @@ public class Wsdl11DestinationProvider extends AbstractCachingDestinationProvide
|
||||
.createXPathExpression(expression, expressionNamespaces);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected URI lookupDestination() {
|
||||
try {
|
||||
DOMResult result = new DOMResult();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -47,6 +47,7 @@ public class PayloadValidatingInterceptor extends AbstractValidatingInterceptor
|
||||
* @param request the request message
|
||||
* @return the part of the message that is to validated, or <code>null</code> not to validate anything
|
||||
*/
|
||||
@Override
|
||||
protected Source getValidationRequestSource(WebServiceMessage request) {
|
||||
return request.getPayloadSource();
|
||||
}
|
||||
@@ -57,6 +58,7 @@ public class PayloadValidatingInterceptor extends AbstractValidatingInterceptor
|
||||
* @param response the response message
|
||||
* @return the part of the message that is to validated, or <code>null</code> not to validate anything
|
||||
*/
|
||||
@Override
|
||||
protected Source getValidationResponseSource(WebServiceMessage response) {
|
||||
return response.getPayloadSource();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,10 +40,12 @@ class MarshallingEndpointsBeanDefinitionParser extends AbstractSimpleBeanDefinit
|
||||
private static final String MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME =
|
||||
"org.springframework.ws.server.endpoint.adapter.MarshallingMethodEndpointAdapter";
|
||||
|
||||
@Override
|
||||
protected boolean shouldGenerateIdAsFallback() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBeanClassName(Element element) {
|
||||
if (JdkVersion.isAtLeastJava15() && genericAdapterPresent) {
|
||||
return GENERIC_MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME;
|
||||
@@ -51,6 +53,7 @@ class MarshallingEndpointsBeanDefinitionParser extends AbstractSimpleBeanDefinit
|
||||
return MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder beanDefinitionBuilder) {
|
||||
String marshallerName = element.getAttribute("marshaller");
|
||||
if (StringUtils.hasText(marshallerName)) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,14 +37,17 @@ class XPathEndpointsBeanDefinitionParser extends AbstractSimpleBeanDefinitionPar
|
||||
private static final String XPATH_PARAM_ANNOTATION_METHOD_ENDPOINT_ADAPTER_CLASS_NAME =
|
||||
"org.springframework.ws.server.endpoint.adapter.XPathParamAnnotationMethodEndpointAdapter";
|
||||
|
||||
@Override
|
||||
protected boolean shouldGenerateIdAsFallback() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBeanClassName(Element element) {
|
||||
return XPATH_PARAM_ANNOTATION_METHOD_ENDPOINT_ADAPTER_CLASS_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder beanDefinitionBuilder) {
|
||||
List namespaceElements = DomUtils.getChildElementsByTagName(element, "namespace");
|
||||
if (!namespaceElements.isEmpty()) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -74,6 +74,7 @@ public abstract class AbstractValidatingMarshallingPayloadEndpoint extends Abstr
|
||||
this.validators = validators;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean onUnmarshalRequest(MessageContext messageContext, Object requestObject) throws Exception {
|
||||
Validator[] validators = getValidators();
|
||||
if (validators != null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -74,6 +74,7 @@ public class GenericMarshallingMethodEndpointAdapter extends MarshallingMethodEn
|
||||
super(marshaller, unmarshaller);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean supportsInternal(MethodEndpoint methodEndpoint) {
|
||||
Method method = methodEndpoint.getMethod();
|
||||
return supportsReturnType(method) && supportsParameters(method);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -129,6 +129,7 @@ public class MarshallingMethodEndpointAdapter extends AbstractMethodEndpointAdap
|
||||
Assert.notNull(getUnmarshaller(), "unmarshaller is required");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void invokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint) throws Exception {
|
||||
WebServiceMessage request = messageContext.getRequest();
|
||||
Object requestObject = unmarshalRequest(request);
|
||||
@@ -161,6 +162,7 @@ public class MarshallingMethodEndpointAdapter extends AbstractMethodEndpointAdap
|
||||
* @see Marshaller#supports(Class)
|
||||
* @see Unmarshaller#supports(Class)
|
||||
*/
|
||||
@Override
|
||||
protected boolean supportsInternal(MethodEndpoint methodEndpoint) {
|
||||
Method method = methodEndpoint.getMethod();
|
||||
return supportsReturnType(method) && supportsParameters(method);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,12 +39,14 @@ import org.springframework.ws.soap.server.SoapMessageDispatcher;
|
||||
|
||||
public class MessageMethodEndpointAdapter extends AbstractMethodEndpointAdapter {
|
||||
|
||||
@Override
|
||||
protected boolean supportsInternal(MethodEndpoint methodEndpoint) {
|
||||
Method method = methodEndpoint.getMethod();
|
||||
return Void.TYPE.isAssignableFrom(method.getReturnType()) && method.getParameterTypes().length == 1 &&
|
||||
MessageContext.class.isAssignableFrom(method.getParameterTypes()[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void invokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint) throws Exception {
|
||||
methodEndpoint.invoke(new Object[]{messageContext});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,6 +44,7 @@ import org.springframework.ws.soap.server.SoapMessageDispatcher;
|
||||
*/
|
||||
public class PayloadMethodEndpointAdapter extends AbstractMethodEndpointAdapter {
|
||||
|
||||
@Override
|
||||
protected boolean supportsInternal(MethodEndpoint methodEndpoint) {
|
||||
Method method = methodEndpoint.getMethod();
|
||||
return (Void.TYPE.isAssignableFrom(method.getReturnType()) ||
|
||||
@@ -52,6 +53,7 @@ public class PayloadMethodEndpointAdapter extends AbstractMethodEndpointAdapter
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void invokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint) throws Exception {
|
||||
Source requestSource = messageContext.getRequest().getPayloadSource();
|
||||
Object result = methodEndpoint.invoke(new Object[]{requestSource});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -74,6 +74,7 @@ public class XPathParamAnnotationMethodEndpointAdapter extends AbstractMethodEnd
|
||||
}
|
||||
|
||||
/** Supports methods with @XPathParam parameters, and return either <code>Source</code> or nothing. */
|
||||
@Override
|
||||
protected boolean supportsInternal(MethodEndpoint methodEndpoint) {
|
||||
Method method = methodEndpoint.getMethod();
|
||||
if (!(Source.class.isAssignableFrom(method.getReturnType()) || Void.TYPE.equals(method.getReturnType()))) {
|
||||
@@ -105,6 +106,7 @@ public class XPathParamAnnotationMethodEndpointAdapter extends AbstractMethodEnd
|
||||
String.class.isAssignableFrom(clazz);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void invokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint) throws Exception {
|
||||
Element payloadElement = getRootElement(messageContext.getRequest().getPayloadSource());
|
||||
Object[] args = getMethodArguments(payloadElement, methodEndpoint.getMethod());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,6 +35,7 @@ import org.springframework.ws.server.endpoint.AbstractLoggingInterceptor;
|
||||
*/
|
||||
public class PayloadLoggingInterceptor extends AbstractLoggingInterceptor {
|
||||
|
||||
@Override
|
||||
protected Source getSource(WebServiceMessage message) {
|
||||
return message.getPayloadSource();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -55,6 +55,7 @@ public abstract class AbstractAnnotationMethodEndpointMapping extends AbstractMe
|
||||
return Endpoint.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void initApplicationContext() throws BeansException {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Looking for endpoints in application context: " + getApplicationContext());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -102,6 +102,7 @@ public abstract class AbstractMapBasedEndpointMapping extends AbstractEndpointMa
|
||||
*
|
||||
* @return the looked up endpoint, or <code>null</code>
|
||||
*/
|
||||
@Override
|
||||
protected final Object getEndpointInternal(MessageContext messageContext) throws Exception {
|
||||
String key = getLookupKeyForMessage(messageContext);
|
||||
if (!StringUtils.hasLength(key)) {
|
||||
@@ -161,6 +162,7 @@ public abstract class AbstractMapBasedEndpointMapping extends AbstractEndpointMa
|
||||
* @see #setMappings(java.util.Properties)
|
||||
* @see #setRegisterBeanNames(boolean)
|
||||
*/
|
||||
@Override
|
||||
protected final void initApplicationContext() throws BeansException {
|
||||
for (Iterator iter = temporaryEndpointMap.keySet().iterator(); iter.hasNext();) {
|
||||
String key = (String) iter.next();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -52,6 +52,7 @@ public abstract class AbstractMethodEndpointMapping extends AbstractEndpointMapp
|
||||
* @return the looked up endpoint, or <code>null</code>
|
||||
* @see #getLookupKeyForMessage(MessageContext)
|
||||
*/
|
||||
@Override
|
||||
protected Object getEndpointInternal(MessageContext messageContext) throws Exception {
|
||||
String key = getLookupKeyForMessage(messageContext);
|
||||
if (!StringUtils.hasLength(key)) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,6 +29,7 @@ import org.springframework.xml.namespace.QNameUtils;
|
||||
*/
|
||||
public abstract class AbstractQNameEndpointMapping extends AbstractMapBasedEndpointMapping {
|
||||
|
||||
@Override
|
||||
protected final String getLookupKeyForMessage(MessageContext messageContext) throws Exception {
|
||||
QName qName = resolveQName(messageContext);
|
||||
return qName != null ? qName.toString() : null;
|
||||
@@ -41,6 +42,7 @@ public abstract class AbstractQNameEndpointMapping extends AbstractMapBasedEndpo
|
||||
*/
|
||||
protected abstract QName resolveQName(MessageContext messageContext) throws Exception;
|
||||
|
||||
@Override
|
||||
protected boolean validateLookupKey(String key) {
|
||||
return QNameUtils.validateQName(key);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -53,6 +53,7 @@ public class PayloadRootAnnotationMethodEndpointMapping extends AbstractAnnotati
|
||||
transformerFactory = TransformerFactory.newInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLookupKeyForMessage(MessageContext messageContext) throws Exception {
|
||||
QName qName =
|
||||
PayloadRootUtils.getPayloadRootQName(messageContext.getRequest().getPayloadSource(), transformerFactory)
|
||||
@@ -60,6 +61,7 @@ public class PayloadRootAnnotationMethodEndpointMapping extends AbstractAnnotati
|
||||
return qName != null ? qName.toString() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLookupKeyForMethod(Method method) {
|
||||
PayloadRoot annotation = method.getAnnotation(PayloadRoot.class);
|
||||
if (annotation != null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -53,6 +53,7 @@ public class PayloadRootQNameEndpointMapping extends AbstractQNameEndpointMappin
|
||||
transformerFactory = TransformerFactory.newInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected QName resolveQName(MessageContext messageContext) throws TransformerException, XMLStreamException {
|
||||
return PayloadRootUtils.getPayloadRootQName(messageContext.getRequest().getPayloadSource(), transformerFactory);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -115,6 +115,7 @@ public class SimpleMethodEndpointMapping extends AbstractMethodEndpointMapping i
|
||||
}
|
||||
|
||||
/** Returns the name of the given method, with the prefix and suffix stripped off. */
|
||||
@Override
|
||||
protected String getLookupKeyForMethod(Method method) {
|
||||
String methodName = method.getName();
|
||||
String prefix = getMethodPrefix();
|
||||
@@ -128,6 +129,7 @@ public class SimpleMethodEndpointMapping extends AbstractMethodEndpointMapping i
|
||||
}
|
||||
|
||||
/** Returns the local part of the payload root element of the request. */
|
||||
@Override
|
||||
protected String getLookupKeyForMessage(MessageContext messageContext)
|
||||
throws TransformerException, XMLStreamException {
|
||||
WebServiceMessage request = messageContext.getRequest();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,6 +49,7 @@ import org.springframework.ws.transport.context.TransportContextHolder;
|
||||
*/
|
||||
public class UriEndpointMapping extends AbstractMapBasedEndpointMapping {
|
||||
|
||||
@Override
|
||||
protected boolean validateLookupKey(String key) {
|
||||
try {
|
||||
new URI(key);
|
||||
@@ -59,6 +60,7 @@ public class UriEndpointMapping extends AbstractMapBasedEndpointMapping {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLookupKeyForMessage(MessageContext messageContext) throws Exception {
|
||||
TransportContext transportContext = TransportContextHolder.getTransportContext();
|
||||
if (transportContext != null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -87,6 +87,7 @@ public class XPathPayloadEndpointMapping extends AbstractMapBasedEndpointMapping
|
||||
transformerFactory = TransformerFactory.newInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLookupKeyForMessage(MessageContext messageContext) throws Exception {
|
||||
Element payloadElement = getMessagePayloadElement(messageContext.getRequest());
|
||||
return expression.evaluateAsString(payloadElement);
|
||||
@@ -99,6 +100,7 @@ public class XPathPayloadEndpointMapping extends AbstractMapBasedEndpointMapping
|
||||
return (Element) domResult.getNode().getFirstChild();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean validateLookupKey(String key) {
|
||||
return StringUtils.hasLength(key);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -89,6 +89,7 @@ public abstract class AbstractActionEndpointMapping extends AbstractAddressingEn
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final Object getEndpointInternal(MessageAddressingProperties map) {
|
||||
URI action = map.getAction();
|
||||
if (logger.isDebugEnabled()) {
|
||||
@@ -160,6 +161,7 @@ public abstract class AbstractActionEndpointMapping extends AbstractAddressingEn
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected URI getResponseAction(Object endpoint, MessageAddressingProperties requestMap) {
|
||||
URI requestAction = requestMap.getAction();
|
||||
if (requestAction != null) {
|
||||
@@ -170,6 +172,7 @@ public abstract class AbstractActionEndpointMapping extends AbstractAddressingEn
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected URI getFaultAction(Object endpoint, MessageAddressingProperties requestMap) {
|
||||
URI requestAction = requestMap.getAction();
|
||||
if (requestAction != null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -68,6 +68,7 @@ public class AnnotationActionEndpointMapping extends AbstractActionMethodEndpoin
|
||||
* Returns the action value for the specified method. Default implementation looks for the {@link Action} annotation
|
||||
* value.
|
||||
*/
|
||||
@Override
|
||||
protected URI getActionForMethod(Method method) {
|
||||
Action action = method.getAnnotation(Action.class);
|
||||
if (action != null && StringUtils.hasText(action.value())) {
|
||||
@@ -91,6 +92,7 @@ public class AnnotationActionEndpointMapping extends AbstractActionMethodEndpoin
|
||||
* @param endpoint the method endpoint to return the address for
|
||||
* @return the endpoint address; or <code>null</code> to ignore the destination property
|
||||
*/
|
||||
@Override
|
||||
protected URI getEndpointAddress(Object endpoint) {
|
||||
MethodEndpoint methodEndpoint = (MethodEndpoint) endpoint;
|
||||
Class endpointClass = methodEndpoint.getMethod().getDeclaringClass();
|
||||
@@ -103,6 +105,7 @@ public class AnnotationActionEndpointMapping extends AbstractActionMethodEndpoin
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected URI getResponseAction(Object endpoint, MessageAddressingProperties map) {
|
||||
MethodEndpoint methodEndpoint = (MethodEndpoint) endpoint;
|
||||
Action action = methodEndpoint.getMethod().getAnnotation(Action.class);
|
||||
@@ -114,6 +117,7 @@ public class AnnotationActionEndpointMapping extends AbstractActionMethodEndpoin
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected URI getFaultAction(Object endpoint, MessageAddressingProperties map) {
|
||||
MethodEndpoint methodEndpoint = (MethodEndpoint) endpoint;
|
||||
Action action = methodEndpoint.getMethod().getAnnotation(Action.class);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -102,6 +102,7 @@ public class SimpleActionEndpointMapping extends AbstractActionEndpointMapping {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
super.afterPropertiesSet();
|
||||
registerEndpoints(actionMap);
|
||||
@@ -132,6 +133,7 @@ public class SimpleActionEndpointMapping extends AbstractActionEndpointMapping {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected URI getEndpointAddress(Object endpoint) {
|
||||
return address;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -38,6 +38,7 @@ public class Addressing10 extends AbstractAddressingVersion {
|
||||
|
||||
private static final String NAMESPACE_URI = "http://www.w3.org/2005/08/addressing";
|
||||
|
||||
@Override
|
||||
public void addAddressingHeaders(SoapMessage message, MessageAddressingProperties map) {
|
||||
Assert.notNull(map.getAction(), "'Action' is required");
|
||||
super.addAddressingHeaders(message, map);
|
||||
@@ -54,42 +55,52 @@ public class Addressing10 extends AbstractAddressingVersion {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getNamespaceUri() {
|
||||
return NAMESPACE_URI;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected QName getReferencePropertiesName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected URI getDefaultTo() {
|
||||
return getAnonymous();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected EndpointReference getDefaultReplyTo(EndpointReference from) {
|
||||
return new EndpointReference(getAnonymous());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final URI getAnonymous() {
|
||||
return URI.create(NAMESPACE_URI + "/anonymous");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final URI getNone() {
|
||||
return URI.create(NAMESPACE_URI + "/none");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final QName getMessageAddressingHeaderRequiredFaultSubcode() {
|
||||
return QNameUtils.createQName(NAMESPACE_URI, "MessageAddressingHeaderRequired", getNamespacePrefix());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final String getMessageAddressingHeaderRequiredFaultReason() {
|
||||
return "A required header representing a Message Addressing Property is not present";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected QName getInvalidAddressingHeaderFaultSubcode() {
|
||||
return QNameUtils.createQName(NAMESPACE_URI, "InvalidAddressingHeader", getNamespacePrefix());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getInvalidAddressingHeaderFaultReason() {
|
||||
return "A header representing a Message Addressing Property is not valid and the message cannot be processed";
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -38,6 +38,7 @@ public class Addressing200408 extends AbstractAddressingVersion {
|
||||
|
||||
private static final String NAMESPACE_URI = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
|
||||
|
||||
@Override
|
||||
public void addAddressingHeaders(SoapMessage message, MessageAddressingProperties map) {
|
||||
Assert.notNull(map.getAction(), "'Action' is required");
|
||||
Assert.notNull(map.getTo(), "'To' is required");
|
||||
@@ -57,38 +58,47 @@ public class Addressing200408 extends AbstractAddressingVersion {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final URI getAnonymous() {
|
||||
return URI.create(NAMESPACE_URI + "/role/anonymous");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final String getInvalidAddressingHeaderFaultReason() {
|
||||
return "A message information header is not valid and the message cannot be processed.";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final QName getInvalidAddressingHeaderFaultSubcode() {
|
||||
return QNameUtils.createQName(NAMESPACE_URI, "InvalidMessageInformationHeader", getNamespacePrefix());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final String getMessageAddressingHeaderRequiredFaultReason() {
|
||||
return "A required message information header, To, MessageID, or Action, is not present.";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final QName getMessageAddressingHeaderRequiredFaultSubcode() {
|
||||
return QNameUtils.createQName(NAMESPACE_URI, "MessageInformationHeaderRequired", getNamespacePrefix());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final String getNamespaceUri() {
|
||||
return NAMESPACE_URI;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected URI getDefaultTo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final EndpointReference getDefaultReplyTo(EndpointReference from) {
|
||||
return from;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final URI getNone() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,6 +44,7 @@ class AxiomResult extends SAXResult {
|
||||
*
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
@Override
|
||||
public void setHandler(ContentHandler handler) {
|
||||
throw new UnsupportedOperationException("setHandler is not supported");
|
||||
}
|
||||
@@ -53,6 +54,7 @@ class AxiomResult extends SAXResult {
|
||||
*
|
||||
* @throws UnsupportedOperationException always
|
||||
*/
|
||||
@Override
|
||||
public void setLexicalHandler(LexicalHandler handler) {
|
||||
throw new UnsupportedOperationException("setLexicalHandler is not supported");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,10 +35,12 @@ class CachingPayload extends Payload {
|
||||
super(axiomBody, axiomFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected XMLStreamReader getStreamReader(OMElement payloadElement) {
|
||||
return payloadElement.getXMLStreamReader();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getResultInternal() {
|
||||
return new AxiomResult(getAxiomBody(), getAxiomFactory());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,10 +49,12 @@ class NonCachingPayload extends Payload {
|
||||
super(axiomBody, axiomFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getResultInternal() {
|
||||
return new StaxResult(new DelegatingStreamWriter());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected XMLStreamReader getStreamReader(OMElement payloadElement) {
|
||||
return payloadElement.getXMLStreamReaderWithoutCaching();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -184,12 +184,15 @@ public abstract class AxiomUtils {
|
||||
/** OutputStream that does nothing. */
|
||||
private static class NullOutputStream extends OutputStream {
|
||||
|
||||
@Override
|
||||
public void write(int b) throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(byte[] b) throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(byte[] b, int off, int len) throws IOException {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -72,41 +72,50 @@ class Saaj11Implementation extends SaajImplementation {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public QName getName(SOAPElement element) {
|
||||
return SaajUtils.toQName(element.getElementName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Source getSource(SOAPElement element) {
|
||||
return new SAXSource(new SaajXmlReader(element), new InputSource());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getResult(SOAPElement element) {
|
||||
return new SAXResult(new SaajContentHandler(element));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(SOAPElement element) {
|
||||
return element.getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setText(SOAPElement element, String content) throws SOAPException {
|
||||
element.addTextNode(content);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addAttribute(SOAPElement element, QName name, String value) throws SOAPException {
|
||||
Name attributeName = SaajUtils.toName(name, element);
|
||||
element.addAttribute(attributeName, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAttribute(SOAPElement element, QName name) throws SOAPException {
|
||||
Name attributeName = SaajUtils.toName(name, element);
|
||||
element.removeAttribute(attributeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttributeValue(SOAPElement element, QName name) throws SOAPException {
|
||||
Name attributeName = SaajUtils.toName(name, element);
|
||||
return element.getAttributeValue(attributeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getAllAttibutes(SOAPElement element) {
|
||||
List results = new ArrayList();
|
||||
for (Iterator iterator = element.getAllAttributes(); iterator.hasNext();) {
|
||||
@@ -116,6 +125,7 @@ class Saaj11Implementation extends SaajImplementation {
|
||||
return results.iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public QName getFaultCode(SOAPFault fault) {
|
||||
String code = fault.getFaultCode();
|
||||
int idx = code.indexOf(':');
|
||||
@@ -133,16 +143,19 @@ class Saaj11Implementation extends SaajImplementation {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DetailEntry addDetailEntry(Detail detail, QName name) throws SOAPException {
|
||||
Name detailEntryName = SaajUtils.toName(name, detail);
|
||||
return detail.addDetailEntry(detailEntryName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPHeaderElement addHeaderElement(SOAPHeader header, QName name) throws SOAPException {
|
||||
Name saajName = SaajUtils.toName(name, header);
|
||||
return header.addHeaderElement(saajName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPFault addFault(SOAPBody body, QName faultCode, String faultString, Locale locale) throws SOAPException {
|
||||
SOAPFault fault = body.addFault();
|
||||
if (StringUtils.hasLength(faultCode.getNamespaceURI()) &&
|
||||
@@ -161,26 +174,31 @@ class Saaj11Implementation extends SaajImplementation {
|
||||
}
|
||||
|
||||
/** Returns the envelope of the given message. */
|
||||
@Override
|
||||
public SOAPEnvelope getEnvelope(SOAPMessage message) throws SOAPException {
|
||||
return message.getSOAPPart().getEnvelope();
|
||||
}
|
||||
|
||||
/** Returns the header of the given envelope. */
|
||||
@Override
|
||||
public SOAPHeader getHeader(SOAPEnvelope envelope) throws SOAPException {
|
||||
return envelope.getHeader();
|
||||
}
|
||||
|
||||
/** Returns the body of the given envelope. */
|
||||
@Override
|
||||
public SOAPBody getBody(SOAPEnvelope envelope) throws SOAPException {
|
||||
return envelope.getBody();
|
||||
}
|
||||
|
||||
/** Returns all header elements. */
|
||||
@Override
|
||||
public Iterator examineAllHeaderElements(SOAPHeader header) {
|
||||
return header.getChildElements();
|
||||
}
|
||||
|
||||
/** Returns all header elements for which the must understand attribute is true, given the actor or role. */
|
||||
@Override
|
||||
public Iterator examineMustUnderstandHeaderElements(SOAPHeader header, String actorOrRole) {
|
||||
List result = new ArrayList();
|
||||
for (Iterator iterator = header.examineHeaderElements(actorOrRole); iterator.hasNext();) {
|
||||
@@ -193,74 +211,89 @@ class Saaj11Implementation extends SaajImplementation {
|
||||
}
|
||||
|
||||
/** Returns the SOAP 1.1 actor or SOAP 1.2 role attribute for the given header element. */
|
||||
@Override
|
||||
public String getActorOrRole(SOAPHeaderElement headerElement) {
|
||||
return headerElement.getActor();
|
||||
}
|
||||
|
||||
/** Sets the SOAP 1.1 actor or SOAP 1.2 role attribute for the given header element. */
|
||||
@Override
|
||||
public void setActorOrRole(SOAPHeaderElement headerElement, String actorOrRole) {
|
||||
headerElement.setActor(actorOrRole);
|
||||
}
|
||||
|
||||
/** Gets the must understand attribute for the given header element. */
|
||||
@Override
|
||||
public boolean getMustUnderstand(SOAPHeaderElement headerElement) {
|
||||
return headerElement.getMustUnderstand();
|
||||
}
|
||||
|
||||
/** Sets the must understand attribute for the given header element. */
|
||||
@Override
|
||||
public void setMustUnderstand(SOAPHeaderElement headerElement, boolean mustUnderstand) {
|
||||
headerElement.setMustUnderstand(mustUnderstand);
|
||||
}
|
||||
|
||||
/** Returns <code>true</code> if the body has a fault, <code>false</code> otherwise. */
|
||||
@Override
|
||||
public boolean hasFault(SOAPBody body) {
|
||||
return body.hasFault();
|
||||
}
|
||||
|
||||
/** Returns the fault for the given body, if any. */
|
||||
@Override
|
||||
public SOAPFault getFault(SOAPBody body) {
|
||||
return body.getFault();
|
||||
}
|
||||
|
||||
/** Returns the actor for the given fault. */
|
||||
@Override
|
||||
public String getFaultActor(SOAPFault fault) {
|
||||
return fault.getFaultActor();
|
||||
}
|
||||
|
||||
/** Sets the actor for the given fault. */
|
||||
@Override
|
||||
public void setFaultActor(SOAPFault fault, String actorOrRole) throws SOAPException {
|
||||
fault.setFaultActor(actorOrRole);
|
||||
}
|
||||
|
||||
/** Returns the fault string for the given fault. */
|
||||
@Override
|
||||
public String getFaultString(SOAPFault fault) {
|
||||
return fault.getFaultString();
|
||||
}
|
||||
|
||||
/** Returns the fault string language for the given fault. */
|
||||
@Override
|
||||
public Locale getFaultStringLocale(SOAPFault fault) {
|
||||
return Locale.ENGLISH;
|
||||
}
|
||||
|
||||
/** Returns the fault detail for the given fault. */
|
||||
@Override
|
||||
public Detail getFaultDetail(SOAPFault fault) {
|
||||
return fault.getDetail();
|
||||
}
|
||||
|
||||
/** Adds a fault detail for the given fault. */
|
||||
@Override
|
||||
public Detail addFaultDetail(SOAPFault fault) throws SOAPException {
|
||||
return fault.addDetail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTextNode(DetailEntry detailEntry, String text) throws SOAPException {
|
||||
detailEntry.addTextNode(text);
|
||||
}
|
||||
|
||||
/** Returns an iteration over all detail entries. */
|
||||
@Override
|
||||
public Iterator getDetailEntries(Detail detail) {
|
||||
return detail.getDetailEntries();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPElement getFirstBodyElement(SOAPBody body) {
|
||||
for (Iterator iterator = body.getChildElements(); iterator.hasNext();) {
|
||||
Object child = iterator.next();
|
||||
@@ -271,6 +304,7 @@ class Saaj11Implementation extends SaajImplementation {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeContents(SOAPElement element) {
|
||||
for (Iterator iterator = element.getChildElements(); iterator.hasNext();) {
|
||||
iterator.next();
|
||||
@@ -278,15 +312,18 @@ class Saaj11Implementation extends SaajImplementation {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
Iterator getChildElements(SOAPElement element, QName name) throws SOAPException {
|
||||
Name elementName = SaajUtils.toName(name, element);
|
||||
return element.getChildElements(elementName);
|
||||
}
|
||||
|
||||
@Override
|
||||
void addNamespaceDeclaration(SOAPElement element, String prefix, String namespaceUri) throws SOAPException {
|
||||
element.addNamespaceDeclaration(prefix, namespaceUri);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(SOAPMessage message, OutputStream outputStream) throws SOAPException, IOException {
|
||||
if (message.saveRequired()) {
|
||||
message.saveChanges();
|
||||
@@ -310,18 +347,22 @@ class Saaj11Implementation extends SaajImplementation {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public MimeHeaders getMimeHeaders(SOAPMessage message) {
|
||||
return message.getMimeHeaders();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getAttachments(SOAPMessage message) {
|
||||
return message.getAttachments();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getAttachment(SOAPMessage message, MimeHeaders mimeHeaders) {
|
||||
return message.getAttachments(mimeHeaders);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttachmentPart addAttachmentPart(SOAPMessage message, DataHandler dataHandler) {
|
||||
AttachmentPart attachmentPart = message.createAttachmentPart(dataHandler);
|
||||
message.addAttachmentPart(attachmentPart);
|
||||
@@ -332,42 +373,52 @@ class Saaj11Implementation extends SaajImplementation {
|
||||
// Unsupported
|
||||
//
|
||||
|
||||
@Override
|
||||
public String getFaultRole(SOAPFault fault) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.1 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFaultRole(SOAPFault fault, String role) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.1 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPHeaderElement addNotUnderstoodHeaderElement(SOAPHeader header, QName name) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.1 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPHeaderElement addUpgradeHeaderElement(SOAPHeader header, String[] supportedSoapUris) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.1 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getFaultSubcodes(SOAPFault fault) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.1 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendFaultSubcode(SOAPFault fault, QName subcode) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.1 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFaultNode(SOAPFault fault) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.1 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFaultNode(SOAPFault fault, String uri) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.1 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFaultReasonText(SOAPFault fault, Locale locale) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.1 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFaultReasonText(SOAPFault fault, Locale locale, String text) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.1 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -66,10 +66,12 @@ class Saaj12Implementation extends SaajImplementation {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public QName getName(SOAPElement element) {
|
||||
return SaajUtils.toQName(element.getElementName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public QName getFaultCode(SOAPFault fault) {
|
||||
return SaajUtils.toQName(fault.getFaultCodeAsName());
|
||||
}
|
||||
@@ -78,16 +80,19 @@ class Saaj12Implementation extends SaajImplementation {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DetailEntry addDetailEntry(Detail detail, QName name) throws SOAPException {
|
||||
Name detailEntryName = SaajUtils.toName(name, detail);
|
||||
return detail.addDetailEntry(detailEntryName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPHeaderElement addHeaderElement(SOAPHeader header, QName name) throws SOAPException {
|
||||
Name saajName = SaajUtils.toName(name, header);
|
||||
return header.addHeaderElement(saajName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPFault addFault(SOAPBody body, QName faultCode, String faultString, Locale locale) throws SOAPException {
|
||||
Name name = SaajUtils.toName(faultCode, body);
|
||||
if (locale == null) {
|
||||
@@ -98,29 +103,35 @@ class Saaj12Implementation extends SaajImplementation {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Source getSource(SOAPElement element) {
|
||||
return new DOMSource(element);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getResult(SOAPElement element) {
|
||||
return new DOMResult(element);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addAttribute(SOAPElement element, QName name, String value) throws SOAPException {
|
||||
Name attributeName = SaajUtils.toName(name, element);
|
||||
element.addAttribute(attributeName, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAttribute(SOAPElement element, QName name) throws SOAPException {
|
||||
Name attributeName = SaajUtils.toName(name, element);
|
||||
element.removeAttribute(attributeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttributeValue(SOAPElement element, QName name) throws SOAPException {
|
||||
Name attributeName = SaajUtils.toName(name, element);
|
||||
return element.getAttributeValue(attributeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getAllAttibutes(SOAPElement element) {
|
||||
List results = new ArrayList();
|
||||
for (Iterator iterator = element.getAllAttributes(); iterator.hasNext();) {
|
||||
@@ -130,90 +141,112 @@ class Saaj12Implementation extends SaajImplementation {
|
||||
return results.iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(SOAPElement element) {
|
||||
return element.getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setText(SOAPElement element, String content) {
|
||||
element.setValue(content);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPEnvelope getEnvelope(SOAPMessage message) throws SOAPException {
|
||||
return message.getSOAPPart().getEnvelope();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPHeader getHeader(SOAPEnvelope envelope) throws SOAPException {
|
||||
return envelope.getHeader();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPBody getBody(SOAPEnvelope envelope) throws SOAPException {
|
||||
return envelope.getBody();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator examineAllHeaderElements(SOAPHeader header) {
|
||||
return header.examineAllHeaderElements();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator examineMustUnderstandHeaderElements(SOAPHeader header, String actorOrRole) {
|
||||
return header.examineMustUnderstandHeaderElements(actorOrRole);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getActorOrRole(SOAPHeaderElement headerElement) {
|
||||
return headerElement.getActor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActorOrRole(SOAPHeaderElement headerElement, String actorOrRole) {
|
||||
headerElement.setActor(actorOrRole);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getMustUnderstand(SOAPHeaderElement headerElement) {
|
||||
return headerElement.getMustUnderstand();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMustUnderstand(SOAPHeaderElement headerElement, boolean mustUnderstand) {
|
||||
headerElement.setMustUnderstand(mustUnderstand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasFault(SOAPBody body) {
|
||||
return body.hasFault();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPFault getFault(SOAPBody body) {
|
||||
return body.getFault();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFaultActor(SOAPFault fault) {
|
||||
return fault.getFaultActor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFaultActor(SOAPFault fault, String actorOrRole) throws SOAPException {
|
||||
fault.setFaultActor(actorOrRole);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFaultString(SOAPFault fault) {
|
||||
return fault.getFaultString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Locale getFaultStringLocale(SOAPFault fault) {
|
||||
return fault.getFaultStringLocale();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Detail getFaultDetail(SOAPFault fault) {
|
||||
return fault.getDetail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Detail addFaultDetail(SOAPFault fault) throws SOAPException {
|
||||
return fault.addDetail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTextNode(DetailEntry detailEntry, String text) throws SOAPException {
|
||||
detailEntry.addTextNode(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getDetailEntries(Detail detail) {
|
||||
return detail.getDetailEntries();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPElement getFirstBodyElement(SOAPBody body) {
|
||||
for (Iterator iterator = body.getChildElements(); iterator.hasNext();) {
|
||||
Object child = iterator.next();
|
||||
@@ -224,19 +257,23 @@ class Saaj12Implementation extends SaajImplementation {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeContents(SOAPElement element) {
|
||||
element.removeContents();
|
||||
}
|
||||
|
||||
@Override
|
||||
Iterator getChildElements(SOAPElement element, QName name) throws SOAPException {
|
||||
Name elementName = SaajUtils.toName(name, element);
|
||||
return element.getChildElements(elementName);
|
||||
}
|
||||
|
||||
@Override
|
||||
void addNamespaceDeclaration(SOAPElement element, String prefix, String namespaceUri) throws SOAPException {
|
||||
element.addNamespaceDeclaration(prefix, namespaceUri);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(SOAPMessage message, OutputStream outputStream) throws SOAPException, IOException {
|
||||
if (message.saveRequired()) {
|
||||
message.saveChanges();
|
||||
@@ -260,18 +297,22 @@ class Saaj12Implementation extends SaajImplementation {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public MimeHeaders getMimeHeaders(SOAPMessage message) {
|
||||
return message.getMimeHeaders();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getAttachments(SOAPMessage message) {
|
||||
return message.getAttachments();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getAttachment(SOAPMessage message, MimeHeaders mimeHeaders) {
|
||||
return message.getAttachments(mimeHeaders);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttachmentPart addAttachmentPart(SOAPMessage message, DataHandler dataHandler) {
|
||||
AttachmentPart attachmentPart = message.createAttachmentPart(dataHandler);
|
||||
message.addAttachmentPart(attachmentPart);
|
||||
@@ -282,42 +323,52 @@ class Saaj12Implementation extends SaajImplementation {
|
||||
// Unsupported
|
||||
//
|
||||
|
||||
@Override
|
||||
public String getFaultRole(SOAPFault fault) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.2 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFaultRole(SOAPFault fault, String role) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.2 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPHeaderElement addNotUnderstoodHeaderElement(SOAPHeader header, QName name) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.2 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPHeaderElement addUpgradeHeaderElement(SOAPHeader header, String[] supportedSoapUris) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.2 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getFaultSubcodes(SOAPFault fault) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.2 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendFaultSubcode(SOAPFault fault, QName subcode) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.2 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFaultNode(SOAPFault fault) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.2 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFaultNode(SOAPFault fault, String uri) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.2 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFaultReasonText(SOAPFault fault, Locale locale) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.2 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFaultReasonText(SOAPFault fault, Locale locale, String text) {
|
||||
throw new UnsupportedOperationException("SAAJ 1.2 does not support SOAP 1.2");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -63,10 +63,12 @@ class Saaj13Implementation extends SaajImplementation {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public QName getName(SOAPElement element) {
|
||||
return element.getElementQName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public QName getFaultCode(SOAPFault fault) {
|
||||
return fault.getFaultCodeAsQName();
|
||||
}
|
||||
@@ -75,55 +77,68 @@ class Saaj13Implementation extends SaajImplementation {
|
||||
return SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE.equals(element.getNamespaceURI());
|
||||
}
|
||||
|
||||
@Override
|
||||
public DetailEntry addDetailEntry(Detail detail, QName name) throws SOAPException {
|
||||
return detail.addDetailEntry(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPHeaderElement addHeaderElement(SOAPHeader header, QName name) throws SOAPException {
|
||||
return header.addHeaderElement(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFaultRole(SOAPFault fault) {
|
||||
return fault.getFaultRole();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFaultRole(SOAPFault fault, String role) throws SOAPException {
|
||||
fault.setFaultRole(role);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPHeaderElement addNotUnderstoodHeaderElement(SOAPHeader header, QName name) throws SOAPException {
|
||||
return header.addNotUnderstoodHeaderElement(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPHeaderElement addUpgradeHeaderElement(SOAPHeader header, String[] supportedSoapUris)
|
||||
throws SOAPException {
|
||||
return header.addUpgradeHeaderElement(supportedSoapUris);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getFaultSubcodes(SOAPFault fault) {
|
||||
return fault.getFaultSubcodes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendFaultSubcode(SOAPFault fault, QName subcode) throws SOAPException {
|
||||
fault.appendFaultSubcode(subcode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFaultNode(SOAPFault fault) {
|
||||
return fault.getFaultNode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFaultNode(SOAPFault fault, String uri) throws SOAPException {
|
||||
fault.setFaultNode(uri);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFaultReasonText(SOAPFault fault, Locale locale) throws SOAPException {
|
||||
return fault.getFaultReasonText(locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFaultReasonText(SOAPFault fault, Locale locale, String text) throws SOAPException {
|
||||
fault.addFaultReasonText(text, locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPFault addFault(SOAPBody body, QName faultCode, String faultString, Locale locale) throws SOAPException {
|
||||
if (locale == null) {
|
||||
return body.addFault(faultCode, faultString);
|
||||
@@ -133,114 +148,142 @@ class Saaj13Implementation extends SaajImplementation {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Source getSource(SOAPElement element) {
|
||||
return new DOMSource(element);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getResult(SOAPElement element) {
|
||||
return new DOMResult(element);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(SOAPElement element) {
|
||||
return element.getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setText(SOAPElement element, String content) {
|
||||
element.setValue(content);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addAttribute(SOAPElement element, QName name, String value) throws SOAPException {
|
||||
element.addAttribute(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAttribute(SOAPElement element, QName name) throws SOAPException {
|
||||
element.removeAttribute(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttributeValue(SOAPElement element, QName name) throws SOAPException {
|
||||
return element.getAttributeValue(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getAllAttibutes(SOAPElement element) {
|
||||
return element.getAllAttributesAsQNames();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPEnvelope getEnvelope(SOAPMessage message) throws SOAPException {
|
||||
return message.getSOAPPart().getEnvelope();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPHeader getHeader(SOAPEnvelope envelope) throws SOAPException {
|
||||
return envelope.getHeader();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPBody getBody(SOAPEnvelope envelope) throws SOAPException {
|
||||
return envelope.getBody();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator examineAllHeaderElements(SOAPHeader header) {
|
||||
return header.examineAllHeaderElements();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator examineMustUnderstandHeaderElements(SOAPHeader header, String actorOrRole) {
|
||||
return header.examineMustUnderstandHeaderElements(actorOrRole);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getActorOrRole(SOAPHeaderElement headerElement) {
|
||||
return headerElement.getActor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActorOrRole(SOAPHeaderElement headerElement, String actorOrRole) {
|
||||
headerElement.setActor(actorOrRole);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getMustUnderstand(SOAPHeaderElement headerElement) {
|
||||
return headerElement.getMustUnderstand();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMustUnderstand(SOAPHeaderElement headerElement, boolean mustUnderstand) {
|
||||
headerElement.setMustUnderstand(mustUnderstand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasFault(SOAPBody body) {
|
||||
return body.hasFault();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPFault getFault(SOAPBody body) {
|
||||
return body.getFault();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFaultActor(SOAPFault fault) {
|
||||
return fault.getFaultActor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFaultActor(SOAPFault fault, String actorOrRole) throws SOAPException {
|
||||
fault.setFaultActor(actorOrRole);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFaultString(SOAPFault fault) {
|
||||
return fault.getFaultString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Locale getFaultStringLocale(SOAPFault fault) {
|
||||
return fault.getFaultStringLocale();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Detail getFaultDetail(SOAPFault fault) {
|
||||
return fault.getDetail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Detail addFaultDetail(SOAPFault fault) throws SOAPException {
|
||||
return fault.addDetail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTextNode(DetailEntry detailEntry, String text) throws SOAPException {
|
||||
detailEntry.addTextNode(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getDetailEntries(Detail detail) {
|
||||
return detail.getDetailEntries();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SOAPElement getFirstBodyElement(SOAPBody body) {
|
||||
for (Iterator iterator = body.getChildElements(); iterator.hasNext();) {
|
||||
Object child = iterator.next();
|
||||
@@ -251,18 +294,22 @@ class Saaj13Implementation extends SaajImplementation {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeContents(SOAPElement element) {
|
||||
element.removeContents();
|
||||
}
|
||||
|
||||
@Override
|
||||
Iterator getChildElements(SOAPElement element, QName name) throws SOAPException {
|
||||
return element.getChildElements(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
void addNamespaceDeclaration(SOAPElement element, String prefix, String namespaceUri) throws SOAPException {
|
||||
element.addNamespaceDeclaration(prefix, namespaceUri);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(SOAPMessage message, OutputStream outputStream) throws SOAPException, IOException {
|
||||
if (message.saveRequired()) {
|
||||
message.saveChanges();
|
||||
@@ -293,18 +340,22 @@ class Saaj13Implementation extends SaajImplementation {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public MimeHeaders getMimeHeaders(SOAPMessage message) {
|
||||
return message.getMimeHeaders();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getAttachments(SOAPMessage message) {
|
||||
return message.getAttachments();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getAttachment(SOAPMessage message, MimeHeaders mimeHeaders) {
|
||||
return message.getAttachments(mimeHeaders);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttachmentPart addAttachmentPart(SOAPMessage message, DataHandler dataHandler) {
|
||||
AttachmentPart attachmentPart = message.createAttachmentPart(dataHandler);
|
||||
message.addAttachmentPart(attachmentPart);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -62,6 +62,7 @@ public class SaajXmlReader extends AbstractXmlReader {
|
||||
this.startNode = startNode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
|
||||
if (NAMESPACES_FEATURE_NAME.equals(name)) {
|
||||
return namespacesFeature;
|
||||
@@ -74,6 +75,7 @@ public class SaajXmlReader extends AbstractXmlReader {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
|
||||
if (NAMESPACES_FEATURE_NAME.equals(name)) {
|
||||
this.namespacesFeature = value;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -80,6 +80,7 @@ public class SoapMessageDispatcher extends MessageDispatcher {
|
||||
* @see SoapEndpointInvocationChain#getActorsOrRoles()
|
||||
* @see org.springframework.ws.soap.SoapHeader#examineMustUnderstandHeaderElements(String)
|
||||
*/
|
||||
@Override
|
||||
protected boolean handleRequest(EndpointInvocationChain mappedEndpoint, MessageContext messageContext) {
|
||||
if (messageContext.getRequest() instanceof SoapMessage) {
|
||||
String[] actorsOrRoles = null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -156,6 +156,7 @@ public abstract class AbstractFaultCreatingValidatingMarshallingPayloadEndpoint
|
||||
* @return <code>true</code> to continue processing the request, <code>false</code> (the default) otherwise
|
||||
* @see Errors#getAllErrors()
|
||||
*/
|
||||
@Override
|
||||
protected final boolean onValidationErrors(MessageContext messageContext, Object requestObject, Errors errors) {
|
||||
for (Iterator iterator = errors.getAllErrors().iterator(); iterator.hasNext();) {
|
||||
ObjectError objectError = (ObjectError) iterator.next();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -56,6 +56,7 @@ public abstract class AbstractSoapFaultDefinitionExceptionResolver extends Abstr
|
||||
*/
|
||||
protected abstract SoapFaultDefinition getFaultDefinition(Object endpoint, Exception ex);
|
||||
|
||||
@Override
|
||||
protected final boolean resolveExceptionInternal(MessageContext messageContext, Object endpoint, Exception ex) {
|
||||
Assert.isInstanceOf(SoapMessage.class, messageContext.getResponse(),
|
||||
"AbstractSoapFaultDefinitionExceptionResolver requires a SoapMessage");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.soap.server.endpoint;
|
||||
|
||||
import java.util.Locale;
|
||||
@@ -57,6 +58,7 @@ public class SimpleSoapExceptionResolver extends AbstractEndpointExceptionResolv
|
||||
this.locale = locale;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final boolean resolveExceptionInternal(MessageContext messageContext, Object endpoint, Exception ex) {
|
||||
Assert.isInstanceOf(SoapMessage.class, messageContext.getResponse(),
|
||||
"SimpleSoapExceptionResolver requires a SoapMessage");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,6 +31,7 @@ import org.springframework.ws.soap.server.endpoint.annotation.SoapFault;
|
||||
*/
|
||||
public class SoapFaultAnnotationExceptionResolver extends AbstractSoapFaultDefinitionExceptionResolver {
|
||||
|
||||
@Override
|
||||
protected final SoapFaultDefinition getFaultDefinition(Object endpoint, Exception ex) {
|
||||
SoapFault faultAnnotation = ex.getClass().getAnnotation(SoapFault.class);
|
||||
if (faultAnnotation != null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -69,6 +69,7 @@ public class SoapFaultDefinitionEditor extends PropertyEditorSupport {
|
||||
|
||||
private static final int FAULT_STRING_LOCALE_INDEX = 2;
|
||||
|
||||
@Override
|
||||
public void setAsText(String text) throws IllegalArgumentException {
|
||||
if (!StringUtils.hasLength(text)) {
|
||||
setValue(null);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,6 +49,7 @@ public class SoapFaultMappingExceptionResolver extends AbstractSoapFaultDefiniti
|
||||
exceptionMappings = mappings;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoapFaultDefinition getFaultDefinition(Object endpoint, Exception ex) {
|
||||
if (!CollectionUtils.isEmpty(exceptionMappings)) {
|
||||
String definitionText = null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -148,6 +148,7 @@ public abstract class AbstractFaultCreatingValidatingInterceptor extends Abstrac
|
||||
* @param errors the validation errors
|
||||
* @return <code>true</code> to continue processing the request, <code>false</code> (the default) otherwise
|
||||
*/
|
||||
@Override
|
||||
protected boolean handleRequestValidationErrors(MessageContext messageContext, SAXParseException[] errors)
|
||||
throws TransformerException {
|
||||
for (int i = 0; i < errors.length; i++) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,11 +42,13 @@ import org.springframework.ws.WebServiceMessage;
|
||||
public class PayloadValidatingInterceptor extends AbstractFaultCreatingValidatingInterceptor {
|
||||
|
||||
/** Returns the payload source of the given message. */
|
||||
@Override
|
||||
protected Source getValidationRequestSource(WebServiceMessage request) {
|
||||
return request.getPayloadSource();
|
||||
}
|
||||
|
||||
/** Returns the payload source of the given message. */
|
||||
@Override
|
||||
protected Source getValidationResponseSource(WebServiceMessage response) {
|
||||
return response.getPayloadSource();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -45,6 +45,7 @@ public class SoapEnvelopeLoggingInterceptor extends AbstractLoggingInterceptor i
|
||||
this.logFault = logFault;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception {
|
||||
if (logFault && logger.isDebugEnabled()) {
|
||||
logMessageSource("Fault: ", getSource(messageContext.getResponse()));
|
||||
@@ -56,6 +57,7 @@ public class SoapEnvelopeLoggingInterceptor extends AbstractLoggingInterceptor i
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Source getSource(WebServiceMessage message) {
|
||||
if (message instanceof SoapMessage) {
|
||||
SoapMessage soapMessage = (SoapMessage) message;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -78,12 +78,14 @@ public class SoapActionAnnotationMethodEndpointMapping extends AbstractAnnotatio
|
||||
* @see #setInterceptors(org.springframework.ws.server.EndpointInterceptor[])
|
||||
* @see #setActorsOrRoles(String[])
|
||||
*/
|
||||
@Override
|
||||
protected final EndpointInvocationChain createEndpointInvocationChain(MessageContext messageContext,
|
||||
Object endpoint,
|
||||
EndpointInterceptor[] interceptors) {
|
||||
return new SoapEndpointInvocationChain(endpoint, interceptors, actorsOrRoles, isUltimateReceiver);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLookupKeyForMessage(MessageContext messageContext) throws Exception {
|
||||
if (messageContext.getRequest() instanceof SoapMessage) {
|
||||
SoapMessage request = (SoapMessage) messageContext.getRequest();
|
||||
@@ -101,6 +103,7 @@ public class SoapActionAnnotationMethodEndpointMapping extends AbstractAnnotatio
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLookupKeyForMethod(Method method) {
|
||||
SoapAction soapAction = method.getAnnotation(SoapAction.class);
|
||||
return soapAction != null ? soapAction.value() : null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -80,12 +80,14 @@ public class SoapActionEndpointMapping extends AbstractMapBasedEndpointMapping i
|
||||
* @see #setInterceptors(org.springframework.ws.server.EndpointInterceptor[])
|
||||
* @see #setActorsOrRoles(String[])
|
||||
*/
|
||||
@Override
|
||||
protected final EndpointInvocationChain createEndpointInvocationChain(MessageContext messageContext,
|
||||
Object endpoint,
|
||||
EndpointInterceptor[] interceptors) {
|
||||
return new SoapEndpointInvocationChain(endpoint, interceptors, actorsOrRoles, isUltimateReceiver);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLookupKeyForMessage(MessageContext messageContext) throws Exception {
|
||||
if (messageContext.getRequest() instanceof SoapMessage) {
|
||||
SoapMessage request = (SoapMessage) messageContext.getRequest();
|
||||
@@ -103,6 +105,7 @@ public class SoapActionEndpointMapping extends AbstractMapBasedEndpointMapping i
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean validateLookupKey(String key) {
|
||||
return StringUtils.hasLength(key);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,6 +33,7 @@ public abstract class AbstractReceiverConnection extends AbstractWebServiceConne
|
||||
|
||||
private TransportOutputStream responseOutputStream;
|
||||
|
||||
@Override
|
||||
protected final TransportInputStream createTransportInputStream() throws IOException {
|
||||
if (requestInputStream == null) {
|
||||
requestInputStream = new RequestTransportInputStream();
|
||||
@@ -40,6 +41,7 @@ public abstract class AbstractReceiverConnection extends AbstractWebServiceConne
|
||||
return requestInputStream;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final TransportOutputStream createTransportOutputStream() throws IOException {
|
||||
if (responseOutputStream == null) {
|
||||
responseOutputStream = new ResponseTransportOutputStream();
|
||||
@@ -52,6 +54,7 @@ public abstract class AbstractReceiverConnection extends AbstractWebServiceConne
|
||||
*
|
||||
* @throws IOException if an I/O error occurs when closing this connection
|
||||
*/
|
||||
@Override
|
||||
protected void onClose() throws IOException {
|
||||
}
|
||||
|
||||
@@ -85,14 +88,17 @@ public abstract class AbstractReceiverConnection extends AbstractWebServiceConne
|
||||
/** Implementation of <code>TransportInputStream</code> for receiving-side connections. */
|
||||
private class RequestTransportInputStream extends TransportInputStream {
|
||||
|
||||
@Override
|
||||
protected InputStream createInputStream() throws IOException {
|
||||
return getRequestInputStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getHeaderNames() throws IOException {
|
||||
return getRequestHeaderNames();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getHeaders(String name) throws IOException {
|
||||
return getRequestHeaders(name);
|
||||
}
|
||||
@@ -102,10 +108,12 @@ public abstract class AbstractReceiverConnection extends AbstractWebServiceConne
|
||||
/** Implementation of <code>TransportOutputStream</code> for sending-side connections. */
|
||||
private class ResponseTransportOutputStream extends TransportOutputStream {
|
||||
|
||||
@Override
|
||||
public void addHeader(String name, String value) throws IOException {
|
||||
addResponseHeader(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected OutputStream createOutputStream() throws IOException {
|
||||
return getResponseOutputStream();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,6 +33,7 @@ public abstract class AbstractSenderConnection extends AbstractWebServiceConnect
|
||||
|
||||
private TransportInputStream responseInputStream;
|
||||
|
||||
@Override
|
||||
protected final TransportOutputStream createTransportOutputStream() throws IOException {
|
||||
if (requestOutputStream == null) {
|
||||
requestOutputStream = new RequestTransportOutputStream();
|
||||
@@ -40,6 +41,7 @@ public abstract class AbstractSenderConnection extends AbstractWebServiceConnect
|
||||
return requestOutputStream;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final TransportInputStream createTransportInputStream() throws IOException {
|
||||
if (hasResponse()) {
|
||||
if (responseInputStream == null) {
|
||||
@@ -57,6 +59,7 @@ public abstract class AbstractSenderConnection extends AbstractWebServiceConnect
|
||||
*
|
||||
* @throws IOException if an I/O error occurs when closing this connection
|
||||
*/
|
||||
@Override
|
||||
protected void onClose() throws IOException {
|
||||
}
|
||||
|
||||
@@ -93,10 +96,12 @@ public abstract class AbstractSenderConnection extends AbstractWebServiceConnect
|
||||
/** Implementation of <code>TransportInputStream</code> for receiving-side connections. */
|
||||
class RequestTransportOutputStream extends TransportOutputStream {
|
||||
|
||||
@Override
|
||||
public void addHeader(String name, String value) throws IOException {
|
||||
addRequestHeader(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected OutputStream createOutputStream() throws IOException {
|
||||
return getRequestOutputStream();
|
||||
}
|
||||
@@ -105,14 +110,17 @@ public abstract class AbstractSenderConnection extends AbstractWebServiceConnect
|
||||
/** Implementation of {@link TransportInputStream} for client-side HTTP. */
|
||||
class ResponseTransportInputStream extends TransportInputStream {
|
||||
|
||||
@Override
|
||||
protected InputStream createInputStream() throws IOException {
|
||||
return getResponseInputStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getHeaderNames() throws IOException {
|
||||
return getResponseHeaderNames();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator getHeaders(String name) throws IOException {
|
||||
return getResponseHeaders(name);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,14 +46,17 @@ public abstract class TransportInputStream extends InputStream {
|
||||
return inputStream;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
getInputStream().close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
return getInputStream().available();
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void mark(int readlimit) {
|
||||
try {
|
||||
getInputStream().mark(readlimit);
|
||||
@@ -63,6 +66,7 @@ public abstract class TransportInputStream extends InputStream {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean markSupported() {
|
||||
try {
|
||||
return getInputStream().markSupported();
|
||||
@@ -72,22 +76,27 @@ public abstract class TransportInputStream extends InputStream {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte b[]) throws IOException {
|
||||
return getInputStream().read(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte b[], int off, int len) throws IOException {
|
||||
return getInputStream().read(b, off, len);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void reset() throws IOException {
|
||||
getInputStream().reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long skip(long n) throws IOException {
|
||||
return getInputStream().skip(n);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
return getInputStream().read();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,22 +44,27 @@ public abstract class TransportOutputStream extends OutputStream {
|
||||
return outputStream;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
getOutputStream().close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush() throws IOException {
|
||||
getOutputStream().flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(byte b[]) throws IOException {
|
||||
getOutputStream().write(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(byte b[], int off, int len) throws IOException {
|
||||
getOutputStream().write(b, off, len);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(int b) throws IOException {
|
||||
getOutputStream().write(b);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -59,6 +59,7 @@ public abstract class AbstractHttpSenderConnection extends AbstractSenderConnect
|
||||
/*
|
||||
* Receiving response
|
||||
*/
|
||||
@Override
|
||||
protected final boolean hasResponse() throws IOException {
|
||||
int responseCode = getResponseCode();
|
||||
if (HttpTransportConstants.STATUS_ACCEPTED == responseCode ||
|
||||
@@ -75,6 +76,7 @@ public abstract class AbstractHttpSenderConnection extends AbstractSenderConnect
|
||||
return contentLength > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final InputStream getResponseInputStream() throws IOException {
|
||||
InputStream inputStream;
|
||||
if (responseBuffer != null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -64,6 +64,7 @@ public class CommonsHttpConnection extends AbstractHttpSenderConnection {
|
||||
return postMethod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose() throws IOException {
|
||||
postMethod.releaseConnection();
|
||||
if (connectionManager != null) {
|
||||
@@ -88,18 +89,22 @@ public class CommonsHttpConnection extends AbstractHttpSenderConnection {
|
||||
* Sending request
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected void onSendBeforeWrite(WebServiceMessage message) throws IOException {
|
||||
requestBuffer = new ByteArrayOutputStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addRequestHeader(String name, String value) throws IOException {
|
||||
postMethod.addRequestHeader(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected OutputStream getRequestOutputStream() throws IOException {
|
||||
return requestBuffer;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSendAfterWrite(WebServiceMessage message) throws IOException {
|
||||
postMethod.setRequestEntity(new ByteArrayRequestEntity(requestBuffer.toByteArray()));
|
||||
requestBuffer = null;
|
||||
@@ -122,22 +127,27 @@ public class CommonsHttpConnection extends AbstractHttpSenderConnection {
|
||||
* Receiving response
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected int getResponseCode() throws IOException {
|
||||
return postMethod.getStatusCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getResponseMessage() throws IOException {
|
||||
return postMethod.getStatusText();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected long getResponseContentLength() throws IOException {
|
||||
return postMethod.getResponseContentLength();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getRawResponseInputStream() throws IOException {
|
||||
return postMethod.getResponseBodyAsStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Iterator getResponseHeaderNames() throws IOException {
|
||||
Header[] headers = postMethod.getResponseHeaders();
|
||||
String[] names = new String[headers.length];
|
||||
@@ -147,6 +157,7 @@ public class CommonsHttpConnection extends AbstractHttpSenderConnection {
|
||||
return Arrays.asList(names).iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Iterator getResponseHeaders(String name) throws IOException {
|
||||
Header[] headers = postMethod.getResponseHeaders(name);
|
||||
String[] values = new String[headers.length];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -97,14 +97,17 @@ public class HttpServletConnection extends AbstractReceiverConnection
|
||||
* Receiving request
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected Iterator getRequestHeaderNames() throws IOException {
|
||||
return new EnumerationIterator(getHttpServletRequest().getHeaderNames());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Iterator getRequestHeaders(String name) throws IOException {
|
||||
return new EnumerationIterator(getHttpServletRequest().getHeaders(name));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getRequestInputStream() throws IOException {
|
||||
return getHttpServletRequest().getInputStream();
|
||||
}
|
||||
@@ -113,18 +116,22 @@ public class HttpServletConnection extends AbstractReceiverConnection
|
||||
* Sending response
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected void addResponseHeader(String name, String value) throws IOException {
|
||||
getHttpServletResponse().addHeader(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected OutputStream getResponseOutputStream() throws IOException {
|
||||
return getHttpServletResponse().getOutputStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSendAfterWrite(WebServiceMessage message) throws IOException {
|
||||
statusCodeSet = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose() throws IOException {
|
||||
if (!statusCodeSet) {
|
||||
getHttpServletResponse().setStatus(HttpTransportConstants.STATUS_ACCEPTED);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -57,6 +57,7 @@ public class HttpUrlConnection extends AbstractHttpSenderConnection {
|
||||
return connection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose() {
|
||||
connection.disconnect();
|
||||
}
|
||||
@@ -73,14 +74,17 @@ public class HttpUrlConnection extends AbstractHttpSenderConnection {
|
||||
* Sending request
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected void addRequestHeader(String name, String value) throws IOException {
|
||||
connection.addRequestProperty(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected OutputStream getRequestOutputStream() throws IOException {
|
||||
return connection.getOutputStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSendAfterWrite(WebServiceMessage message) throws IOException {
|
||||
connection.connect();
|
||||
}
|
||||
@@ -89,10 +93,12 @@ public class HttpUrlConnection extends AbstractHttpSenderConnection {
|
||||
* Receiving response
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected long getResponseContentLength() throws IOException {
|
||||
return connection.getContentLength();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Iterator getResponseHeaderNames() throws IOException {
|
||||
List headerNames = new ArrayList();
|
||||
// Header field 0 is the status line, so we start at 1
|
||||
@@ -108,6 +114,7 @@ public class HttpUrlConnection extends AbstractHttpSenderConnection {
|
||||
return headerNames.iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Iterator getResponseHeaders(String name) throws IOException {
|
||||
String headerField = connection.getHeaderField(name);
|
||||
if (headerField == null) {
|
||||
@@ -119,14 +126,17 @@ public class HttpUrlConnection extends AbstractHttpSenderConnection {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getResponseCode() throws IOException {
|
||||
return connection.getResponseCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getResponseMessage() throws IOException {
|
||||
return connection.getResponseMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getRawResponseInputStream() throws IOException {
|
||||
if (connection.getResponseCode() / 100 != 2) {
|
||||
return connection.getErrorStream();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -215,6 +215,7 @@ public class MessageDispatcherServlet extends FrameworkServlet {
|
||||
this.transformWsdlLocations = transformWsdlLocations;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doService(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
|
||||
throws Exception {
|
||||
WsdlDefinition definition = getWsdlDefinition(httpServletRequest);
|
||||
@@ -230,6 +231,7 @@ public class MessageDispatcherServlet extends FrameworkServlet {
|
||||
messageReceiverHandlerAdapter.handle(httpServletRequest, httpServletResponse, messageReceiver);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initFrameworkServlet() throws ServletException, BeansException {
|
||||
initMessageReceiverHandlerAdapter();
|
||||
initWsdlDefinitionHandlerAdapter();
|
||||
@@ -239,6 +241,7 @@ public class MessageDispatcherServlet extends FrameworkServlet {
|
||||
initXsdSchemas();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected long getLastModified(HttpServletRequest httpServletRequest) {
|
||||
WsdlDefinition definition = getWsdlDefinition(httpServletRequest);
|
||||
if (definition != null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -67,6 +67,7 @@ public abstract class AbstractBindingWsdl4jDefinitionBuilder extends AbstractWsd
|
||||
* @see #populateBindingOutput(BindingOutput, Output)
|
||||
* @see #populateBindingFault(BindingFault, Fault)
|
||||
*/
|
||||
@Override
|
||||
public void buildBindings(Definition definition) throws WSDLException {
|
||||
for (Iterator iterator = definition.getPortTypes().values().iterator(); iterator.hasNext();) {
|
||||
PortType portType = (PortType) iterator.next();
|
||||
@@ -207,6 +208,7 @@ public abstract class AbstractBindingWsdl4jDefinitionBuilder extends AbstractWsd
|
||||
* @throws WSDLException in case of errors
|
||||
* @see #populatePort(Port, Binding)
|
||||
*/
|
||||
@Override
|
||||
public void buildServices(Definition definition) throws WSDLException {
|
||||
Service service = definition.createService();
|
||||
populateService(service);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -77,6 +77,7 @@ public abstract class AbstractSoap11Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
}
|
||||
|
||||
/** Adds the WSDL SOAP namespace to the definition. */
|
||||
@Override
|
||||
protected void populateDefinition(Definition definition) throws WSDLException {
|
||||
definition.addNamespace(WSDL_SOAP_PREFIX, WSDL_SOAP_NAMESPACE_URI);
|
||||
}
|
||||
@@ -89,6 +90,7 @@ public abstract class AbstractSoap11Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
* @param portType the corresponding <code>PortType</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBinding(Binding binding, PortType portType) throws WSDLException {
|
||||
super.populateBinding(binding, portType);
|
||||
SOAPBinding soapBinding = (SOAPBinding) createSoapExtension(Binding.class, "binding");
|
||||
@@ -120,6 +122,7 @@ public abstract class AbstractSoap11Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
* @param bindingOperation the WSDL4J <code>BindingOperation</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingOperation(BindingOperation bindingOperation, Operation operation)
|
||||
throws WSDLException {
|
||||
super.populateBindingOperation(bindingOperation, operation);
|
||||
@@ -147,6 +150,7 @@ public abstract class AbstractSoap11Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
* @param bindingInput the WSDL4J <code>BindingInput</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingInput(BindingInput bindingInput, Input input) throws WSDLException {
|
||||
super.populateBindingInput(bindingInput, input);
|
||||
SOAPBody soapBody = (SOAPBody) createSoapExtension(BindingInput.class, "body");
|
||||
@@ -160,6 +164,7 @@ public abstract class AbstractSoap11Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
* @param bindingOutput the WSDL4J <code>BindingOutput</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingOutput(BindingOutput bindingOutput, Output output) throws WSDLException {
|
||||
super.populateBindingOutput(bindingOutput, output);
|
||||
SOAPBody soapBody = (SOAPBody) createSoapExtension(BindingOutput.class, "body");
|
||||
@@ -173,6 +178,7 @@ public abstract class AbstractSoap11Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
* @param bindingFault the WSDL4J <code>BindingFault</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingFault(BindingFault bindingFault, Fault fault) throws WSDLException {
|
||||
super.populateBindingFault(bindingFault, fault);
|
||||
SOAPFault soapFault = (SOAPFault) createSoapExtension(BindingFault.class, "fault");
|
||||
@@ -212,6 +218,7 @@ public abstract class AbstractSoap11Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
* @param port the WSDL4J <code>Port</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populatePort(Port port, Binding binding) throws WSDLException {
|
||||
super.populatePort(port, binding);
|
||||
SOAPAddress soapAddress = (SOAPAddress) createSoapExtension(Port.class, "address");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -78,6 +78,7 @@ public abstract class AbstractSoap12Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
}
|
||||
|
||||
/** Adds the WSDL SOAP namespace to the definition. */
|
||||
@Override
|
||||
protected void populateDefinition(Definition definition) throws WSDLException {
|
||||
definition.addNamespace(WSDL_SOAP_PREFIX, WSDL_SOAP_NAMESPACE_URI);
|
||||
}
|
||||
@@ -90,6 +91,7 @@ public abstract class AbstractSoap12Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
* @param portType the corresponding <code>PortType</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBinding(Binding binding, PortType portType) throws WSDLException {
|
||||
super.populateBinding(binding, portType);
|
||||
SOAP12Binding soapBinding = (SOAP12Binding) createSoapExtension(Binding.class, "binding");
|
||||
@@ -121,6 +123,7 @@ public abstract class AbstractSoap12Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
* @param bindingOperation the WSDL4J <code>BindingOperation</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingOperation(BindingOperation bindingOperation, Operation operation)
|
||||
throws WSDLException {
|
||||
super.populateBindingOperation(bindingOperation, operation);
|
||||
@@ -148,6 +151,7 @@ public abstract class AbstractSoap12Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
* @param bindingInput the WSDL4J <code>BindingInput</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingInput(BindingInput bindingInput, Input input) throws WSDLException {
|
||||
super.populateBindingInput(bindingInput, input);
|
||||
SOAP12Body soapBody = (SOAP12Body) createSoapExtension(BindingInput.class, "body");
|
||||
@@ -161,6 +165,7 @@ public abstract class AbstractSoap12Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
* @param bindingOutput the WSDL4J <code>BindingOutput</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingOutput(BindingOutput bindingOutput, Output output) throws WSDLException {
|
||||
super.populateBindingOutput(bindingOutput, output);
|
||||
SOAP12Body soapBody = (SOAP12Body) createSoapExtension(BindingOutput.class, "body");
|
||||
@@ -174,6 +179,7 @@ public abstract class AbstractSoap12Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
* @param bindingFault the WSDL4J <code>BindingFault</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingFault(BindingFault bindingFault, Fault fault) throws WSDLException {
|
||||
super.populateBindingFault(bindingFault, fault);
|
||||
SOAP12Fault soapFault = (SOAP12Fault) createSoapExtension(BindingFault.class, "fault");
|
||||
@@ -213,6 +219,7 @@ public abstract class AbstractSoap12Wsdl4jDefinitionBuilder extends AbstractBind
|
||||
* @param port the WSDL4J <code>Port</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populatePort(Port port, Binding binding) throws WSDLException {
|
||||
super.populatePort(port, binding);
|
||||
SOAP12Address soapAddress = (SOAP12Address) createSoapExtension(Port.class, "address");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -217,6 +217,7 @@ public class XsdBasedSoap11Wsdl4jDefinitionBuilder extends AbstractSoap11Wsdl4jD
|
||||
}
|
||||
|
||||
/** Adds the target namespace and schema namespace to the definition. */
|
||||
@Override
|
||||
protected void populateDefinition(Definition definition) throws WSDLException {
|
||||
super.populateDefinition(definition);
|
||||
definition.setTargetNamespace(targetNamespace);
|
||||
@@ -227,6 +228,7 @@ public class XsdBasedSoap11Wsdl4jDefinitionBuilder extends AbstractSoap11Wsdl4jD
|
||||
}
|
||||
|
||||
/** Does nothing. */
|
||||
@Override
|
||||
protected void buildImports(Definition definition) throws WSDLException {
|
||||
}
|
||||
|
||||
@@ -238,6 +240,7 @@ public class XsdBasedSoap11Wsdl4jDefinitionBuilder extends AbstractSoap11Wsdl4jD
|
||||
* @param definition the WSDL4J <code>Definition</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void buildTypes(Definition definition) throws WSDLException {
|
||||
Types types = definition.createTypes();
|
||||
Schema schema = (Schema) createExtension(Types.class, XsdSchemaHelper.SCHEMA_NAME);
|
||||
@@ -275,6 +278,7 @@ public class XsdBasedSoap11Wsdl4jDefinitionBuilder extends AbstractSoap11Wsdl4jD
|
||||
* @param definition the WSDL4J <code>Definition</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void buildMessages(Definition definition) throws WSDLException {
|
||||
List elementDeclarations = schemaHelper.getElementDeclarations(followIncludeImport);
|
||||
for (Iterator iterator = elementDeclarations.iterator(); iterator.hasNext();) {
|
||||
@@ -367,6 +371,7 @@ public class XsdBasedSoap11Wsdl4jDefinitionBuilder extends AbstractSoap11Wsdl4jD
|
||||
part.setName(elementName.getLocalPart());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void buildPortTypes(Definition definition) throws WSDLException {
|
||||
PortType portType = definition.createPortType();
|
||||
populatePortType(portType);
|
||||
@@ -499,6 +504,7 @@ public class XsdBasedSoap11Wsdl4jDefinitionBuilder extends AbstractSoap11Wsdl4jD
|
||||
}
|
||||
|
||||
/** Sets the name of the service to the name of the port type, with "Service" appended to it. */
|
||||
@Override
|
||||
protected void populateService(Service service) throws WSDLException {
|
||||
service.setQName(new QName(targetNamespace, portTypeName + SERVICE_SUFFIX));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -218,6 +218,7 @@ public class XsdBasedSoap12Wsdl4jDefinitionBuilder extends AbstractSoap12Wsdl4jD
|
||||
}
|
||||
|
||||
/** Adds the target namespace and schema namespace to the definition. */
|
||||
@Override
|
||||
protected void populateDefinition(Definition definition) throws WSDLException {
|
||||
super.populateDefinition(definition);
|
||||
definition.setTargetNamespace(targetNamespace);
|
||||
@@ -228,6 +229,7 @@ public class XsdBasedSoap12Wsdl4jDefinitionBuilder extends AbstractSoap12Wsdl4jD
|
||||
}
|
||||
|
||||
/** Does nothing. */
|
||||
@Override
|
||||
protected void buildImports(Definition definition) throws WSDLException {
|
||||
}
|
||||
|
||||
@@ -239,6 +241,7 @@ public class XsdBasedSoap12Wsdl4jDefinitionBuilder extends AbstractSoap12Wsdl4jD
|
||||
* @param definition the WSDL4J <code>Definition</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void buildTypes(Definition definition) throws WSDLException {
|
||||
Types types = definition.createTypes();
|
||||
Schema schema = (Schema) createExtension(Types.class, XsdSchemaHelper.SCHEMA_NAME);
|
||||
@@ -276,6 +279,7 @@ public class XsdBasedSoap12Wsdl4jDefinitionBuilder extends AbstractSoap12Wsdl4jD
|
||||
* @param definition the WSDL4J <code>Definition</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void buildMessages(Definition definition) throws WSDLException {
|
||||
List elementDeclarations = schemaHelper.getElementDeclarations(followIncludeImport);
|
||||
for (Iterator iterator = elementDeclarations.iterator(); iterator.hasNext();) {
|
||||
@@ -368,6 +372,7 @@ public class XsdBasedSoap12Wsdl4jDefinitionBuilder extends AbstractSoap12Wsdl4jD
|
||||
part.setName(elementName.getLocalPart());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void buildPortTypes(Definition definition) throws WSDLException {
|
||||
PortType portType = definition.createPortType();
|
||||
populatePortType(portType);
|
||||
@@ -500,6 +505,7 @@ public class XsdBasedSoap12Wsdl4jDefinitionBuilder extends AbstractSoap12Wsdl4jD
|
||||
}
|
||||
|
||||
/** Sets the name of the service to the name of the port type, with "Service" appended to it. */
|
||||
@Override
|
||||
protected void populateService(Service service) throws WSDLException {
|
||||
service.setQName(new QName(targetNamespace, portTypeName + SERVICE_SUFFIX));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -137,6 +137,7 @@ public class Soap11Provider extends DefaultConcretePartProvider {
|
||||
* @param definition the WSDL4J <code>Definition</code>
|
||||
* @param binding the WSDL4J <code>Binding</code>
|
||||
*/
|
||||
@Override
|
||||
protected void populateBinding(Definition definition, Binding binding) throws WSDLException {
|
||||
definition.addNamespace(SOAP_11_NAMESPACE_PREFIX, SOAP_11_NAMESPACE_URI);
|
||||
super.populateBinding(definition, binding);
|
||||
@@ -174,6 +175,7 @@ public class Soap11Provider extends DefaultConcretePartProvider {
|
||||
* @param bindingFault the WSDL4J <code>BindingFault</code>
|
||||
* @param fault the corresponding WSDL4J <code>Fault</code> @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingFault(Definition definition, BindingFault bindingFault, Fault fault)
|
||||
throws WSDLException {
|
||||
super.populateBindingFault(definition, bindingFault, fault);
|
||||
@@ -210,6 +212,7 @@ public class Soap11Provider extends DefaultConcretePartProvider {
|
||||
* @param bindingInput the WSDL4J <code>BindingInput</code>
|
||||
* @param input the corresponding WSDL4J <code>Input</code> @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingInput(Definition definition, BindingInput bindingInput, Input input)
|
||||
throws WSDLException {
|
||||
super.populateBindingInput(definition, bindingInput, input);
|
||||
@@ -243,6 +246,7 @@ public class Soap11Provider extends DefaultConcretePartProvider {
|
||||
* @param bindingOperation the WSDL4J <code>BindingOperation</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingOperation(Definition definition, BindingOperation bindingOperation)
|
||||
throws WSDLException {
|
||||
super.populateBindingOperation(definition, bindingOperation);
|
||||
@@ -282,6 +286,7 @@ public class Soap11Provider extends DefaultConcretePartProvider {
|
||||
* @param bindingOutput the WSDL4J <code>BindingOutput</code>
|
||||
* @param output the corresponding WSDL4J <code>Output</code> @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingOutput(Definition definition, BindingOutput bindingOutput, Output output)
|
||||
throws WSDLException {
|
||||
super.populateBindingOutput(definition, bindingOutput, output);
|
||||
@@ -300,6 +305,7 @@ public class Soap11Provider extends DefaultConcretePartProvider {
|
||||
* @param port the WSDL4J <code>Port</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populatePort(Definition definition, Port port) throws WSDLException {
|
||||
for (Iterator iterator = port.getBinding().getExtensibilityElements().iterator(); iterator.hasNext();) {
|
||||
if (iterator.next() instanceof SOAPBinding) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -138,6 +138,7 @@ public class Soap12Provider extends DefaultConcretePartProvider {
|
||||
* @param definition the WSDL4J <code>Definition</code>
|
||||
* @param binding the WSDL4J <code>Binding</code>
|
||||
*/
|
||||
@Override
|
||||
protected void populateBinding(Definition definition, Binding binding) throws WSDLException {
|
||||
definition.addNamespace(SOAP_12_NAMESPACE_PREFIX, SOAP_12_NAMESPACE_URI);
|
||||
super.populateBinding(definition, binding);
|
||||
@@ -176,6 +177,7 @@ public class Soap12Provider extends DefaultConcretePartProvider {
|
||||
* @param bindingFault the WSDL4J <code>BindingFault</code>
|
||||
* @param fault the corresponding WSDL4J <code>Fault</code> @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingFault(Definition definition, BindingFault bindingFault, Fault fault)
|
||||
throws WSDLException {
|
||||
super.populateBindingFault(definition, bindingFault, fault);
|
||||
@@ -212,6 +214,7 @@ public class Soap12Provider extends DefaultConcretePartProvider {
|
||||
* @param bindingInput the WSDL4J <code>BindingInput</code>
|
||||
* @param input the corresponding WSDL4J <code>Input</code> @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingInput(Definition definition, BindingInput bindingInput, Input input)
|
||||
throws WSDLException {
|
||||
super.populateBindingInput(definition, bindingInput, input);
|
||||
@@ -245,6 +248,7 @@ public class Soap12Provider extends DefaultConcretePartProvider {
|
||||
* @param bindingOperation the WSDL4J <code>BindingOperation</code>
|
||||
* @throws javax.wsdl.WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingOperation(Definition definition, BindingOperation bindingOperation)
|
||||
throws WSDLException {
|
||||
super.populateBindingOperation(definition, bindingOperation);
|
||||
@@ -285,6 +289,7 @@ public class Soap12Provider extends DefaultConcretePartProvider {
|
||||
* @param bindingOutput the WSDL4J <code>BindingOutput</code>
|
||||
* @param output the corresponding WSDL4J <code>Output</code> @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populateBindingOutput(Definition definition, BindingOutput bindingOutput, Output output)
|
||||
throws WSDLException {
|
||||
super.populateBindingOutput(definition, bindingOutput, output);
|
||||
@@ -303,6 +308,7 @@ public class Soap12Provider extends DefaultConcretePartProvider {
|
||||
* @param port the WSDL4J <code>Port</code>
|
||||
* @throws WSDLException in case of errors
|
||||
*/
|
||||
@Override
|
||||
protected void populatePort(Definition definition, Port port) throws WSDLException {
|
||||
for (Iterator iterator = port.getBinding().getExtensibilityElements().iterator(); iterator.hasNext();) {
|
||||
if (iterator.next() instanceof SOAP12Binding) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -100,6 +100,7 @@ public class SuffixBasedMessagesProvider extends DefaultMessagesProvider {
|
||||
this.faultSuffix = faultSuffix;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isMessageElement(Element element) {
|
||||
if (super.isMessageElement(element)) {
|
||||
String elementName = getElementName(element);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -100,6 +100,7 @@ public class SuffixBasedPortTypesProvider extends AbstractPortTypesProvider {
|
||||
this.faultSuffix = faultSuffix;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getOperationName(Message message) {
|
||||
String messageName = getMessageName(message);
|
||||
if (messageName != null) {
|
||||
@@ -125,6 +126,7 @@ public class SuffixBasedPortTypesProvider extends AbstractPortTypesProvider {
|
||||
* @param message the message
|
||||
* @return <code>true</code> if to be included as input; <code>false</code> otherwise
|
||||
*/
|
||||
@Override
|
||||
protected boolean isInputMessage(Message message) {
|
||||
String messageName = getMessageName(message);
|
||||
return messageName != null && messageName.endsWith(getRequestSuffix());
|
||||
@@ -139,6 +141,7 @@ public class SuffixBasedPortTypesProvider extends AbstractPortTypesProvider {
|
||||
* @param message the message
|
||||
* @return <code>true</code> if to be included as output; <code>false</code> otherwise
|
||||
*/
|
||||
@Override
|
||||
protected boolean isOutputMessage(Message message) {
|
||||
String messageName = getMessageName(message);
|
||||
return messageName != null && messageName.endsWith(getResponseSuffix());
|
||||
@@ -152,6 +155,7 @@ public class SuffixBasedPortTypesProvider extends AbstractPortTypesProvider {
|
||||
* @param message the message
|
||||
* @return <code>true</code> if to be included as fault; <code>false</code> otherwise
|
||||
*/
|
||||
@Override
|
||||
protected boolean isFaultMessage(Message message) {
|
||||
String messageName = getMessageName(message);
|
||||
return messageName != null && messageName.endsWith(getFaultSuffix());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,6 +22,7 @@ public abstract class AbstractWebServiceMessageFactoryTestCase extends TestCase
|
||||
|
||||
protected WebServiceMessageFactory messageFactory;
|
||||
|
||||
@Override
|
||||
protected final void setUp() throws Exception {
|
||||
messageFactory = createMessageFactory();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -68,6 +68,7 @@ public abstract class AbstractWebServiceMessageTestCase extends XMLTestCase {
|
||||
return expectedWriter.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void setUp() throws Exception {
|
||||
TransformerFactory transformerFactory = TransformerFactory.newInstance();
|
||||
transformer = transformerFactory.newTransformer();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -153,24 +153,30 @@ public class MockWebServiceMessage implements FaultAwareWebServiceMessage {
|
||||
super(content);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(String str) {
|
||||
content.append(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(int c) {
|
||||
content.append((char) c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(String str, int off, int len) {
|
||||
content.append(str.substring(off, off + len));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(char cbuf[], int off, int len) {
|
||||
if (off < 0 || off > cbuf.length || len < 0 || off + len > cbuf.length || off + len < 0) {
|
||||
throw new IndexOutOfBoundsException();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,6 +25,7 @@ public class SimpleFaultMessageResolverTest extends TestCase {
|
||||
|
||||
private SimpleFaultMessageResolver resolver;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
resolver = new SimpleFaultMessageResolver();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -43,6 +43,7 @@ public class SimpleSaajServlet extends HttpServlet {
|
||||
|
||||
private MessageFactory msgFactory = null;
|
||||
|
||||
@Override
|
||||
public void init(ServletConfig servletConfig) throws ServletException {
|
||||
super.init(servletConfig);
|
||||
try {
|
||||
@@ -77,6 +78,7 @@ public class SimpleSaajServlet extends HttpServlet {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
try {
|
||||
MimeHeaders headers = getHeaders(req);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -273,6 +273,7 @@ public class WebServiceTemplateIntegrationTest extends XMLTestCase {
|
||||
this.sc = sc;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
resp.sendError(sc);
|
||||
}
|
||||
@@ -285,6 +286,7 @@ public class WebServiceTemplateIntegrationTest extends XMLTestCase {
|
||||
|
||||
private TransformerFactory transformerFactory;
|
||||
|
||||
@Override
|
||||
public void init(ServletConfig servletConfig) throws ServletException {
|
||||
super.init(servletConfig);
|
||||
documentBuilderFactory = DocumentBuilderFactory.newInstance();
|
||||
@@ -292,6 +294,7 @@ public class WebServiceTemplateIntegrationTest extends XMLTestCase {
|
||||
transformerFactory = TransformerFactory.newInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
try {
|
||||
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
|
||||
@@ -316,6 +319,7 @@ public class WebServiceTemplateIntegrationTest extends XMLTestCase {
|
||||
this.sc = sc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(ServletConfig servletConfig) throws ServletException {
|
||||
super.init(servletConfig);
|
||||
try {
|
||||
@@ -326,6 +330,7 @@ public class WebServiceTemplateIntegrationTest extends XMLTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
try {
|
||||
MimeHeaders headers = getHeaders(req);
|
||||
@@ -382,6 +387,7 @@ public class WebServiceTemplateIntegrationTest extends XMLTestCase {
|
||||
|
||||
private static class EchoSoapServlet extends AbstractSoapServlet {
|
||||
|
||||
@Override
|
||||
protected SOAPMessage onMessage(SOAPMessage message) throws SOAPException {
|
||||
return message;
|
||||
}
|
||||
@@ -389,6 +395,7 @@ public class WebServiceTemplateIntegrationTest extends XMLTestCase {
|
||||
|
||||
private static class NoResponseSoapServlet extends AbstractSoapServlet {
|
||||
|
||||
@Override
|
||||
protected SOAPMessage onMessage(SOAPMessage message) throws SOAPException {
|
||||
return null;
|
||||
}
|
||||
@@ -396,6 +403,7 @@ public class WebServiceTemplateIntegrationTest extends XMLTestCase {
|
||||
|
||||
private static class SoapFaultServlet extends AbstractSoapServlet {
|
||||
|
||||
@Override
|
||||
protected SOAPMessage onMessage(SOAPMessage message) throws SOAPException {
|
||||
SOAPMessage response = messageFactory.createMessage();
|
||||
SOAPBody body = response.getSOAPBody();
|
||||
@@ -406,6 +414,7 @@ public class WebServiceTemplateIntegrationTest extends XMLTestCase {
|
||||
|
||||
private static class AttachmentsServlet extends AbstractSoapServlet {
|
||||
|
||||
@Override
|
||||
protected SOAPMessage onMessage(SOAPMessage message) throws SOAPException {
|
||||
assertEquals("No attachments found", 1, message.countAttachments());
|
||||
return null;
|
||||
@@ -419,6 +428,7 @@ public class WebServiceTemplateIntegrationTest extends XMLTestCase {
|
||||
super(test);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
removeXmlDataContentHandler();
|
||||
|
||||
@@ -448,6 +458,7 @@ public class WebServiceTemplateIntegrationTest extends XMLTestCase {
|
||||
CommandMap.setDefaultCommandMap(new MailcapCommandMap());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
jettyServer.stop();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -47,6 +47,7 @@ public class WebServiceTemplateTest extends XMLTestCase {
|
||||
|
||||
private MockWebServiceMessageFactory messageFactory;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
template = new WebServiceTemplate();
|
||||
messageFactory = new MockWebServiceMessageFactory();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2008 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,6 +28,7 @@ public class Wsdl11DestinationProviderTest extends TestCase {
|
||||
|
||||
private Wsdl11DestinationProvider provider;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
provider = new Wsdl11DestinationProvider();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -64,6 +64,7 @@ public class PayloadValidatingInterceptorTest extends XMLTestCase {
|
||||
|
||||
private static final String SCHEMA2 = "schema2.xsd";
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
interceptor = new PayloadValidatingInterceptor();
|
||||
interceptor.setSchema(new ClassPathResource(SCHEMA, getClass()));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright ${YEAR} the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,6 +28,7 @@ public class WebServiceNamespaceHandlerTest extends TestCase {
|
||||
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
applicationContext = new ClassPathXmlApplicationContext("webServiceNamespaceHandlerTest.xml", getClass());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright ${YEAR} the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,6 +29,7 @@ public class WebServicesNamespaceHandlerTigerTest extends TestCase {
|
||||
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
applicationContext =
|
||||
new ClassPathXmlApplicationContext("webServicesNamespaceHandlerTest-tiger.xml", getClass());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,6 +34,7 @@ public class DefaultMessageContextTest extends TestCase {
|
||||
|
||||
private WebServiceMessage request;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
factoryControl = MockControl.createControl(WebServiceMessageFactory.class);
|
||||
factoryMock = (WebServiceMessageFactory) factoryControl.getMock();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,6 +35,7 @@ public abstract class AbstractMimeMessageTestCase extends AbstractWebServiceMess
|
||||
|
||||
private String contentType;
|
||||
|
||||
@Override
|
||||
protected final WebServiceMessage createWebServiceMessage() throws Exception {
|
||||
mimeMessage = createMimeMessage();
|
||||
picture = new ClassPathResource("spring-ws.png", AbstractMimeMessageTestCase.class);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,6 +21,7 @@ import org.springframework.ws.WebServiceMessageFactory;
|
||||
|
||||
public class DomPoxMessageFactoryTest extends AbstractWebServiceMessageFactoryTestCase {
|
||||
|
||||
@Override
|
||||
protected WebServiceMessageFactory createMessageFactory() throws Exception {
|
||||
return new DomPoxMessageFactory();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,6 +36,7 @@ public class DomPoxMessageTest extends XMLTestCase {
|
||||
|
||||
private Transformer transformer;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,6 +40,7 @@ public class MessageDispatcherTest extends TestCase {
|
||||
|
||||
private WebServiceMessageFactory factoryMock;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
dispatcher = new MessageDispatcher();
|
||||
factoryControl = MockControl.createControl(WebServiceMessageFactory.class);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,6 +28,7 @@ public abstract class AbstractMessageEndpointTestCase extends AbstractEndpointTe
|
||||
|
||||
private MessageEndpoint endpoint;
|
||||
|
||||
@Override
|
||||
protected final void setUp() throws Exception {
|
||||
endpoint = createResponseEndpoint();
|
||||
}
|
||||
@@ -51,6 +52,7 @@ public abstract class AbstractMessageEndpointTestCase extends AbstractEndpointTe
|
||||
assertFalse("Response message created", context.hasResponse());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void testSource(Source requestSource) throws Exception {
|
||||
MessageContext context =
|
||||
new DefaultMessageContext(new MockWebServiceMessage(requestSource), new MockWebServiceMessageFactory());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,6 +29,7 @@ public abstract class AbstractPayloadEndpointTestCase extends AbstractEndpointTe
|
||||
|
||||
private Transformer transformer;
|
||||
|
||||
@Override
|
||||
protected final void setUp() throws Exception {
|
||||
endpoint = createResponseEndpoint();
|
||||
transformer = TransformerFactory.newInstance().newTransformer();
|
||||
@@ -47,6 +48,7 @@ public abstract class AbstractPayloadEndpointTestCase extends AbstractEndpointTe
|
||||
assertNull("Response source returned", resultSource);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void testSource(Source requestSource) throws Exception {
|
||||
Source responseSource = endpoint.invoke(requestSource);
|
||||
assertNotNull("No response source returned", responseSource);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,9 +21,11 @@ import org.dom4j.Element;
|
||||
|
||||
public class Dom4jPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createResponseEndpoint() {
|
||||
return new AbstractDom4jPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Element invokeInternal(Element requestElement, Document responseDocument) throws Exception {
|
||||
assertNotNull("No requestElement passed", requestElement);
|
||||
assertNotNull("No responseDocument passed", responseDocument);
|
||||
@@ -34,18 +36,22 @@ public class Dom4jPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createNoResponseEndpoint() throws Exception {
|
||||
return new AbstractDom4jPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Element invokeInternal(Element requestElement, Document responseDocument) throws Exception {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createNoRequestEndpoint() throws Exception {
|
||||
return new AbstractDom4jPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Element invokeInternal(Element requestElement, Document responseDocument) throws Exception {
|
||||
assertNull("RequestElement passed", requestElement);
|
||||
return null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,18 +21,22 @@ import org.w3c.dom.Element;
|
||||
|
||||
public class DomPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createNoResponseEndpoint() throws Exception {
|
||||
return new AbstractDomPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Element invokeInternal(Element requestElement, Document document) throws Exception {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createResponseEndpoint() throws Exception {
|
||||
return new AbstractDomPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Element invokeInternal(Element requestElement, Document responseDocument) throws Exception {
|
||||
assertNotNull("No requestElement passed", requestElement);
|
||||
assertNotNull("No responseDocument passed", responseDocument);
|
||||
@@ -43,9 +47,11 @@ public class DomPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createNoRequestEndpoint() throws Exception {
|
||||
return new AbstractDomPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Element invokeInternal(Element requestElement, Document responseDocument) throws Exception {
|
||||
assertNull("RequestElement passed", requestElement);
|
||||
return null;
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.server.endpoint;
|
||||
|
||||
import java.util.HashSet;
|
||||
@@ -19,9 +35,11 @@ public class EndpointExceptionResolverTest extends TestCase {
|
||||
|
||||
private AbstractEndpointExceptionResolver exceptionResolver;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
exceptionResolver = new AbstractEndpointExceptionResolver() {
|
||||
|
||||
@Override
|
||||
protected boolean resolveExceptionInternal(MessageContext messageContext, Object endpoint, Exception ex) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,18 +21,22 @@ import org.jdom.Namespace;
|
||||
|
||||
public class JDomPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createNoResponseEndpoint() throws Exception {
|
||||
return new AbstractJDomPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Element invokeInternal(Element requestElement) throws Exception {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createResponseEndpoint() throws Exception {
|
||||
return new AbstractJDomPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Element invokeInternal(Element requestElement) throws Exception {
|
||||
assertNotNull("No requestElement passed", requestElement);
|
||||
assertEquals("Invalid request element", REQUEST_ELEMENT, requestElement.getName());
|
||||
@@ -42,9 +46,11 @@ public class JDomPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createNoRequestEndpoint() throws Exception {
|
||||
return new AbstractJDomPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Element invokeInternal(Element requestElement) throws Exception {
|
||||
assertNull("RequestElement passed", requestElement);
|
||||
return null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -52,6 +52,7 @@ public class MarshallingPayloadEndpointTest extends XMLTestCase {
|
||||
|
||||
private WebServiceMessageFactory factoryMock;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
MockWebServiceMessage request = new MockWebServiceMessage("<request/>");
|
||||
transformer = TransformerFactory.newInstance().newTransformer();
|
||||
@@ -63,6 +64,7 @@ public class MarshallingPayloadEndpointTest extends XMLTestCase {
|
||||
|
||||
public void testInvoke() throws Exception {
|
||||
Unmarshaller unmarshaller = new SimpleMarshaller() {
|
||||
@Override
|
||||
public Object unmarshal(Source source) throws XmlMappingException {
|
||||
try {
|
||||
StringWriter writer = new StringWriter();
|
||||
@@ -77,6 +79,7 @@ public class MarshallingPayloadEndpointTest extends XMLTestCase {
|
||||
}
|
||||
};
|
||||
Marshaller marshaller = new SimpleMarshaller() {
|
||||
@Override
|
||||
public void marshal(Object graph, Result result) throws XmlMappingException {
|
||||
assertEquals("Invalid graph", "result", graph);
|
||||
try {
|
||||
@@ -88,6 +91,7 @@ public class MarshallingPayloadEndpointTest extends XMLTestCase {
|
||||
}
|
||||
};
|
||||
AbstractMarshallingPayloadEndpoint endpoint = new AbstractMarshallingPayloadEndpoint() {
|
||||
@Override
|
||||
protected Object invokeInternal(Object requestObject) throws Exception {
|
||||
assertEquals("Invalid request object", new Long(42), requestObject);
|
||||
return "result";
|
||||
@@ -110,6 +114,7 @@ public class MarshallingPayloadEndpointTest extends XMLTestCase {
|
||||
|
||||
public void testInvokeNullResponse() throws Exception {
|
||||
Unmarshaller unmarshaller = new SimpleMarshaller() {
|
||||
@Override
|
||||
public Object unmarshal(Source source) throws XmlMappingException {
|
||||
try {
|
||||
StringWriter writer = new StringWriter();
|
||||
@@ -124,11 +129,13 @@ public class MarshallingPayloadEndpointTest extends XMLTestCase {
|
||||
}
|
||||
};
|
||||
Marshaller marshaller = new SimpleMarshaller() {
|
||||
@Override
|
||||
public void marshal(Object graph, Result result) throws XmlMappingException {
|
||||
fail("marshal not expected");
|
||||
}
|
||||
};
|
||||
AbstractMarshallingPayloadEndpoint endpoint = new AbstractMarshallingPayloadEndpoint() {
|
||||
@Override
|
||||
protected Object invokeInternal(Object requestObject) throws Exception {
|
||||
assertEquals("Invalid request object", new Long(42), requestObject);
|
||||
return null;
|
||||
@@ -148,6 +155,7 @@ public class MarshallingPayloadEndpointTest extends XMLTestCase {
|
||||
context = new DefaultMessageContext(request, factoryMock);
|
||||
AbstractMarshallingPayloadEndpoint endpoint = new AbstractMarshallingPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Object invokeInternal(Object requestObject) throws Exception {
|
||||
assertNull("No request expected", requestObject);
|
||||
return null;
|
||||
@@ -187,6 +195,7 @@ public class MarshallingPayloadEndpointTest extends XMLTestCase {
|
||||
messageControl.replay();
|
||||
|
||||
AbstractMarshallingPayloadEndpoint endpoint = new AbstractMarshallingPayloadEndpoint() {
|
||||
@Override
|
||||
protected Object invokeInternal(Object requestObject) throws Exception {
|
||||
assertEquals("Invalid request object", new Long(42), requestObject);
|
||||
return "result";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,6 +28,7 @@ public class MethodEndpointTest extends TestCase {
|
||||
|
||||
private Method method;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
myMethodInvoked = false;
|
||||
method = getClass().getMethod("myMethod", new Class[]{String.class});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,40 +26,49 @@ import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
public class SaxPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createNoResponseEndpoint() throws Exception {
|
||||
return new AbstractSaxPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Source getResponse(ContentHandler contentHandler) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ContentHandler createContentHandler() {
|
||||
return new DefaultHandler();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createResponseEndpoint() throws Exception {
|
||||
return new AbstractSaxPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected ContentHandler createContentHandler() {
|
||||
return new TestContentHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Source getResponse(ContentHandler contentHandler) {
|
||||
return new StringSource(RESPONSE);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createNoRequestEndpoint() throws Exception {
|
||||
return new AbstractSaxPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected ContentHandler createContentHandler() throws Exception {
|
||||
fail("Not expected");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Source getResponse(ContentHandler contentHandler) throws Exception {
|
||||
return null;
|
||||
}
|
||||
@@ -68,12 +77,14 @@ public class SaxPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
|
||||
private static class TestContentHandler extends DefaultHandler {
|
||||
|
||||
@Override
|
||||
public void endElement(String uri, String localName, String qName) throws SAXException {
|
||||
assertEquals("Invalid local name", REQUEST_ELEMENT, localName);
|
||||
assertEquals("Invalid qName", REQUEST_ELEMENT, localName);
|
||||
assertEquals("Invalid namespace", NAMESPACE_URI, uri);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startElement(String uri, String localName, String qName, Attributes attributes)
|
||||
throws SAXException {
|
||||
assertEquals("Invalid local name", REQUEST_ELEMENT, localName);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,8 +32,10 @@ import javax.xml.stream.util.XMLEventConsumer;
|
||||
*/
|
||||
public class StaxEventPayloadEndpointTest extends AbstractMessageEndpointTestCase {
|
||||
|
||||
@Override
|
||||
protected MessageEndpoint createNoResponseEndpoint() {
|
||||
return new AbstractStaxEventPayloadEndpoint() {
|
||||
@Override
|
||||
protected void invokeInternal(XMLEventReader eventReader,
|
||||
XMLEventConsumer eventWriter,
|
||||
XMLEventFactory eventFactory) throws Exception {
|
||||
@@ -42,9 +44,11 @@ public class StaxEventPayloadEndpointTest extends AbstractMessageEndpointTestCas
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MessageEndpoint createNoRequestPayloadEndpoint() {
|
||||
return new AbstractStaxEventPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected void invokeInternal(XMLEventReader eventReader,
|
||||
XMLEventConsumer eventWriter,
|
||||
XMLEventFactory eventFactory) throws Exception {
|
||||
@@ -53,9 +57,11 @@ public class StaxEventPayloadEndpointTest extends AbstractMessageEndpointTestCas
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MessageEndpoint createResponseEndpoint() {
|
||||
return new AbstractStaxEventPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected void invokeInternal(XMLEventReader eventReader,
|
||||
XMLEventConsumer eventWriter,
|
||||
XMLEventFactory eventFactory) throws XMLStreamException {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -43,24 +43,30 @@ import org.springframework.xml.transform.StringSource;
|
||||
*/
|
||||
public class StaxStreamPayloadEndpointTest extends AbstractMessageEndpointTestCase {
|
||||
|
||||
@Override
|
||||
protected MessageEndpoint createNoResponseEndpoint() {
|
||||
return new AbstractStaxStreamPayloadEndpoint() {
|
||||
@Override
|
||||
protected void invokeInternal(XMLStreamReader streamReader, XMLStreamWriter streamWriter) throws Exception {
|
||||
assertNotNull("No StreamReader passed", streamReader);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MessageEndpoint createNoRequestPayloadEndpoint() {
|
||||
return new AbstractStaxStreamPayloadEndpoint() {
|
||||
@Override
|
||||
protected void invokeInternal(XMLStreamReader streamReader, XMLStreamWriter streamWriter) throws Exception {
|
||||
assertNull("StreamReader passed", streamReader);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MessageEndpoint createResponseEndpoint() {
|
||||
return new AbstractStaxStreamPayloadEndpoint() {
|
||||
@Override
|
||||
protected void invokeInternal(XMLStreamReader streamReader, XMLStreamWriter streamWriter) throws Exception {
|
||||
assertNotNull("No streamReader passed", streamReader);
|
||||
assertNotNull("No streamWriter passed", streamReader);
|
||||
@@ -79,6 +85,7 @@ public class StaxStreamPayloadEndpointTest extends AbstractMessageEndpointTestCa
|
||||
streamWriter.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected XMLOutputFactory createXmlOutputFactory() {
|
||||
XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
|
||||
outputFactory.setProperty("javax.xml.stream.isRepairingNamespaces", Boolean.TRUE);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,18 +20,22 @@ import nu.xom.Element;
|
||||
|
||||
public class XomPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createNoResponseEndpoint() throws Exception {
|
||||
return new AbstractXomPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Element invokeInternal(Element requestElement) throws Exception {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createResponseEndpoint() throws Exception {
|
||||
return new AbstractXomPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Element invokeInternal(Element requestElement) throws Exception {
|
||||
assertNotNull("No requestElement passed", requestElement);
|
||||
assertEquals("Invalid request element", REQUEST_ELEMENT, requestElement.getLocalName());
|
||||
@@ -41,9 +45,11 @@ public class XomPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PayloadEndpoint createNoRequestEndpoint() throws Exception {
|
||||
return new AbstractXomPayloadEndpoint() {
|
||||
|
||||
@Override
|
||||
protected Element invokeInternal(Element requestElement) throws Exception {
|
||||
assertNull("RequestElement passed", requestElement);
|
||||
return null;
|
||||
@@ -51,6 +57,7 @@ public class XomPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testStaxSourceEventReader() throws Exception {
|
||||
// overriden, because XOM doesn not support it
|
||||
}
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.server.endpoint.adapter;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
@@ -28,6 +44,7 @@ public class GenericMarshallingMethodEndpointAdapterTest extends TestCase {
|
||||
|
||||
private boolean responseInvoked;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
adapter = new GenericMarshallingMethodEndpointAdapter();
|
||||
marshallerMock = createMock(GenericMarshaller.class);
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.server.endpoint.adapter;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
@@ -30,6 +46,7 @@ public class MarshallingMethodEndpointAdapterTest extends TestCase {
|
||||
|
||||
private boolean responseInvoked;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
adapter = new MarshallingMethodEndpointAdapter();
|
||||
marshallerControl = MockControl.createControl(Marshaller.class);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,6 +31,7 @@ public class MessageEndpointAdapterTest extends TestCase {
|
||||
|
||||
private MessageEndpoint endpointMock;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
adapter = new MessageEndpointAdapter();
|
||||
endpointControl = MockControl.createControl(MessageEndpoint.class);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,6 +30,7 @@ public class MessageMethodEndpointAdapterTest extends TestCase {
|
||||
|
||||
private MessageContext messageContext;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
adapter = new MessageMethodEndpointAdapter();
|
||||
messageContext = new DefaultMessageContext(new MockWebServiceMessageFactory());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,6 +40,7 @@ public class PayloadEndpointAdapterTest extends XMLTestCase {
|
||||
|
||||
private MockControl endpointControl;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
adapter = new PayloadEndpointAdapter();
|
||||
endpointControl = MockControl.createControl(PayloadEndpoint.class);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -38,6 +38,7 @@ public class PayloadMethodEndpointAdapterTest extends TestCase {
|
||||
|
||||
private MessageContext messageContext;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
adapter = new PayloadMethodEndpointAdapter();
|
||||
messageContext = new DefaultMessageContext(new MockWebServiceMessageFactory());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -50,6 +50,7 @@ public class XPathParamAnnotationMethodEndpointAdapterTest extends TestCase {
|
||||
|
||||
private boolean namespacesInvoked;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
adapter = new XPathParamAnnotationMethodEndpointAdapter();
|
||||
adapter.afterPropertiesSet();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -38,6 +38,7 @@ public class PayloadLoggingInterceptorTest extends TestCase {
|
||||
|
||||
private MessageContext messageContext;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
interceptor = new PayloadLoggingInterceptor();
|
||||
appender = new CountingAppender();
|
||||
@@ -48,6 +49,7 @@ public class PayloadLoggingInterceptorTest extends TestCase {
|
||||
appender.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
BasicConfigurator.resetConfiguration();
|
||||
ClassPathResource resource = new ClassPathResource("log4j.properties");
|
||||
@@ -96,6 +98,7 @@ public class PayloadLoggingInterceptorTest extends TestCase {
|
||||
count = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void append(LoggingEvent loggingEvent) {
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
* Copyright 2005-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -51,6 +51,7 @@ public class PayloadTransformingInterceptorTest extends XMLTestCase {
|
||||
|
||||
private Resource xslt;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
interceptor = new PayloadTransformingInterceptor();
|
||||
TransformerFactory transformerFactory = TransformerFactory.newInstance();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user