Author: sanka
Date: Fri May 30 09:15:04 2008
New Revision: 17671
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=17671

Log:


Modified:
   
branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
   
branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java
   
branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java

Modified: 
branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
URL: 
http://wso2.org/svn/browse/wso2/branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java?rev=17671&r1=17670&r2=17671&view=diff
==============================================================================
--- 
branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
  (original)
+++ 
branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
  Fri May 30 09:15:04 2008
@@ -173,7 +173,7 @@
                this.transportInDescName = transportInDescName;
        }
 
-       private String calculateEndpointURL() {
+       public String calculateEndpointURL() {
                if (transportInDescName != null && parent != null) {
                        AxisConfiguration axisConfiguration = 
getAxisConfiguration();
                        if (axisConfiguration != null) {

Modified: 
branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java
URL: 
http://wso2.org/svn/browse/wso2/branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java?rev=17671&r1=17670&r2=17671&view=diff
==============================================================================
--- 
branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java
    (original)
+++ 
branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java
    Fri May 30 09:15:04 2008
@@ -667,7 +667,7 @@
                                        QName qname = axisBinding.getName();
                                        port.addAttribute(BINDING_LOCAL_NAME, 
tns.getPrefix() + ":"
                                                        + qname.getLocalPart(), 
null);
-                                       String endpointURL = 
axisEndpoint.getEndpointURL();
+                                       String endpointURL = 
getEndpointURL(axisEndpoint);
                                        
WSDLSerializationUtil.addExtensionElement(fac, port,
                                                        SOAP_ADDRESS, LOCATION, 
(endpointURL == null) ? ""
                                                                        : 
endpointURL, soap);
@@ -709,7 +709,7 @@
                                        QName qname = axisBinding.getName();
                                        port.addAttribute(BINDING_LOCAL_NAME, 
tns.getPrefix() + ":"
                                                        + qname.getLocalPart(), 
null);
-                                       String endpointURL = 
axisEndpoint.getEndpointURL();
+                                       String endpointURL = 
getEndpointURL(axisEndpoint);
                                        
WSDLSerializationUtil.addExtensionElement(fac, port,
                                                        SOAP_ADDRESS, LOCATION, 
(endpointURL == null) ? ""
                                                                        : 
endpointURL, soap12);
@@ -746,7 +746,7 @@
                                port.addAttribute(BINDING_LOCAL_NAME, 
tns.getPrefix() + ":"
                                                + qname.getLocalPart(), null);
                                OMElement extElement = 
fac.createOMElement("address", http);
-                               String endpointURL = 
axisEndpoint.getEndpointURL();
+                               String endpointURL = 
getEndpointURL(axisEndpoint);
                                extElement.addAttribute("location", 
(endpointURL == null) ? ""
                                                : endpointURL, null);
                                port.addChild(extElement);
@@ -1280,4 +1280,15 @@
                }
                return false;
        }
+       
+       private String getEndpointURL(AxisEndpoint axisEndpoint) {
+               Parameter modifyAddressParam = axisService
+                               .getParameter("modifyUserWSDLPortAddress");
+               if (modifyAddressParam != null) {
+                       if (Boolean.parseBoolean((String) 
modifyAddressParam.getValue())) {
+                               return axisEndpoint.calculateEndpointURL();
+                       }
+               }
+               return axisEndpoint.getEndpointURL();
+       }
 }

Modified: 
branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java
URL: 
http://wso2.org/svn/browse/wso2/branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java?rev=17671&r1=17670&r2=17671&view=diff
==============================================================================
--- 
branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java
    (original)
+++ 
branches/wsas/java/2.3/axis2-1.4-patched/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java
    Fri May 30 09:15:04 2008
@@ -300,7 +300,21 @@
                 }
                 if (!endpointAlreadyAdded) {
 //                     addPolicyAsExtensibleElement(axisEndpoint, 
endpointElement);
-                    serviceElement.addChild(endpointElement);
+                       Parameter modifyAddressParam = axisService
+                                                       
.getParameter("modifyUserWSDLPortAddress");
+                                       if (modifyAddressParam != null) {
+                                               if 
(Boolean.parseBoolean((String) modifyAddressParam
+                                                               .getValue())) {
+                                                       String endpointURL = 
axisEndpoint
+                                                                       
.calculateEndpointURL();
+                                                       endpointElement
+                                                                       
.getAttribute(
+                                                                               
        new QName(
+                                                                               
                        WSDL2Constants.ATTRIBUTE_ADDRESS))
+                                                                       
.setAttributeValue(endpointURL);
+                                               }
+                                       }
+                       serviceElement.addChild(endpointElement);
                 }
             }
             Iterator iter = bindings.iterator();
@@ -811,4 +825,4 @@
                        }
                }
        }
-}
\ No newline at end of file
+}

_______________________________________________
Wsas-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev

Reply via email to