Moved DefaultStrategiesHelper to ws.support
This commit is contained in:
@@ -42,6 +42,7 @@ import org.springframework.ws.client.WebServiceTransformerException;
|
||||
import org.springframework.ws.client.WebServiceTransportException;
|
||||
import org.springframework.ws.client.support.WebServiceAccessor;
|
||||
import org.springframework.ws.soap.client.core.SoapFaultMessageResolver;
|
||||
import org.springframework.ws.support.DefaultStrategiesHelper;
|
||||
import org.springframework.ws.support.MarshallingUtils;
|
||||
import org.springframework.ws.transport.FaultAwareWebServiceConnection;
|
||||
import org.springframework.ws.transport.TransportException;
|
||||
@@ -51,7 +52,6 @@ import org.springframework.ws.transport.context.DefaultTransportContext;
|
||||
import org.springframework.ws.transport.context.TransportContext;
|
||||
import org.springframework.ws.transport.context.TransportContextHolder;
|
||||
import org.springframework.ws.transport.http.HttpUrlConnectionMessageSender;
|
||||
import org.springframework.ws.transport.support.DefaultStrategiesHelper;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -45,8 +45,8 @@ import org.springframework.ws.server.endpoint.adapter.MessageMethodEndpointAdapt
|
||||
import org.springframework.ws.server.endpoint.adapter.PayloadEndpointAdapter;
|
||||
import org.springframework.ws.server.endpoint.adapter.PayloadMethodEndpointAdapter;
|
||||
import org.springframework.ws.soap.server.SoapMessageDispatcher;
|
||||
import org.springframework.ws.support.DefaultStrategiesHelper;
|
||||
import org.springframework.ws.transport.WebServiceMessageReceiver;
|
||||
import org.springframework.ws.transport.support.DefaultStrategiesHelper;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.transport.support;
|
||||
package org.springframework.ws.support;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -26,6 +26,7 @@ import javax.servlet.ServletContext;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.BeanClassLoaderAware;
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.BeanFactoryAware;
|
||||
@@ -111,7 +112,7 @@ public class DefaultStrategiesHelper {
|
||||
throws BeanInitializationException {
|
||||
String key = strategyInterface.getName();
|
||||
try {
|
||||
List result = null;
|
||||
List result;
|
||||
String value = defaultStrategies.getProperty(key);
|
||||
if (value != null) {
|
||||
String[] classNames = StringUtils.commaDelimitedListToStringArray(value);
|
||||
@@ -142,6 +143,9 @@ public class DefaultStrategiesHelper {
|
||||
beanNameAware.setBeanName(clazz.getName());
|
||||
}
|
||||
if (applicationContext != null) {
|
||||
if (strategy instanceof BeanClassLoaderAware) {
|
||||
((BeanClassLoaderAware) strategy).setBeanClassLoader(applicationContext.getClassLoader());
|
||||
}
|
||||
if (strategy instanceof BeanFactoryAware) {
|
||||
((BeanFactoryAware) strategy).setBeanFactory(applicationContext);
|
||||
}
|
||||
@@ -36,8 +36,8 @@ import org.springframework.ws.server.EndpointAdapter;
|
||||
import org.springframework.ws.server.EndpointExceptionResolver;
|
||||
import org.springframework.ws.server.EndpointMapping;
|
||||
import org.springframework.ws.server.MessageDispatcher;
|
||||
import org.springframework.ws.support.DefaultStrategiesHelper;
|
||||
import org.springframework.ws.transport.WebServiceMessageReceiver;
|
||||
import org.springframework.ws.transport.support.DefaultStrategiesHelper;
|
||||
import org.springframework.ws.wsdl.WsdlDefinition;
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,12 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.transport.support;
|
||||
package org.springframework.ws.support;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.BeanInitializationException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@@ -28,6 +27,8 @@ import org.springframework.context.support.StaticApplicationContext;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class DefaultStrategiesHelperTest extends TestCase {
|
||||
|
||||
public void testGetDefaultStrategies() throws Exception {
|
||||
@@ -0,0 +1 @@
|
||||
org.springframework.ws.support.DefaultStrategiesHelperTest$Strategy=org.springframework.ws.support.DefaultStrategiesHelperTest$StrategyImpl,org.springframework.ws.support.DefaultStrategiesHelperTest$ContextAwareStrategyImpl
|
||||
@@ -1 +0,0 @@
|
||||
org.springframework.ws.transport.support.DefaultStrategiesHelperTest$Strategy=org.springframework.ws.transport.support.DefaultStrategiesHelperTest$StrategyImpl,org.springframework.ws.transport.support.DefaultStrategiesHelperTest$ContextAwareStrategyImpl
|
||||
Reference in New Issue
Block a user