You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2005/09/02 17:19:17 UTC
svn commit: r267221 -
/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
Author: chinthaka
Date: Fri Sep 2 08:19:01 2005
New Revision: 267221
URL: http://svn.apache.org/viewcvs?rev=267221&view=rev
Log:
- trying to fix a replyTo problem.
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java?rev=267221&r1=267220&r2=267221&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java Fri Sep 2 08:19:01 2005
@@ -28,6 +28,8 @@
import java.io.File;
import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
/**
* This is a simple implementation of an HTTP server for processing
@@ -185,8 +187,14 @@
*
* @see org.apache.axis2.transport.TransportListener#replyToEPR(java.lang.String)
*/
- public EndpointReference replyToEPR(String serviceName) {
- return new EndpointReference("http://127.0.0.1:" + (embedded.getLocalPort()) +
+ public EndpointReference replyToEPR(String serviceName) throws AxisFault {
+ String hostAddress = null;
+ try {
+ hostAddress = InetAddress.getLocalHost().getHostAddress();
+ } catch (UnknownHostException e) {
+ throw new AxisFault(e);
+ }
+ return new EndpointReference("http://"+ hostAddress + ":" + (embedded.getLocalPort()) +
"/axis2/services/" +
serviceName);
}