You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by ru...@apache.org on 2007/09/07 09:14:23 UTC
svn commit: r573488 -
/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java
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