geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r511793 - in /geronimo/server/trunk/modules/geronimo-axis2: ./ src/main/java/org/apache/geronimo/axis2/ src/test/java/org/apache/geronimo/axis2/
Date Mon, 26 Feb 2007 12:51:58 GMT
Author: dims
Date: Mon Feb 26 04:51:56 2007
New Revision: 511793

URL: http://svn.apache.org/viewvc?view=rev&rev=511793
Log:
Fix for GERONIMO-2888 - Axis2WebServiceContainerTest getting failed due to missing libraries
in the classpath & GERONIMO-2877 - Minor improvement to Axis2 Jaxws Integration

Modified:
    geronimo/server/trunk/modules/geronimo-axis2/pom.xml
    geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
    geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
    geronimo/server/trunk/modules/geronimo-axis2/src/test/java/org/apache/geronimo/axis2/Axis2WebServiceContainerTest.java

Modified: geronimo/server/trunk/modules/geronimo-axis2/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/pom.xml?view=diff&rev=511793&r1=511792&r2=511793
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/pom.xml (original)
+++ geronimo/server/trunk/modules/geronimo-axis2/pom.xml Mon Feb 26 04:51:56 2007
@@ -51,7 +51,128 @@
 			<artifactId>geronimo-jaxws</artifactId>
 			<version>${version}</version>
 		</dependency>
+		
+		<!-- Had to add due to the Axis2WebServiceContainerTest -->
+		<dependency>
+           	<groupId>com.sun.xml.bind</groupId>
+		    <artifactId>jaxb-xjc</artifactId>
+            <version>2.0.2</version>
+   	    </dependency>
+		<dependency>
+        	<groupId>com.sun.xml.bind</groupId>
+		    <artifactId>jaxb-impl</artifactId>
+		    <version>2.0.2</version>
+		    <exclusions>
+          		<exclusion>
+                   	<artifactId>jsr173</artifactId>
+  	               	<groupId>javax.xml</groupId>
+         		</exclusion>
+           	</exclusions>
+		</dependency>		
+		<dependency>
+	        <groupId>org.apache.axis2</groupId>
+	        <artifactId>axis2-java2wsdl</artifactId>
+	    </dependency>
+        <dependency>
+	         <groupId>org.apache.axis2</groupId>
+	         <artifactId>axis2-kernel</artifactId>
+	    </dependency>
+    	<dependency>
+	         <groupId>org.apache.axis2</groupId>
+	         <artifactId>axis2-adb</artifactId>
+	    </dependency>
+	    <dependency>
+	         <groupId>org.apache.axis2</groupId>
+	         <artifactId>axis2-jaxws-api</artifactId>
+	    </dependency>	
+       	<dependency>
+		    <groupId>org.apache.axis2</groupId>
+		    <artifactId>axis2-metadata</artifactId>
+		</dependency>
+	    <dependency>
+	        <groupId>org.apache.ws.commons.axiom</groupId>
+	        <artifactId>axiom-api</artifactId>
+	    </dependency>
+	    <dependency>
+	        <groupId>org.apache.ws.commons.axiom</groupId>
+	        <artifactId>axiom-impl</artifactId>
+	    </dependency>
+	    <dependency>
+	         <groupId>org.apache.ws.commons</groupId>
+	         <artifactId>XmlSchema</artifactId>
+	    </dependency>
+	    <dependency>
+	         <groupId>org.apache.neethi</groupId>
+	         <artifactId>neethi</artifactId>
+	    </dependency>
+	    <dependency>
+	         <groupId>commons-logging</groupId>
+	         <artifactId>commons-logging</artifactId>
+	         <exclusions>
+	              <exclusion>
+	                    <groupId>log4j</groupId>
+	                    <artifactId>log4j</artifactId>
+	               </exclusion>
+	               <exclusion>
+	                    <groupId>logkit</groupId>
+	                    <artifactId>logkit</artifactId>
+	               </exclusion>
+	               <exclusion>
+	                    <groupId>avalon-framework</groupId>
+	                    <artifactId>avalon-framework</artifactId>
+	               </exclusion>
+	         </exclusions>
+	    </dependency>
+	    <dependency>
+	         <groupId>commons-httpclient</groupId>
+	         <artifactId>commons-httpclient</artifactId>
+	    </dependency>
+	    <dependency>
+	    	<groupId>commons-codec</groupId>
+	        <artifactId>commons-codec</artifactId>
+	    </dependency>
+	    <dependency>
+	        <groupId>stax</groupId>
+	        <artifactId>stax-api</artifactId>
+	    </dependency>
+	    <dependency>
+	        <groupId>javax.mail</groupId>
+	        <artifactId>mail</artifactId>
+	    </dependency>
+	    <dependency>
+	        <groupId>javax.activation</groupId>
+	        <artifactId>activation</artifactId>
+	    </dependency>
+	    <dependency>
+	        <groupId>xalan</groupId>
+	        <artifactId>xalan</artifactId>
+	    </dependency>
+	    <dependency>
+	        <groupId>xmlbeans</groupId>
+	        <artifactId>xbean</artifactId>
+	    </dependency>
+	    <dependency>
+	        <groupId>jaxen</groupId>
+	        <artifactId>jaxen</artifactId>
+	    </dependency>
+	    <dependency>
+	        <groupId>backport-util-concurrent</groupId>
+	        <artifactId>backport-util-concurrent</artifactId>
+	    </dependency>
+	    <dependency>
+	         <groupId>annogen</groupId>
+	         <artifactId>annogen</artifactId>
+	    </dependency>
+	    <dependency>
+		    <groupId>org.apache.woden</groupId>
+		    <artifactId>woden</artifactId>
+	    </dependency>
+	    <dependency>
+	          <groupId>javax.xml.bind</groupId>
+	          <artifactId>jaxb-api</artifactId>
+	    </dependency>
 	</dependencies>
