You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ga...@apache.org on 2007/07/31 03:36:13 UTC
svn commit: r561207 -
/webservices/axis2/branches/java/1_3/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
Author: gawor
Date: Mon Jul 30 18:36:11 2007
New Revision: 561207
URL: http://svn.apache.org/viewvc?view=rev&rev=561207
Log:
look for existing EndpointDescription objects when only SEI class is specified (AXIS-3018)
Modified:
webservices/axis2/branches/java/1_3/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
Modified: webservices/axis2/branches/java/1_3/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java?view=diff&rev=561207&r1=561206&r2=561207
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java (original)
+++ webservices/axis2/branches/java/1_3/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java Mon Jul 30 18:36:11 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