axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r389678 - in /webservices/axis2/trunk/java: ./ modules/core/src/org/apache/axis2/description/ modules/core/src/org/apache/axis2/engine/ modules/java2wsdl/src/org/apache/ws/java2wsdl/
Date Wed, 29 Mar 2006 05:14:29 GMT
Author: deepal
Date: Tue Mar 28 21:14:21 2006
New Revision: 389678

URL: http://svn.apache.org/viewcvs?rev=389678&view=rev
Log:
- added java2wsdl module for dist-bin and min-bin
- small fixing for Java2WSDL

Modified:
    webservices/axis2/trunk/java/maven.xml
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperationFactory.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
    webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Constants.java

Modified: webservices/axis2/trunk/java/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/maven.xml?rev=389678&r1=389677&r2=389678&view=diff
==============================================================================
--- webservices/axis2/trunk/java/maven.xml (original)
+++ webservices/axis2/trunk/java/maven.xml Tue Mar 28 21:14:21 2006
@@ -358,6 +358,7 @@
         <ant:mkdir dir="target/temp/war/lib"/>
         <!-- Create axis2-core.jar -->
         <jar destfile="target/temp/war/lib/axis2-kernel-${pom.currentVersion}.jar">
+            <fileset dir="modules/java2wsdl/target/classes"/>
             <fileset dir="modules/core/target/classes/"/>
             <fileset dir="modules/common/target/classes/"/>
             <fileset dir="modules/wsdl/target/classes/"/>
@@ -377,6 +378,7 @@
         
         <!-- Create axis2-core.jar -->
         <jar destfile="target/temp/war/lib/axis2-kernel-${pom.currentVersion}.jar">
+            <fileset dir="modules/java2wsdl/target/classes"/>
             <fileset dir="modules/core/target/classes/"/>
             <fileset dir="modules/common/target/classes/"/>
             <fileset dir="modules/wsdl/target/classes/"/>
@@ -512,6 +514,7 @@
 
         <!-- Create axis2-core.jar -->
         <jar destfile="target/temp/min/bin/lib/axis2-kernel-${pom.currentVersion}.jar">
+            <fileset dir="modules/java2wsdl/target/classes"/>
             <fileset dir="modules/core/target/classes/"/>
             <fileset dir="modules/common/target/classes/"/>
             <fileset dir="modules/wsdl/target/classes/"/>
@@ -543,6 +546,7 @@
         <ant:copy toDir="target/temp/min/src">
             <ant:fileset dir=".">
                 <ant:include name="**/etc/**"/>
+                <ant:include name="**/modules/java2wsdl/**"/>
                 <ant:include name="**/modules/core/**"/>
                 <ant:include name="**/modules/common/**"/>
                 <ant:include name="**/modules/wsdl/**"/>
@@ -616,6 +620,7 @@
 
         <!-- Create axis2-core.jar -->
         <jar destfile="${std.bin.temp.dir}/lib/axis2-kernel-${pom.currentVersion}.jar">
+            <fileset dir="modules/java2wsdl/target/classes/"/>
             <fileset dir="modules/core/target/classes/"/>
             <fileset dir="modules/common/target/classes/"/>
             <fileset dir="modules/wsdl/target/classes/"/>
@@ -671,6 +676,7 @@
         <ant:copy toDir="${std.src.temp.dir}">
             <ant:fileset dir=".">
                 <ant:include name="**/etc/**"/>
+                <ant:include name="**/modules/java2wsdl/**"/>
                 <ant:include name="**/modules/core/**"/>
                 <ant:include name="**/modules/common/**"/>
                 <ant:include name="**/modules/wsdl/**"/>
@@ -801,6 +807,7 @@
                 <ant:pathelement location="modules/adb/src"/>
                 <ant:pathelement location="modules/addressing/src"/>
                 <ant:pathelement location="modules/codegen/src"/>
+                <ant:pathelement location="modules/java2wsdl/src"/>
                 <ant:pathelement location="modules/common/src"/>
                 <ant:pathelement location="modules/core/src"/>
                 <ant:pathelement location="modules/doom/src"/>
@@ -883,6 +890,7 @@
 
         <!-- Create axis2-core.jar -->
         <jar destfile="${destdir}/axis2-kernel-${pom.currentVersion}.jar">
+            <fileset dir="modules/java2wsdl/target/classes/"/>
             <fileset dir="modules/core/target/classes/"/>
             <fileset dir="modules/common/target/classes/"/>
             <fileset dir="modules/wsdl/target/classes/"/>
@@ -896,6 +904,7 @@
             <ant:fileset file="modules/doom/target/axis2-doom-${pom.currentVersion}.jar"/>
             <ant:fileset file="modules/codegen/target/axis2-codegen-${pom.currentVersion}.jar"/>
             <ant:fileset file="modules/jibx/target/axis2-jibx-${pom.currentVersion}.jar"/>