+	
 	<build>
 		<plugins>
 			<plugin>

Modified: geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java?view=diff&rev=511793&r1=511792&r2=511793
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
Mon Feb 26 04:51:56 2007
@@ -109,7 +109,7 @@
             
             if(portInfo.getWsdlDefinition() != null){ //WSDL Has been provided
                 AxisServiceGenerator serviceGen = new AxisServiceGenerator();
-                service = serviceGen.getServiceFromWSDL(portInfo, endpointClassName, portInfo.getWsdlDefinition(),
classLoader);
+                service = serviceGen.getServiceFromWSDL(portInfo, endpointClassName, classLoader);
                                             
             }else { //No WSDL, Axis2 will handle it. Is it ?
                 service = AxisService.createService(endpointClassName, configurationContext.getAxisConfiguration(),
JAXWSMessageReceiver.class);

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=511793&r1=511792&r2=511793
==============================================================================
--- 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 Feb 26 04:51:56 2007
@@ -81,24 +81,25 @@
         super();
     }
     
-    public AxisService getServiceFromWSDL(org.apache.geronimo.jaxws.PortInfo portInfo, String
endpointClassName, Definition wsdlDefinition, ClassLoader classLoader) throws Exception {
+    public AxisService getServiceFromWSDL(PortInfo portInfo, String endpointClassName, ClassLoader
classLoader) throws Exception {
         WSDLToAxisServiceBuilder wsdlBuilder = null;
         WSDLFactory factory = WSDLFactory.newInstance();
         WSDLWriter writer = factory.newWSDLWriter();
         
+        Definition wsdlDefinition = portInfo.getWsdlDefinition();
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         writer.writeWSDL(wsdlDefinition, out);
         String wsdlContent = out.toString(WSDL_ENCODING); //Will the Axis2 give us this information
soon ?
         
-           OMNamespace documentElementNS = ((OMElement)XMLUtils.toOM(new StringReader(wsdlContent))).getNamespace();
+        OMNamespace documentElementNS = ((OMElement)XMLUtils.toOM(new StringReader(wsdlContent))).getNamespace();
            
-           Map<QName, Service> serviceMap = wsdlDefinition.getServices();
+        Map<QName, Service> serviceMap = wsdlDefinition.getServices();
         Service wsdlService = serviceMap.values().iterator().next();
         
         Map<String, Port> portMap = wsdlService.getPorts();
         Port port = portMap.values().iterator().next();
         String portName = port.getName();
-           QName serviceQName = wsdlService.getQName();
+        QName serviceQName = wsdlService.getQName();
 
            //Decide WSDL Version : 
         if(WSDLConstants.WSDL20_2006Constants.DEFAULT_NAMESPACE_URI.equals(documentElementNS.getNamespaceURI())){
@@ -125,26 +126,26 @@
         serviceAnnot.setName(service.getName());
         serviceAnnot.setTargetNamespace(service.getTargetNamespace());
       
-            Class endPointClass = classLoader.loadClass(endpointClassName);
-         Method[] classMethods = endPointClass.getMethods();
+        Class endPointClass = classLoader.loadClass(endpointClassName);
+        Method[] classMethods = endPointClass.getMethods();
          
-            for(Iterator<AxisOperation> opIterator = service.getOperations() ; opIterator.hasNext()
;){
-                AxisOperation operation = opIterator.next();
-                operation.setMessageReceiver(JAXWSMessageReceiver.class.newInstance());
-                
-                for(Method method : classMethods){
-                    String axisOpName = operation.getName().getLocalPart();
-                    if(method.getName().equals(axisOpName)){
-                        fillOperationInformation(method, operation, dbc);
-                    }
-                }
-            }
+        for (Iterator<AxisOperation> opIterator = service.getOperations(); opIterator.hasNext();)
{
+			AxisOperation operation = opIterator.next();
+			operation.setMessageReceiver(JAXWSMessageReceiver.class.newInstance());
+
+			for (Method method : classMethods) {
+				String axisOpName = operation.getName().getLocalPart();
+				if (method.getName().equals(axisOpName)) {
+					fillOperationInformation(method, operation, dbc);
+				}
+			}
+		}
         
         dbc.setWebServiceAnnot(serviceAnnot);
-            dbc.setWsdlDefinition(wsdlDefinition);
-            dbc.setClassName(endpointClassName);
-            dbc.setCustomWsdlGenerator(new WSDLGeneratorImpl(wsdlDefinition));
-            dbcMap.put(endpointClassName, dbc);
+        dbc.setWsdlDefinition(wsdlDefinition);
+        dbc.setClassName(endpointClassName);
+        dbc.setCustomWsdlGenerator(new WSDLGeneratorImpl(wsdlDefinition));
+        dbcMap.put(endpointClassName, dbc);
         List<ServiceDescription> serviceDescList = DescriptionFactory.createServiceDescriptionFromDBCMap(dbcMap);
         ServiceDescription sd = serviceDescList.get(0);
         Parameter serviceDescription = new Parameter(EndpointDescription.AXIS_SERVICE_PARAMETER,
sd.getEndpointDescriptions()[0]);
@@ -205,7 +206,7 @@
                      }
                  }
                  
-                 ParameterDescriptionComposite pdc = new ParameterDescriptionComposite();
+                ParameterDescriptionComposite pdc = new ParameterDescriptionComposite();
                 WebParamAnnot webParamAnnot = WebParamAnnot.createWebParamAnnotImpl();
             
                 webParamAnnot.setName(element.getName());
@@ -214,8 +215,8 @@
                 Class[] paramTypes = method.getParameterTypes();
                     
                 for(Class paramType : paramTypes){
-                        String strParamType = paramType.toString();
-                        pdc.setParameterType(strParamType.split(" ")[1]);
+                    String strParamType = paramType.toString();
+                    pdc.setParameterType(strParamType.split(" ")[1]);
                 }
                     
                 mdc.addParameterDescriptionComposite(pdc);
@@ -260,14 +261,14 @@
                          }
                      }
                      
