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 ch...@apache.org on 2006/06/16 07:22:35 UTC

svn commit: r414741 - in /webservices/axis2/trunk/java/modules: adb-codegen/test-resources/wsdl20/ core/src/org/apache/axis2/description/

Author: chinthaka
Date: Thu Jun 15 22:22:35 2006
New Revision: 414741

URL: http://svn.apache.org/viewvc?rev=414741&view=rev
Log:
- fixed the WSDL2 generator as it was not generating Input and Output elements
- updated the wsoap namespace of the sample wsdl
- removed commented lines.

Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/test-resources/wsdl20/HotelReservationService.wsdl
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WSDL2.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java

Modified: webservices/axis2/trunk/java/modules/adb-codegen/test-resources/wsdl20/HotelReservationService.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/test-resources/wsdl20/HotelReservationService.wsdl?rev=414741&r1=414740&r2=414741&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/test-resources/wsdl20/HotelReservationService.wsdl (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/test-resources/wsdl20/HotelReservationService.wsdl Thu Jun 15 22:22:35 2006
@@ -4,7 +4,7 @@
     targetNamespace= "http://greath.example.com/2004/wsdl/resSvc"
     xmlns:tns= "http://greath.example.com/2004/wsdl/resSvc"
     xmlns:ghns = "http://greath.example.com/2004/schemas/resSvc"
-    xmlns:wsoap= "http://www.w3.org/2004/08/wsdl/soap12"
+    xmlns:wsoap= "http://www.w3.org/2006/01/wsdl/soap"
     xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
 
   <documentation>

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WSDL2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WSDL2.java?rev=414741&r1=414740&r2=414741&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WSDL2.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2WSDL2.java Thu Jun 15 22:22:35 2006
@@ -7,6 +7,7 @@
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.om.util.StAXUtils;
 import org.apache.axis2.namespace.Constants;
+import org.apache.axis2.wsdl.WSDL20Constants;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.ws.commons.schema.XmlSchema;
 
@@ -145,52 +146,52 @@
         Iterator operations = axisService.getOperations();
         while (operations.hasNext()) {
             AxisOperation axisOperation = (AxisOperation) operations.next();
-            if (axisOperation.isControlOperation()) {
-                continue;
-            }
-            String operationName = axisOperation.getName().getLocalPart();
-            OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME,
-                    null);
-            interfaceElement.addChild(operation);
-            operation.addAttribute(ATTRIBUTE_NAME, operationName, null);
-            String MEP = axisOperation.getMessageExchangePattern();
-            operation.addAttribute(ATTRIBUTE_NAME_PATTERN, getUpdatedMEP(MEP), null);
-            //TODO need to add : style="http://www.w3.org/2006/01/wsdl/style/iri"
-            //TODO need to add : swsdlx:safe = "true"
-            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) {
-                    OMElement input = fac.createOMElement(IN_PUT_LOCAL_NAME,
-                            null);
-                    input.addAttribute(MESSAGE_LABEL, WSDLConstants.MESSAGE_LABEL_IN_VALUE, null);
-                    operation.addChild(input);
-                    addMessageElementAtt(input, inaxisMessage);
+            if (!axisOperation.isControlOperation()) {
+
+                String operationName = axisOperation.getName().getLocalPart();
+                OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME,
+                        null);
+                interfaceElement.addChild(operation);
+                operation.addAttribute(ATTRIBUTE_NAME, operationName, null);
+                String MEP = axisOperation.getMessageExchangePattern();
+                operation.addAttribute(ATTRIBUTE_NAME_PATTERN, getUpdatedMEP(MEP), null);
+                //TODO need to add : style="http://www.w3.org/2006/01/wsdl/style/iri"
+                //TODO need to add : swsdlx:safe = "true"
+                if (WSDL20Constants.MEP_URI_IN_ONLY.equals(MEP)
+                        || WSDL20Constants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP)
+                        || WSDL20Constants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP)
+                        || WSDL20Constants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP)
+                        || WSDL20Constants.MEP_URI_ROBUST_IN_ONLY.equals(MEP)
+                        || WSDL20Constants.MEP_URI_IN_OUT.equals(MEP)) {
+                    AxisMessage inaxisMessage = axisOperation
+                            .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+                    if (inaxisMessage != null) {
+                        OMElement input = fac.createOMElement(IN_PUT_LOCAL_NAME,
+                                null);
+                        input.addAttribute(MESSAGE_LABEL, WSDLConstants.MESSAGE_LABEL_IN_VALUE, null);
+                        operation.addChild(input);
+                        addMessageElementAtt(input, inaxisMessage);
+                    }
                 }
