Author: scamp
Date: Tue Apr 5 10:07:08 2005
New Revision: 160201
URL: http://svn.apache.org/viewcvs?view=rev&rev=160201
Log: (empty)
Modified:
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/InteropConstants.java
Modified:
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/InteropConstants.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/InteropConstants.java?view=diff&r1=160200&r2=160201
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/InteropConstants.java
(original)
+++
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/InteropConstants.java
Tue Apr 5 10:07:08 2005
@@ -1,15 +1,41 @@
package org.apache.ws.resource.example;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
/**
* @author Sal Campana
*/
-public interface InteropConstants
+public class InteropConstants
{
- String SERVICES_URL = "http://localhost:8080/muse/services";
- String WEATHERSTATION_SERVICE_NAME = "weatherstation";
- String BLACKBERRY_SERVICE_NAME = "blackberry";
-
- String WEATHERSTATION_KEY1 = "weather1";
- String WEATHERSTATION_KEY2 = "weather2";
- String FCCID="weatherIsNice";
+ public static String SERVICES_URL = null;
+
+ static
+ {
+ initIp();
+ }
+
+
+ public static String WEATHERSTATION_SERVICE_NAME = "weatherstation";
+ public static String BLACKBERRY_SERVICE_NAME = "blackberry";
+
+ public static String WEATHERSTATION_KEY1 = "weather1";
+ public static String WEATHERSTATION_KEY2 = "weather2";
+ public static String FCCID="weatherIsNice";
+
+ private static void initIp()
+ {
+ if (SERVICES_URL == null)
+ {
+ try
+ { //determine the real ip address
+ SERVICES_URL = "http://" +
InetAddress.getLocalHost().getHostAddress() + ":8080/muse/services";
+ }
+ catch (UnknownHostException e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]