axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r561202 - /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
Date Tue, 31 Jul 2007 01:03:05 GMT
Author: gawor
Date: Mon Jul 30 18:03:04 2007
New Revision: 561202

URL: http://svn.apache.org/viewvc?view=rev&rev=561202
Log:
look for existing EndpointDescription objects when only SEI class is specified (AXIS-3018)

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

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java?view=diff&rev=561202&r1=561201&r2=561202
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
Mon Jul 30 18:03:04 2007
@@ -264,6 +264,12 @@
                 break;
 
             case GET_PORT:
+                
+                // try to find existing endpointDesc by SEI class if portQName was not specified

+                if (endpointDescription == null && portQName == null && sei
!= null) {
+                    endpointDescription = getEndpointDescriptionImpl(sei);
+                }
+                
                 // If an endpointDesc doesn't exist, and the port exists in the WSDL, create
it
                 // If an endpointDesc already exists and has an associated SEI already, make
sure they match
                 // If an endpointDesc already exists and was created for Dispatch (no SEI),
update that with the SEI provided on the getPort
@@ -404,6 +410,21 @@
 
     EndpointDescriptionImpl getEndpointDescriptionImpl(QName portQName) {
         return (EndpointDescriptionImpl)getEndpointDescription(portQName);
+    }
+    
+    EndpointDescriptionImpl getEndpointDescriptionImpl(Class seiClass) {
+        for (EndpointDescription endpointDescription : endpointDescriptions.values()) {
+            EndpointInterfaceDescription endpointInterfaceDesc =
+                    endpointDescription.getEndpointInterfaceDescription();
+            // Note that Dispatch endpoints will not have an endpointInterface because the
do not have an associated SEI
+            if (endpointInterfaceDesc != null) {
+                Class endpointSEIClass = endpointInterfaceDesc.getSEIClass();
+                if (endpointSEIClass != null && endpointSEIClass.equals(seiClass))
{
+                    return (EndpointDescriptionImpl)endpointDescription;
+                }
+            }
+        }
+        return null;
     }
 
     DescriptionBuilderComposite getDescriptionBuilderComposite() {



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