axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From damr...@apache.org
Subject svn commit: r641144 - /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
Date Wed, 26 Mar 2008 04:40:44 GMT
Author: damrhei
Date: Tue Mar 25 21:40:44 2008
New Revision: 641144

URL: http://svn.apache.org/viewvc?rev=641144&view=rev
Log:
Make sure @WebService.name parameter is set correctly in the case of an explicitly defined
SEI. 

Modified:
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java?rev=641144&r1=641143&r2=641144&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
Tue Mar 25 21:40:44 2008
@@ -675,6 +675,13 @@
                             getServiceDescriptionImpl().getDBCMap().get(seiClassName),
                             false,
                             this);
+                    
+                    // after this is constructed, we need to update the @WebService.name

+                    // attribute on the axisService instance
+                    if(axisService != null) {
+                        updateWebServiceNameParameter(((EndpointInterfaceDescriptionImpl)

+                                endpointInterfaceDescription).getAnnoWebServiceName(), axisService);

+                    }
                 }
             }
         } else {
@@ -1058,6 +1065,13 @@
                                     getServiceDescriptionImpl().getDBCMap().get(seiClassName),
                                     false,
                                     this);
+                            
+                            // after this is constructed, we need to update the @WebService.name

+                            // attribute on the axisService instance
+                            if(axisService != null) {
+                                updateWebServiceNameParameter(((EndpointInterfaceDescriptionImpl)

+                                        endpointInterfaceDescription).getAnnoWebServiceName(),
axisService); 
+                            }
                         }
 
                     } else {
@@ -2064,6 +2078,34 @@
         }
 
         return cl;
+    }
+    
+    /**
+     * This will update or set the parameter on the AxisService that represents the
+     * value of the @WebService.name attribute. This is needed since the @WebService.name
+     * value may not be known until the EndpointInterfaceDescription is created for
+     * the explicitly defined SEI.
+     */
+    void updateWebServiceNameParameter(String newName, AxisService service) {
+        if(log.isDebugEnabled()) {
+            log.debug("Setting @WebService.name value on the " + service.getName() + 
+                      " AxisService to: " + newName);
+        }
+        Parameter param = service.getParameter(MDQConstants.WSDL_PORTTYPE_NAME);
+        if(param != null) {
+            param.setValue(newName);
+        }
+        else {
+            param = new Parameter();
+            param.setName(MDQConstants.WSDL_PORTTYPE_NAME);
+            param.setValue(newName);
+            try {
+              service.addParameter(param);  
+            }
+            catch (AxisFault e) {
+                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("setupAxisServiceErr2"),e);
+            }
+        }
     }
 }
 



---------------------------------------------------------------------
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