-                     WebResultAnnot webResult = WebResultAnnot.createWebResultAnnotImpl();
+                    WebResultAnnot webResult = WebResultAnnot.createWebResultAnnotImpl();
                     webResult.setName(element.getName());
                     mdc.setWebResultAnnot(webResult);
 
                     ResponseWrapperAnnot responseWrap = ResponseWrapperAnnot.createResponseWrapperAnnotImpl();
-                     responseWrap.setClassName(getWrapperClassName(outAxisMessage.getElementQName()));
-                     mdc.setResponseWrapperAnnot(responseWrap);
-                     }
+                    responseWrap.setClassName(getWrapperClassName(outAxisMessage.getElementQName()));
+                    mdc.setResponseWrapperAnnot(responseWrap);
+                   }
                  
                  }
          }

Modified: geronimo/server/trunk/modules/geronimo-axis2/src/test/java/org/apache/geronimo/axis2/Axis2WebServiceContainerTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/src/test/java/org/apache/geronimo/axis2/Axis2WebServiceContainerTest.java?view=diff&rev=511793&r1=511792&r2=511793
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/src/test/java/org/apache/geronimo/axis2/Axis2WebServiceContainerTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis2/src/test/java/org/apache/geronimo/axis2/Axis2WebServiceContainerTest.java
Mon Feb 26 04:51:56 2007
@@ -65,13 +65,12 @@
             Axis2Response res = new Axis2Response("text/xml; charset=utf-8", "127.0.0.1",
null, null, 8080, out);
             
             String endpointClassName = "org.apache.geronimo.axis2.testdata.HelloWorld";
-            
             Axis2WebServiceContainer container = new Axis2WebServiceContainer(portInfo, endpointClassName,
cl , null, null);
             container.invoke(req, res);
-
             out.flush();
      
-        } catch(Exception ex){
+        } catch(Throwable ex){    
+        	ex.printStackTrace();
             throw new Exception(ex.toString());
         }finally {
             if (in != null) {



Mime
View raw message