Skip to content

Commit 7e66753

Browse files
Filter out unsupported protocols in the client class ServiceFactory
1 parent 75e8c72 commit 7e66753

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ public static Service getService(Map environment)
106106

107107
if (context != null) {
108108
String name = (String)environment.get("jndiName");
109+
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) {
111+
return null;
112+
}
109113
if (name == null) {
110114
name = "axisServiceName";
111115
}
@@ -120,6 +124,7 @@ public static Service getService(Map environment)
120124
context.bind(name, service);
121125
} catch (NamingException e1) {
122126
// !!! Couldn't do it, what should we do here?
127+
return null;
123128
}
124129
}
125130
} else {

0 commit comments

Comments
 (0)