axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kei...@apache.org
Subject svn commit: r518601 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/wsdl/codegen/emitter/ kernel/src/org/apache/axis2/description/ kernel/src/org/apache/axis2/wsdl/
Date Thu, 15 Mar 2007 12:15:19 GMT
Author: keithc
Date: Thu Mar 15 05:15:18 2007
New Revision: 518601

URL: http://svn.apache.org/viewvc?view=rev&rev=518601
Log:
Moving the endpointURL from AxisService to AxisEndpoint as its endpoint dependant.
Deprecating axisService.getEndpointURL() and axisService.setEndpointURL()
Removing HttpAddress and SoapAddress classes.

Removed:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/wsdl/HttpAddress.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/wsdl/SoapAddress.java
Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java?view=diff&rev=518601&r1=518600&r2=518601
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
Thu Mar 15 05:15:18 2007
@@ -96,6 +96,7 @@
     protected static Map mepToSuffixMap;
 
     protected AxisBinding axisBinding;
+    protected AxisEndpoint axisEndpoint;
 
     protected int uniqueFaultNameCounter = 0;
     /**
@@ -199,7 +200,8 @@
         this.codeGenConfiguration = configuration;
         this.axisServices = codeGenConfiguration.getAxisServices();
         this.axisService = codeGenConfiguration.getAxisService();
-        this.axisBinding = axisService.getEndpoint(axisService.getEndpointName()).getBinding();
+        this.axisEndpoint = axisService.getEndpoint(axisService.getEndpointName());
+        this.axisBinding = axisEndpoint.getBinding();
         resolver = new XSLTIncludeResolver(codeGenConfiguration);
     }
 
@@ -391,22 +393,12 @@
                 }
 
                 Map endpoints = this.axisService.getEndpoints();
-                AxisEndpoint axisEndpoint;
                 for (Iterator endPointsIter = endpoints.values().iterator(); endPointsIter.hasNext();)
{
-                    axisEndpoint = (AxisEndpoint) endPointsIter.next();
                     // set the end point details.
-                    this.axisBinding = axisEndpoint.getBinding();
-                    axisService.setEndpointName(axisEndpoint.getName());
-                    axisService.setBindingName(axisEndpoint.getBinding().getName().getLocalPart());
-                    if (axisEndpoint.getProperty(WSDL2Constants.ATTR_WSOAP_ADDRESS) instanceof
SoapAddress) {
-                        SoapAddress soapAddress = (SoapAddress)
-                                axisEndpoint.getProperty(WSDL2Constants.ATTR_WSOAP_ADDRESS);
-                        axisService.setEndpointURL(soapAddress.getLocation());
-                    } else if (axisEndpoint.getProperty(WSDL2Constants.ATTR_WHTTP_LOCATION)
instanceof HttpAddress) {
-                        HttpAddress httpAddress = (HttpAddress) axisEndpoint
-                                .getProperty(WSDL2Constants.ATTR_WHTTP_LOCATION);
-                        axisService.setEndpointURL(httpAddress.getLocation());
-                    }
+                    this.axisEndpoint = (AxisEndpoint) endPointsIter.next();
+                    this.axisBinding = this.axisEndpoint.getBinding();
+                    axisService.setEndpointName(this.axisEndpoint.getName());
+                    axisService.setBindingName(this.axisEndpoint.getBinding().getName().getLocalPart());
 
                     // see the comment at updateMapperClassnames for details and reasons
for
                     // calling this method
@@ -892,7 +884,7 @@
 
         Element endpointElement = doc.createElement("endpoint");
 
-        String endpoint = axisService.getEndpointURL();
+        String endpoint = this.axisEndpoint.getEndpointURL();
         Text text = doc.createTextNode((endpoint != null)
                 ? endpoint
                 : "");

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java?view=diff&rev=518601&r1=518600&r2=518601
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
Thu Mar 15 05:15:18 2007
@@ -33,10 +33,22 @@
     // The binding reffered to by the endpoint
     private AxisBinding binding;
 
+    // The address of the endpoint
+    private String endpointURL;
+
     // The alias used for the endpoint
     private String alias;
 
     private Map options;
+
+
+    public String getEndpointURL() {
+        return endpointURL;
+    }
+
+    public void setEndpointURL(String endpointURL) {
+        this.endpointURL = endpointURL;
+    }
 
     public AxisEndpoint() {
         options = new HashMap();

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java?view=diff&rev=518601&r1=518600&r2=518601
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
Thu Mar 15 05:15:18 2007
@@ -2336,10 +2336,12 @@
 
     }
 
+    //@deprecated - use getEndpointURL in axisEndpoint
     public String getEndpointURL() {
         return endpointURL;
     }
 
+    //@deprecated - use setEndpointURL in axisEndpoint
     public void setEndpointURL(String endpointURL) {
         this.endpointURL = endpointURL;
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?view=diff&rev=518601&r1=518600&r2=518601
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
Thu Mar 15 05:15:18 2007
@@ -9,9 +9,7 @@
 import org.apache.axis2.transport.http.util.RESTUtil;
 import org.apache.axis2.util.PolicyUtil;
 import org.apache.axis2.util.XMLUtils;
-import org.apache.axis2.wsdl.HttpAddress;
 import org.apache.axis2.wsdl.SOAPHeaderMessage;
-import org.apache.axis2.wsdl.SoapAddress;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.axis2.wsdl.WSDLUtil;
 import org.apache.axis2.wsdl.util.WSDL4JImportedWSDLHelper;
@@ -332,17 +330,7 @@
                     populateEndpoint(axisEndpoint, port, true);
                     axisService.setEndpointName(axisEndpoint.getName());
                     axisService.setBindingName(axisEndpoint.getBinding().getName().getLocalPart());
-                    if (BINDING_TYPE_SOAP.equals(this.bindingType)) {
-                        SoapAddress soapAddress = (SoapAddress) axisEndpoint
-                                .getProperty(WSDL2Constants.ATTR_WSOAP_ADDRESS);
-                        axisService.setEndpointURL(soapAddress.getLocation());
-                    } else if (BINDING_TYPE_HTTP.equals(this.bindingType)) {
-                        HttpAddress httpAddress = (HttpAddress) axisEndpoint
-                                .getProperty(WSDL2Constants.ATTR_WHTTP_LOCATION);
-                        axisService.setEndpointURL(httpAddress.getLocation());
-                    }
-
-                } else {
+                    } else {
                     populateEndpoint(axisEndpoint, port, false);
                 }
                 axisService.addEndpoint(port.getName(), axisEndpoint);
@@ -1841,28 +1829,22 @@
 
             } else if (wsdl4jExtensibilityElement instanceof SOAP12Address) {
                 SOAP12Address soapAddress = (SOAP12Address) wsdl4jExtensibilityElement;
-                SoapAddress address = new SoapAddress();
-                address.setLocation(soapAddress.getLocationURI());
                 if (description instanceof AxisEndpoint) {
                     ((AxisEndpoint) description)
-                            .setProperty(WSDL2Constants.ATTR_WSOAP_ADDRESS, address);
+                            .setEndpointURL(soapAddress.getLocationURI());
                 }
 
             } else if (wsdl4jExtensibilityElement instanceof SOAPAddress) {
                 SOAPAddress soapAddress = (SOAPAddress) wsdl4jExtensibilityElement;
-                SoapAddress address = new SoapAddress();
-                address.setLocation(soapAddress.getLocationURI());
                 if (description instanceof AxisEndpoint) {
                     ((AxisEndpoint) description)
-                            .setProperty(WSDL2Constants.ATTR_WSOAP_ADDRESS, address);
+                            .setEndpointURL(soapAddress.getLocationURI());
                 }
             } else if (wsdl4jExtensibilityElement instanceof HTTPAddress) {
                 HTTPAddress httpAddress = (HTTPAddress) wsdl4jExtensibilityElement;
-                HttpAddress address = new HttpAddress();
-                address.setLocation(httpAddress.getLocationURI());
                 if (description instanceof AxisEndpoint) {
                     ((AxisEndpoint) description)
-                            .setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, address);
+                            .setEndpointURL(httpAddress.getLocationURI());
                 }
 
             } else if (wsdl4jExtensibilityElement instanceof Schema) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java?view=diff&rev=518601&r1=518600&r2=518601
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
Thu Mar 15 05:15:18 2007
@@ -297,6 +297,7 @@
     private AxisEndpoint processEndpoint(Endpoint endpoint) throws AxisFault {
         AxisEndpoint axisEndpoint = new AxisEndpoint();
         axisEndpoint.setName(endpoint.getName().toString());
+        axisEndpoint.setEndpointURL(endpoint.getAddress().toString());
         if (processedBindings.containsKey(endpoint.getBinding().getName())) {
             axisEndpoint.setBinding(
                     (AxisBinding) processedBindings.get(endpoint.getBinding().getName()));



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


Mime
View raw message