synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject svn commit: r573488 - /webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java
Date Fri, 07 Sep 2007 07:14:23 GMT
Author: ruwan
Date: Fri Sep  7 00:14:22 2007
New Revision: 573488

URL: http://svn.apache.org/viewvc?rev=573488&view=rev
Log:
Adding the proxy address to the proxy service

Modified:
    webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java?rev=573488&r1=573487&r2=573488&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java
(original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java
Fri Sep  7 00:14:22 2007
@@ -177,6 +177,8 @@
      */
     protected int traceState = Constants.TRACING_UNSET;
 
+    private String address = null;
+
     public ProxyService() {
     }
 
@@ -383,6 +385,27 @@
                         + name, axisFault);
             }
         }
+
+        try {
+            String[] eprs = proxyService.getEPRs();
+            boolean found = false;
+            for (int i=0; i<eprs.length; i++) {
+                if (eprs[i].startsWith("http://")) {
+                    this.address = proxyService.getEPRs()[i];
+                    found = true;
+                }
+            }
+            if (!found) {
+                for (int i=0; i<eprs.length; i++) {
+                    if (eprs[i].startsWith("https://")) {
+                        this.address = proxyService.getEPRs()[i];
+                    }
+                }
+            }
+        } catch (AxisFault axisFault) {
+            axisFault.printStackTrace();  //To change body of catch statement use File |
Settings | File Templates.
+        }
+
         return proxyService;
     }
 
@@ -614,5 +637,14 @@
 
     public void setTargetInLineFaultSequence(SequenceMediator targetInLineFaultSequence)
{
         this.targetInLineFaultSequence = targetInLineFaultSequence;
+    }
+
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message