geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r529376 - /geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
Date Mon, 16 Apr 2007 19:32:37 GMT
Author: dims
Date: Mon Apr 16 12:32:36 2007
New Revision: 529376

URL: http://svn.apache.org/viewvc?view=rev&rev=529376
Log:
Fix for GERONIMO-3102 - Axis2: servicename and portname overwrite (from wsdl to annotation)

Modified:
    geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java

Modified: geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java?view=diff&rev=529376&r1=529375&r2=529376
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
Mon Apr 16 12:32:36 2007
@@ -50,6 +50,8 @@
 import org.apache.axis2.jaxws.description.ServiceDescription;
 import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
 import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
+import org.apache.axis2.jaxws.description.builder.WebServiceAnnot;
+import org.apache.axis2.jaxws.description.builder.WebServiceProviderAnnot;
 import org.apache.axis2.jaxws.description.builder.WsdlComposite;
 import org.apache.axis2.jaxws.description.builder.WsdlGenerator;
 import org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter;
@@ -101,10 +103,21 @@
 
         DescriptionBuilderComposite dbc = dbcMap.get(endpointClassName);
         dbc.setClassLoader(classLoader);
-
         dbc.setWsdlDefinition(wsdlDefinition);
         dbc.setClassName(endpointClassName);
         dbc.setCustomWsdlGenerator(new WSDLGeneratorImpl(wsdlDefinition));
+        if (dbc.getWebServiceAnnot() != null) { //information specified in .wsdl should overwrite
annotation.
+            WebServiceAnnot serviceAnnot = dbc.getWebServiceAnnot();
+            serviceAnnot.setPortName(portName);
+            serviceAnnot.setServiceName(service.getName());
+            serviceAnnot.setTargetNamespace(service.getTargetNamespace());
+        } else if (dbc.getWebServiceProviderAnnot() != null) { 
+            //TODO: can webservice and webservice provider annot co-exist?
+            WebServiceProviderAnnot serviceProviderAnnot = dbc.getWebServiceProviderAnnot();

+            serviceProviderAnnot.setPortName(portName);
+            serviceProviderAnnot.setServiceName(service.getName());
+            serviceProviderAnnot.setTargetNamespace(service.getTargetNamespace());
+        }
 
         for(Iterator<AxisOperation> opIterator = service.getOperations() ; opIterator.hasNext()
;){
             AxisOperation operation = opIterator.next();



Mime
View raw message