+            <ant:fileset file="modules/java2wsdl/target/axis2-java2wsdl-${pom.currentVersion}.jar"/>
         </ant:copy>
     </goal>
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperationFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperationFactory.java?rev=389678&r1=389677&r2=389678&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperationFactory.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperationFactory.java
Tue Mar 28 21:14:21 2006
@@ -91,7 +91,9 @@
             abOpdesc = new OutInAxisOperation();
         } else if (MEP_URI_ROBUST_OUT_ONLY.equals(mepURI)) {
             abOpdesc = new OutInAxisOperation();
-        } else {
+        } else if (MEP_URI_ROBUST_IN_ONLY.equals(mepURI)) {
+            abOpdesc = new InOutAxisOperation();
+        }else {
             throw new AxisFault(Messages.getMessage("unSupportedMEP", "ID is " + mepURI));
         }
         abOpdesc.setMessageExchangePattern(mepURI);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java?rev=389678&r1=389677&r2=389678&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
Tue Mar 28 21:14:21 2006
@@ -6,7 +6,9 @@
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.ws.commons.schema.XmlSchema;
+import org.apache.wsdl.WSDLConstants;
 
+import javax.xml.namespace.QName;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import java.io.ByteArrayInputStream;
@@ -39,7 +41,6 @@
     private String [] url;
 
     private String targetNamespace;
-    private OMNamespace ns1;
     private OMNamespace soap;
     private OMNamespace tns;
     private OMNamespace wsdl;
@@ -72,7 +73,7 @@
         wsdl = fac.createOMNamespace(WSDL_NAMESPACE,
                 DEFAULT_WSDL_NAMESPACE_PREFIX);
         OMElement ele = fac.createOMElement("definitions", wsdl);
-        ns1 = ele.declareNamespace(AXIS2_XSD, "ns1");
+        ele.declareNamespace(AXIS2_XSD, "ns1");
         ele.declareNamespace(SCHEMA_NAME_SPACE, DEFAULT_SCHEMA_NAMESPACE_PREFIX);
         soap = ele.declareNamespace(DEFAULT_SOAP_NAMESPACE, DEFAULT_SOAP_NAMESPACE_PREFIX);
         tns = ele.declareNamespace(DEFAULT_TARGET_NAMESPACE, TARGETNAMESPACE_PREFIX);
@@ -99,28 +100,52 @@
         Iterator operations = axisService.getOperations();
         while (operations.hasNext()) {
             AxisOperation axisOperation = (AxisOperation) operations.next();
-            String operationName = axisOperation.getName().getLocalPart();
-            //Request Message
-            OMElement requestMessge = fac.createOMElement(MESSAGE_LOCAL_NAME, wsdl);
-            requestMessge.addAttribute(ATTRIBUTE_NAME, operationName
-                    + REQUEST_MESSAGE, null);
-            defintions.addChild(requestMessge);
-            OMElement requestPart = fac.createOMElement(PART_ATTRIBUTE_NAME, wsdl);
-            requestMessge.addChild(requestPart);
-            requestPart.addAttribute(ATTRIBUTE_NAME, "part1", null);
-            requestPart.addAttribute(ELEMENT_ATTRIBUTE_NAME,
-                    ns1.getPrefix() + ":" + operationName
-                            + REQUEST, null);
-            //Response Message
-            OMElement responseMessge = fac.createOMElement(MESSAGE_LOCAL_NAME, wsdl);
-            responseMessge.addAttribute(ATTRIBUTE_NAME,
-                    operationName + RESPONSE_MESSAGE, null);
-            defintions.addChild(responseMessge);
-            OMElement responsePart = fac.createOMElement(PART_ATTRIBUTE_NAME, wsdl);
-            responseMessge.addChild(responsePart);
-            responsePart.addAttribute(ATTRIBUTE_NAME, "part1", null);
-            responsePart.addAttribute(ELEMENT_ATTRIBUTE_NAME,
-                    ns1.getPrefix() + ":" + operationName + RESPONSE, null);
+
+            String MEP = axisOperation.getMessageExchangePattern();
+            if (WSDLConstants.MEP_URI_IN_ONLY.equals(MEP) ||
+                    WSDLConstants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP) ||
+                    WSDLConstants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP) ||
+                    WSDLConstants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP) ||
+                    WSDLConstants.MEP_URI_ROBUST_IN_ONLY.equals(MEP) ||
+                    WSDLConstants.MEP_URI_IN_OUT.equals(MEP)) {
+                AxisMessage inaxisMessage = axisOperation
+                        .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+                if (inaxisMessage != null) {
+                    QName scheamElementName = inaxisMessage.getElementQName();
+                    OMElement requestMessge = fac.createOMElement(MESSAGE_LOCAL_NAME, wsdl);
+                    requestMessge.addAttribute(ATTRIBUTE_NAME, scheamElementName.getLocalPart()
+                            + MESSAGE_SUFFIX, null);
+                    defintions.addChild(requestMessge);
+                    OMElement requestPart = fac.createOMElement(PART_ATTRIBUTE_NAME, wsdl);
+                    requestMessge.addChild(requestPart);
+                    requestPart.addAttribute(ATTRIBUTE_NAME, "part1", null);
+                    requestPart.addAttribute(ELEMENT_ATTRIBUTE_NAME,
+                            scheamElementName.getPrefix() + ":" + scheamElementName.getLocalPart()
+                                    + REQUEST, null);
+                }
+            }
+
+            if (WSDLConstants.MEP_URI_OUT_ONLY.equals(MEP) ||
+                    WSDLConstants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP) ||
+                    WSDLConstants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP) ||
+                    WSDLConstants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP) ||
+                    WSDLConstants.MEP_URI_ROBUST_IN_ONLY.equals(MEP) ||
+                    WSDLConstants.MEP_URI_IN_OUT.equals(MEP)) {
+                AxisMessage outAxisMessage = axisOperation
+                        .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
+                if (outAxisMessage != null) {
+                    QName scheamElementName = outAxisMessage.getElementQName();
+                    OMElement responseMessge = fac.createOMElement(MESSAGE_LOCAL_NAME, wsdl);
+                    responseMessge.addAttribute(ATTRIBUTE_NAME,
+                            scheamElementName.getLocalPart() + MESSAGE_SUFFIX, null);
+                    defintions.addChild(responseMessge);
+                    OMElement responsePart = fac.createOMElement(PART_ATTRIBUTE_NAME, wsdl);
+                    responseMessge.addChild(responsePart);
+                    responsePart.addAttribute(ATTRIBUTE_NAME, "part1", null);
+                    responsePart.addAttribute(ELEMENT_ATTRIBUTE_NAME,
+                            scheamElementName.getPrefix() + ":" + scheamElementName.getLocalPart()
+ RESPONSE, null);
+                }
+            }
         }
     }
 
