Author: keith
Date: Sun Aug  3 08:32:23 2008
New Revision: 20320
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=20320

Log:
Avoid adding the trailing "/" to the endpoint address when the endpoint is JMS. 
Cause this causes a numberFormatException otherwise



Modified:
   
branches/mashup/java/1.5/java/modules/patches/axis2/src/org/apache/axis2/description/AxisEndpoint.java

Modified: 
branches/mashup/java/1.5/java/modules/patches/axis2/src/org/apache/axis2/description/AxisEndpoint.java
URL: 
http://wso2.org/svn/browse/wso2/branches/mashup/java/1.5/java/modules/patches/axis2/src/org/apache/axis2/description/AxisEndpoint.java?rev=20320&r1=20319&r2=20320&view=diff
==============================================================================
--- 
branches/mashup/java/1.5/java/modules/patches/axis2/src/org/apache/axis2/description/AxisEndpoint.java
      (original)
+++ 
branches/mashup/java/1.5/java/modules/patches/axis2/src/org/apache/axis2/description/AxisEndpoint.java
      Sun Aug  3 08:32:23 2008
@@ -183,13 +183,19 @@
                                                        
.getTransportIn(transportInDescName);
                                        TransportListener listener = 
in.getReceiver();
                                        String ip = 
HttpUtils.getIpAddress(axisConfiguration);
-                    String sDOTe = serviceName;
-                    if (!"jms".equalsIgnoreCase(transportInDescName)) {
-                        // we should pass [serviceName].[endpointName] instead 
of
-                        // [endpointName]
-                        sDOTe = serviceName + "." + name;
+
+                    if ("jms".equalsIgnoreCase(transportInDescName)) {
+                        EndpointReference[] eprsForService = listener
+                                .getEPRsForService(serviceName, ip);
+                        // we consider only the first address return by the 
listener
+                        if (eprsForService != null && eprsForService.length > 
0) {
+                            return eprsForService[0].getAddress();
+                        }
                     }
-                    EndpointReference[] eprsForService = listener
+                    // we should pass [serviceName].[endpointName] instead of
+                                       // [endpointName]
+                                       String sDOTe = serviceName + "." + name;
+                                       EndpointReference[] eprsForService = 
listener
                                                        
.getEPRsForService(sDOTe, ip);
                                        // we consider only the first address 
return by the listener
                                        if (eprsForService != null && 
eprsForService.length > 0) {

_______________________________________________
Mashup-dev mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to