-            }
 
-            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) {
-                    OMElement output = fac.createOMElement(OUT_PUT_LOCAL_NAME,
-                            null);
-                    operation.addChild(output);
-                    output.addAttribute(MESSAGE_LABEL, WSDLConstants.MESSAGE_LABEL_OUT_VALUE, null);
-                    addMessageElementAtt(output, outAxisMessage);
+                if (WSDL20Constants.MEP_URI_OUT_ONLY.equals(MEP)
+                        || WSDL20Constants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP)
+                        || WSDL20Constants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP)
+                        || WSDL20Constants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP)
+                        || WSDL20Constants.MEP_URI_ROBUST_IN_ONLY.equals(MEP)
+                        || WSDL20Constants.MEP_URI_IN_OUT.equals(MEP)) {
+                    AxisMessage outAxisMessage = axisOperation
+                            .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
+                    if (outAxisMessage != null) {
+                        OMElement output = fac.createOMElement(OUT_PUT_LOCAL_NAME,
+                                null);
+                        operation.addChild(output);
+                        output.addAttribute(MESSAGE_LABEL, WSDLConstants.MESSAGE_LABEL_OUT_VALUE, null);
+                        addMessageElementAtt(output, outAxisMessage);
+                    }
                 }
+                addInterfaceOperationFault(operation, fac, axisOperation);
             }
-            addInterfaceOperationFault(operation, fac, axisOperation);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java?rev=414741&r1=414740&r2=414741&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java Thu Jun 15 22:22:35 2006
@@ -136,7 +136,6 @@
 //                axisService.setServiceDescription(documentationElements[0].getContent().toString());
 //            }
 
-
             // adding ns in the original WSDL
             // processPoliciesInDefintion(wsdl4jDefinition); TODO : Defering policy handling for now - Chinthaka
             // policy support
@@ -214,67 +213,6 @@
             Interface serviceInterface = binding.getInterface();
 
             processInterface(serviceInterface, description);
-
-//            BindingOperation[] bindingOperations = binding.getBindingOperations();
-//            for(int i=0; i<bindingOperations.length; i++){
-//                BindingOperation bindingOperation = bindingOperations[i];
-//                
-//                bindingOperation.get
-//            }
-
-            // List list = binding.getBindingOperations();
-            //
-            // for (int i = 0; i < list.size(); i++) {
-            // BindingOperation wsdl4jBindingOperation = (BindingOperation) list
-            // .get(i);
-            // AxisOperation operation = axisService.getOperation(new QName(
-            // wsdl4jBindingOperation.getName()));
-            // copyExtensibleElements(wsdl4jBindingOperation
-            // .getExtensibilityElements(), dif, operation,
-            // BINDING_OPERATION);
-            //
-            // BindingInput bindingInput = wsdl4jBindingOperation
-            // .getBindingInput();
-            // BindingOutput bindingOutput = wsdl4jBindingOperation
-            // .getBindingOutput();
-            // String MEP = operation.getMessageExchangePattern();
-            // if (bindingInput != null) {
-            // 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 inMessage = operation
-            // .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
-            // copyExtensibleElements(bindingInput
-            // .getExtensibilityElements(), dif, inMessage,
-            // BINDING_OPERATION_INPUT);
-            //
-            // }
-            // }
-            // if (bindingOutput != 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 = operation
-            // .getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
-            // copyExtensibleElements(bindingOutput
-            // .getExtensibilityElements(), dif,
-            // outAxisMessage, BINDING_OPERATION_OUTPUT);
-            //
-            // }
-            // }
-            // }
 
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org