axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r355560 - in /webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/context/ConfigurationContextFactory.java wsdl/src/org/apache/axis2/wsdl/java2wsdl/Java2WSDL.java wsdl/src/org/apache/axis2/wsdl/java2wsdl/SchemaGenerator.java
Date Fri, 09 Dec 2005 18:11:51 GMT
Author: deepal
Date: Fri Dec  9 10:11:39 2005
New Revision: 355560

URL: http://svn.apache.org/viewcvs?rev=355560&view=rev
Log:
fixing transport init problem in JMS

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
    webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/Java2WSDL.java
    webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/SchemaGenerator.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java?rev=355560&r1=355559&r2=355560&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
Fri Dec  9 10:11:39 2005
@@ -11,12 +11,15 @@
 import org.apache.axis2.phaseresolver.PhaseResolver;
 import org.apache.axis2.transport.TransportListener;
 import org.apache.axis2.transport.TransportSender;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 
 public class ConfigurationContextFactory {
+    private Log log = LogFactory.getLog(getClass());
 
     /**
      * Builds the configuration for the Server.
@@ -102,10 +105,8 @@
      * Initializes TransportSenders and TransportListeners with appropriate configuration
information
      *
      * @param configContext
-     * @throws AxisFault
      */
-    public void initTransports(ConfigurationContext configContext)
-            throws AxisFault {
+    public void initTransports(ConfigurationContext configContext) {
         AxisConfiguration axisConf = configContext.getAxisConfiguration();
 
         //Initzialize Transport Ins
@@ -116,7 +117,12 @@
                     (TransportInDescription) values.next();
             TransportListener listener = transportIn.getReceiver();
             if (listener != null) {
-                listener.init(configContext, transportIn);
+                try {
+                    listener.init(configContext, transportIn);
+                } catch (AxisFault axisFault) {
+                    log.info("Transport-IN initialization error : " +
+                            transportIn.getName().getLocalPart());
+                }
             }
         }
         //Initzialize Transport Outs
@@ -127,7 +133,12 @@
                     (TransportOutDescription) values.next();
             TransportSender sender = transportOut.getSender();
             if (sender != null) {
-                sender.init(configContext, transportOut);
+                try {
+                    sender.init(configContext, transportOut);
+                } catch (AxisFault axisFault) {
+                    log.info("Transport-OUT initialization error : " +
+                            transportOut.getName().getLocalPart());
+                }
             }
         }
 

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/Java2WSDL.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/Java2WSDL.java?rev=355560&r1=355559&r2=355560&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/Java2WSDL.java
(original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/Java2WSDL.java
Fri Dec  9 10:11:39 2005
@@ -39,13 +39,21 @@
     }
 
     public void generateWSDL() throws Exception {
-        SchemaGenerator sg = new SchemaGenerator(classLoader, className,null,null);
+        SchemaGenerator sg = new SchemaGenerator(classLoader, className, null, null);
         XmlSchema scheam = sg.generateSchema();
         WSDLDescription wommodel = new Java2WOM(
-                sg.getTypeTable(), sg.getMethods(), scheam, className,null,null).generateWOM();
+                sg.getTypeTable(), sg.getMethods(), scheam, simpleClassName(className), null,
null).generateWOM();
         WOMWriter womWriter = WOMWriterFactory.createWriter(WSDLConstants.WSDL_1_1);
         womWriter.setdefaultWSDLPrefix("wsdl");
         womWriter.writeWOM(wommodel, out);
 
+    }
+
+    private String simpleClassName(String qualifiedName) {
+        int index = qualifiedName.lastIndexOf(".");
+        if (index > 0) {
+            return qualifiedName.substring(index + 1, qualifiedName.length());
+        }
+        return qualifiedName;
     }
 }

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/SchemaGenerator.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/SchemaGenerator.java?rev=355560&r1=355559&r2=355560&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/SchemaGenerator.java
(original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/java2wsdl/SchemaGenerator.java
Fri Dec  9 10:11:39 2005
@@ -243,7 +243,7 @@
             }
             if (typeTable.isSimpleType(classTypeName)) {
                 XmlSchemaElement elt1 = new XmlSchemaElement();
-                elt1.setName(retuenType.getSimpleName());
+                elt1.setName("return");
                 elt1.setSchemaTypeName(typeTable.getSimpleSchemaTypeName(classTypeName));
                 sequence.getItems().add(elt1);
                 if (isArryType) {
@@ -251,7 +251,7 @@
                 }
             } else {
                 XmlSchemaElement elt1 = new XmlSchemaElement();
-                elt1.setName(methodName);
+                elt1.setName("return");
                 elt1.setSchemaTypeName(typeTable.getComplexScheamType(classTypeName));
                 sequence.getItems().add(elt1);
                 if (isArryType) {
@@ -271,9 +271,7 @@
             XmlSchemaSequence sequence = new XmlSchemaSequence();
 
             XmlSchemaElement eltOuter = new XmlSchemaElement();
-//            QName elemntName = new QName(SCHEMA_TARGET_NAMESPASE, simpleName + "Wrapper",
SCHEMA_NAMESPASE_PRFIX);
             QName elemntName = new QName(SCHEMA_TARGET_NAMESPASE, simpleName, SCHEMA_NAMESPASE_PRFIX);
-//            eltOuter.setName(simpleName + "Wrapper");
             eltOuter.setName(simpleName);
             eltOuter.setQName(elemntName);
             complexType.setParticle(sequence);



Mime
View raw message