owenb 2003/07/29 08:47:22
Modified: java/src/org/apache/wsif/util WSIFUtils.java
Log:
Remove lookupFactoryFromJNDI method since it is no longer used
Revision Changes Path
1.40 +1 -58 xml-axis-wsif/java/src/org/apache/wsif/util/WSIFUtils.java
Index: WSIFUtils.java
===================================================================
RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/util/WSIFUtils.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- WSIFUtils.java 30 May 2003 10:38:01 -0000 1.39
+++ WSIFUtils.java 29 Jul 2003 15:47:21 -0000 1.40
@@ -61,7 +61,6 @@
import java.io.Reader;
import java.io.StringReader;
import java.io.Writer;
-import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.PasswordAuthentication;
import java.net.URL;
@@ -95,7 +94,6 @@
import org.apache.wsif.WSIFConstants;
import org.apache.wsif.WSIFException;
-import org.apache.wsif.WSIFService;
import org.apache.wsif.base.WSIFServiceImpl;
import org.apache.wsif.format.WSIFFormatHandler;
import org.apache.wsif.logging.MessageLogger;
@@ -147,10 +145,7 @@
private static HashMap keywordMap = null;
/**
- * This checks whether JNDI classes are available at runtime.
- * If the return value is true, then generated stubs should
- * invoke lookupFactoryFromJNDI to get the WSIFService.
- * If not, then there's no need to do so.
+ * This checks whether JNDI classes are available at runtime.
*/
public static boolean isJNDIAvailable() {
Trc.entry(null);
@@ -174,58 +169,6 @@
b = false;
Trc.exit(b);
return b;
- }
-
- /**
- * Given the service and portType identification, return a factory
- * that can produce WSIFPorts for that service/portType combination.
- */
- public static WSIFService lookupFactoryFromJNDI(
- String serviceNS,
- String serviceName,
- String portTypeNS,
- String portTypeName)
- throws WSIFException {
- Trc.entry(null, serviceNS, serviceName, portTypeNS, portTypeName);
- if (serviceNS == null)
- throw new IllegalArgumentException("service namespace can not be null");
- if (serviceName == null)
- throw new IllegalArgumentException("service name can not be null");
- if (portTypeNS == null)
- throw new IllegalArgumentException("port type namespace can not be
null");
- if (portTypeName == null)
- throw new IllegalArgumentException("port type name can not be null");
-
- WSIFService ws = null;
- try {
- if (initContextClass == null) {
- initContextClass =
- Class.forName(
- "javax.naming.InitialContext",
- true,
- WSIFUtils.class.getClassLoader());
- }
- Object ic = initContextClass.newInstance();
- Class[] lookupSig = new Class[] { String.class };
- Object[] lookupArgs =
- new String[] {
- serviceNS
- + "::"
- + serviceName
- + "::"
- + portTypeNS
- + "::"
- + portTypeName };
- Method m = initContextClass.getMethod("lookup", lookupSig);
- ws = (WSIFService) m.invoke(ic, lookupArgs);
- } catch (Exception e) {
- Trc.exception(e);
- throw new WSIFException(
- "Exception while looking up JNDI factory: " + e.getMessage(),
- e);
- }
- Trc.exit(ws);
- return ws;
}
public static Service selectService(