Skip to content

Commit 685c309

Browse files
Filter out more unsupported protocols in the client class ServiceFactory
1 parent e84c60c commit 685c309

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

axis-rt-core/src/main/java/org/apache/axis/client/ServiceFactory.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
package org.apache.axis.client;
1818

1919
import org.apache.axis.EngineConfiguration;
20+
import org.apache.axis.components.logger.LogFactory;
2021
import org.apache.axis.configuration.EngineConfigurationFactoryFinder;
2122
import org.apache.axis.utils.ClassUtils;
2223
import org.apache.axis.utils.Messages;
24+
import org.apache.commons.logging.Log;
2325

2426
import javax.naming.Context;
2527
import javax.naming.InitialContext;
@@ -47,6 +49,9 @@
4749
public class ServiceFactory extends javax.xml.rpc.ServiceFactory
4850
implements ObjectFactory
4951
{
52+
protected static Log log =
53+
LogFactory.getLog(ServiceFactory.class.getName());
54+
5055
// Constants for RefAddrs in the Reference.
5156
public static final String SERVICE_CLASSNAME = "service classname";
5257
public static final String WSDL_LOCATION = "WSDL location";
@@ -107,7 +112,8 @@ public static Service getService(Map environment)
107112
if (context != null) {
108113
String name = (String)environment.get("jndiName");
109114

110-
if(name!=null && (name.toUpperCase().indexOf("LDAP")!=-1 || name.toUpperCase().indexOf("RMI")!=-1 || name.toUpperCase().indexOf("JMS")!=-1 || name.toUpperCase().indexOf("JMX")!=-1) || name.toUpperCase().indexOf("JRMP")!=-1 || name.toUpperCase().indexOf("JAVA")!=-1 || name.toUpperCase().indexOf("DNS")!=-1) {
115+
if(name!=null && (name.toUpperCase().indexOf("LDAP")!=-1 || name.toUpperCase().indexOf("RMI")!=-1 || name.toUpperCase().indexOf("JMS")!=-1 || name.toUpperCase().indexOf("JMX")!=-1) || name.toUpperCase().indexOf("JRMP")!=-1 || name.toUpperCase().indexOf("JAVA")!=-1 || name.toUpperCase().indexOf("DNS")!=-1 || name.toUpperCase().indexOf("IIOP")!=-1 || name.toUpperCase().indexOf("CORBANAME")!=-1) {
116+
log.warn("returning null, jndiName received by ServiceFactory.getService() is not supported by this method: " + name);
111117
return null;
112118
}
113119
if (name == null) {

0 commit comments

Comments
 (0)