@@ -138,21 +163,48 @@
             AxisOperation axisOperation = (AxisOperation) operations.next();
             if (axisOperation.isControlOperation()) {
                 continue;
+
             }
+
             String operationName = axisOperation.getName().getLocalPart();
             OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME, wsdl);
             portType.addChild(operation);
             operation.addAttribute(ATTRIBUTE_NAME, operationName, null);
 
-            OMElement input = fac.createOMElement(IN_PUT_LOCAL_NAME, wsdl);
-            input.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix() + ":"
-                    + operationName + REQUEST_MESSAGE, null);
-            operation.addChild(input);
-
-            OMElement output = fac.createOMElement(OUT_PUT_LOCAL_NAME, wsdl);
-            output.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix() + ":"
-                    + operationName + RESPONSE_MESSAGE, null);
-            operation.addChild(output);
+            String MEP = axisOperation.getMessageExchangePattern();
+            if (WSDLConstants.MEP_URI_IN_ONLY.equals(MEP) ||
+                    WSDLConstants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP) ||
+                    WSDLConstants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP) ||
+                    WSDLConstants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP) ||
+                    WSDLConstants.MEP_URI_ROBUST_IN_ONLY.equals(MEP) ||
+                    WSDLConstants.MEP_URI_IN_OUT.equals(MEP)) {
+                AxisMessage inaxisMessage = axisOperation
+                        .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+                if (inaxisMessage != null) {
+                    QName scheamElementName = inaxisMessage.getElementQName();
+                    OMElement input = fac.createOMElement(IN_PUT_LOCAL_NAME, wsdl);
+                    input.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix() + ":"
+                            + scheamElementName.getLocalPart() + MESSAGE_SUFFIX, null);
+                    operation.addChild(input);
+                }
+            }
+
+            if (WSDLConstants.MEP_URI_OUT_ONLY.equals(MEP) ||
+                    WSDLConstants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP) ||
+                    WSDLConstants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP) ||
+                    WSDLConstants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP) ||
+                    WSDLConstants.MEP_URI_ROBUST_IN_ONLY.equals(MEP) ||
+                    WSDLConstants.MEP_URI_IN_OUT.equals(MEP)) {
+                AxisMessage outAxisMessage = axisOperation
+                        .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
+                if (outAxisMessage != null) {
+                    QName scheamElementName = outAxisMessage.getElementQName();
+                    OMElement output = fac.createOMElement(OUT_PUT_LOCAL_NAME, wsdl);
+                    output.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix() + ":"
+                            + scheamElementName.getLocalPart() + MESSAGE_SUFFIX, null);
+                    operation.addChild(output);
+                }
+            }
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java?rev=389678&r1=389677&r2=389678&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
Tue Mar 28 21:14:21 2006
@@ -124,6 +124,15 @@
     }
 
     /**
+     * To remove a given module from the system
+     * @param module
+     */
+    public void removeModule(AxisModule module) {
+        allModules.remove(module);
+        //TODO dis-engage has to be done here
+    }
+
+    /**
      * Adds module configuration, if there is moduleConfig tag in service.
      *
      * @param moduleConfiguration

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Constants.java?rev=389678&r1=389677&r2=389678&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Constants.java
(original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Constants.java
Tue Mar 28 21:14:21 2006
@@ -38,6 +38,7 @@
     String ATTRIBUTE_NAME = "name";
     String REQUEST_MESSAGE = "RequestMessage";
     String RESPONSE_MESSAGE = "ReponseMessage";
+    String MESSAGE_SUFFIX = "Message";
     String REQUEST = "Request";
     String RESPONSE = "Reponse";
     String PORT_TYPE_LOCAL_NAME = "portType";



Mime
View raw message