axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prad...@apache.org
Subject svn commit: r600141 [5/10] - in /webservices/axis2/branches/java/jaxws21/modules: adb-codegen/ adb-codegen/src/org/apache/axis2/schema/ adb-codegen/src/org/apache/axis2/schema/template/ adb-codegen/src/org/apache/axis2/schema/util/ adb-codegen/src/org/...
Date Sat, 01 Dec 2007 14:43:54 GMT
Modified: webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java Sat Dec  1 06:43:28 2007
@@ -154,9 +154,9 @@
         mepToClassMap.put(WSDL2Constants.MEP_URI_IN_ONLY,
                 "org.apache.axis2.receivers.AbstractInMessageReceiver");
         mepToClassMap.put(WSDL2Constants.MEP_URI_ROBUST_IN_ONLY,
-                "org.apache.axis2.receivers.AbstractRobustInMessageReceiver");
+                "org.apache.axis2.receivers.AbstractMessageReceiver");
         mepToClassMap.put(WSDL2Constants.MEP_URI_IN_OUT,
-                "org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver");
+                "org.apache.axis2.receivers.AbstractInOutMessageReceiver");
 
         //populate the MEP -> suffix map
         mepToSuffixMap = new HashMap();
@@ -269,13 +269,8 @@
         return property;
     }
     
-    private Policy getBindingPolicyFromMessage(QName qName, String key) {
-
-        AxisBindingOperation axisBindingOperation = null;
-        if (axisBinding != null) {
-            axisBindingOperation = (AxisBindingOperation) axisBinding.getChild(qName);
-        }
-
+    private Policy getBindingPolicyFromMessage(AxisBindingOperation axisBindingOperation,
+                                               String key) {
         AxisBindingMessage axisBindingMessage = null;
         
         if (axisBindingOperation != null) {
@@ -285,7 +280,6 @@
                 try {
                     return axisBindingMessage.getEffectivePolicy();
                 } catch (RuntimeException ex){
-                    System.out.println("ERROR: Ignoring policy - " + ex.getMessage());
                     log.error(ex.getMessage(), ex);
                 }
             }
@@ -848,7 +842,7 @@
 
         //////////////////////////////////////////////////////////
 //        System.out.println(DOM2Writer.nodeToString(rootElement));
-        ////////////////////////////////////////////////////////////
+        ////////////////////////////////////////////////
         return doc;
     }
 
@@ -1596,10 +1590,12 @@
         // First Iterate through the operations and find the relevant fromOM and toOM methods to be generated
         ArrayList parameters = new ArrayList();
 
-
-        for (Iterator operationsIterator = axisService.getOperations();
-             operationsIterator.hasNext();) {
-            AxisOperation axisOperation = (AxisOperation) operationsIterator.next();
+        AxisOperation axisOperation = null;
+        AxisBindingOperation axisBindingOperation = null;
+        for (Iterator bindingOperationsIter = this.axisBinding.getChildren();
+             bindingOperationsIter.hasNext();) {
+            axisBindingOperation = (AxisBindingOperation) bindingOperationsIter.next();
+            axisOperation = axisBindingOperation.getAxisOperation();
 
             // Add the parameters to a map with their type as the key
             // this step is needed to remove repetitions
@@ -1639,7 +1635,7 @@
             // process the header parameters
             Element newChild;
             List headerParameterQNameList = new ArrayList();
-            addHeaderOperations(headerParameterQNameList, axisOperation, true);
+            addHeaderOperations(headerParameterQNameList, axisBindingOperation, true);
             List parameterElementList = getParameterElementList(doc, headerParameterQNameList,
                     WSDLConstants.SOAP_HEADER);
 
@@ -1650,7 +1646,7 @@
 
             headerParameterQNameList.clear();
             parameterElementList.clear();
-            addHeaderOperations(headerParameterQNameList, axisOperation, false);
+            addHeaderOperations(headerParameterQNameList, axisBindingOperation, false);
             parameterElementList = getParameterElementList(doc, headerParameterQNameList,
                     WSDLConstants.SOAP_HEADER);
 
@@ -1717,9 +1713,10 @@
             }
         }
 
+        axisOperation = null;
         for (Iterator operationsIterator = axisService.getOperations();
              operationsIterator.hasNext();) {
-            AxisOperation axisOperation = (AxisOperation) operationsIterator.next();
+             axisOperation = (AxisOperation) operationsIterator.next();
             details = axisOperation.getParameter(Constants.DATABINDING_OPERATION_DETAILS);
             if (details != null) {
                 rootElement.appendChild(doc.importNode((Element) details.getValue(), true));
@@ -2104,13 +2101,13 @@
         Element methodElement;
         String serviceName = makeJavaClassName(axisService.getName());
 
-        Iterator operationNames = axisService.getOperationsNameList().iterator();
+        Iterator bindingOperations = this.axisBinding.getChildren();
         boolean opsFound = false;
-        QName operationName;
-        while (operationNames.hasNext()) {
-            operationName = (QName) operationNames.next();
-            AxisOperation axisOperation = axisService.getOperation(operationName);
-
+        AxisBindingOperation axisBindingOperation = null;
+        AxisOperation axisOperation = null;
+        while (bindingOperations.hasNext()) {
+            axisBindingOperation = (AxisBindingOperation) bindingOperations.next();
+            axisOperation = axisBindingOperation.getAxisOperation();
             // populate info holder with mep information. This will used in determining which
             // message receiver to use, etc.,
 
@@ -2122,7 +2119,7 @@
 
             if (mep == null) {
                 opsFound = true;
-                methodElement = generateMethodElement(doc, serviceName, axisOperation);
+                methodElement = generateMethodElement(doc, serviceName, axisBindingOperation);
                 rootElement.appendChild(methodElement);
 
             } else {
@@ -2131,7 +2128,7 @@
                 if (mep.equals(axisOperation.getMessageExchangePattern())) {
                     //at this point we know it's true
                     opsFound = true;
-                    methodElement = generateMethodElement(doc, serviceName, axisOperation);
+                    methodElement = generateMethodElement(doc, serviceName, axisBindingOperation);
                     rootElement.appendChild(methodElement);
                     //////////////////////
                 }
@@ -2147,12 +2144,14 @@
      *
      * @param doc
      * @param endpointName
-     * @param axisOperation
+     * @param bindingOperation
      * @return generated element
      * @throws DOMException
      */
-    protected Element generateMethodElement(Document doc, String endpointName,
-                                          AxisOperation axisOperation) throws DOMException {
+    protected Element generateMethodElement(Document doc,
+                                            String endpointName,
+                                            AxisBindingOperation bindingOperation) throws DOMException {
+        AxisOperation axisOperation = bindingOperation.getAxisOperation();
         Element methodElement;
         List soapHeaderInputParameterList = new ArrayList();
         List soapHeaderOutputParameterList = new ArrayList();
@@ -2211,9 +2210,9 @@
             addAttribute(doc, "usdbimpl", "false", methodElement);
         }
 
-        addSOAPAction(doc, methodElement, axisOperation.getName());
+        addSOAPAction(doc, methodElement, bindingOperation.getName());
         addOutputAndFaultActions(doc, methodElement, axisOperation);
-        addHeaderOperations(soapHeaderInputParameterList, axisOperation, true);
+        addHeaderOperations(soapHeaderInputParameterList, bindingOperation, true);
 //        addHeaderOperations(soapHeaderOutputParameterList, axisOperation, false);
         
 
@@ -2231,11 +2230,11 @@
                 }
             }
             methodElement.appendChild(getInputElement(doc,
-                    axisOperation, soapHeaderInputParameterList));
+                    bindingOperation, soapHeaderInputParameterList));
         }
         if (WSDLUtil.isOutputPresentForMEP(messageExchangePattern)) {
             methodElement.appendChild(getOutputElement(doc,
-                    axisOperation,
+                    bindingOperation,
                     soapHeaderOutputParameterList));
         }
         methodElement.appendChild(getFaultElement(doc,
@@ -2588,26 +2587,28 @@
      * populate the header parameters
      *
      * @param soapHeaderParameterQNameList
-     * @param axisOperation
+     * @param bindingOperation
      * @param input
      */
     protected void addHeaderOperations(List soapHeaderParameterQNameList,
-                                       AxisOperation axisOperation,
+                                       AxisBindingOperation bindingOperation,
                                        boolean input) {
+
+        AxisOperation axisOperation = bindingOperation.getAxisOperation();
         ArrayList headerparamList = new ArrayList();
         String MEP = axisOperation.getMessageExchangePattern();
         if (input) {
             if (WSDLUtil.isInputPresentForMEP(MEP)) {
 
                 headerparamList = (ArrayList) getBindingPropertyFromMessage(
-                        WSDL2Constants.ATTR_WSOAP_HEADER, axisOperation.getName(),
+                        WSDL2Constants.ATTR_WSOAP_HEADER, bindingOperation.getName(),
                         WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
 
             }
         } else {
             if (WSDLUtil.isOutputPresentForMEP(MEP)) {
                 headerparamList = (ArrayList) getBindingPropertyFromMessage(
-                        WSDL2Constants.ATTR_WSOAP_HEADER, axisOperation.getName(),
+                        WSDL2Constants.ATTR_WSOAP_HEADER, bindingOperation.getName(),
                         WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
             }
         }
@@ -2651,12 +2652,14 @@
      * Get the input element
      *
      * @param doc
-     * @param operation
+     * @param bindingOperation
      * @param headerParameterQNameList
      * @return DOM element
      */
-    protected Element getInputElement(Document doc, AxisOperation operation,
+    protected Element getInputElement(Document doc,
+                                      AxisBindingOperation bindingOperation,
                                       List headerParameterQNameList) {
+        AxisOperation operation = bindingOperation.getAxisOperation();
         Element inputElt = doc.createElement("input");
         String mep = operation.getMessageExchangePattern();
 
@@ -2688,7 +2691,8 @@
             /*
              * Setting the effective policy of input message
              */
-            Policy policy = getBindingPolicyFromMessage(operation.getName(), WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
+            Policy policy = getBindingPolicyFromMessage(bindingOperation,
+                    WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
 
             if (policy != null) {
                 try {
@@ -2725,11 +2729,13 @@
      * Finds the output element.
      *
      * @param doc
-     * @param operation
+     * @param bindingOperation
      * @param headerParameterQNameList
      */
-    protected Element getOutputElement(Document doc, AxisOperation operation,
+    protected Element getOutputElement(Document doc,
+                                       AxisBindingOperation bindingOperation,
                                        List headerParameterQNameList) {
+        AxisOperation operation = bindingOperation.getAxisOperation();
         Element outputElt = doc.createElement("output");
         String mep = operation.getMessageExchangePattern();
 
@@ -2758,7 +2764,8 @@
             /*
              * Setting the effective policy for the output message.
              */
-            Policy policy = getBindingPolicyFromMessage(operation.getName(), WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
+            Policy policy = getBindingPolicyFromMessage(bindingOperation,
+                    WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
 
             if (policy != null) {
                 try {

Modified: webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/CEmitter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/CEmitter.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/CEmitter.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/CEmitter.java Sat Dec  1 06:43:28 2007
@@ -21,6 +21,7 @@
 import org.apache.axis2.description.AxisMessage;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.PolicyInclude;
+import org.apache.axis2.description.AxisBindingOperation;
 import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.util.PolicyUtil;
 import org.apache.axis2.util.Utils;
@@ -45,6 +46,8 @@
 import java.util.List;
 import java.util.Map;
 
+import com.ibm.wsdl.util.xml.DOM2Writer;
+
 public class CEmitter extends AxisServiceBasedMultiLanguageEmitter {
     protected static final String C_STUB_PREFIX = "axis2_stub_";
     protected static final String C_SKEL_PREFIX = "axis2_skel_";
@@ -253,7 +256,7 @@
         rootElement.appendChild(getUniqueListofFaults(doc));
 
         /////////////////////////////////////////////////////
-        //System.out.println(DOM2Writer.nodeToString(rootElement));
+//        System.out.println(DOM2Writer.nodeToString(rootElement));
         /////////////////////////////////////////////////////
 
 
@@ -348,10 +351,15 @@
         Element methodElement;
         String portTypeName = makeCClassName(axisService.getName());
 
-        Iterator operations = axisService.getOperations();
+        Iterator bindingOperations = this.axisBinding.getChildren();
         boolean opsFound = false;
-        while (operations.hasNext()) {
-            AxisOperation axisOperation = (AxisOperation)operations.next();
+        AxisOperation axisOperation = null;
+        AxisBindingOperation axisBindingOperation = null;
+
+        while (bindingOperations.hasNext()) {
+
+            axisBindingOperation = (AxisBindingOperation) bindingOperations.next();
+            axisOperation = axisBindingOperation.getAxisOperation();
 
             // populate info holder with mep information. This will used in determining which
             // message receiver to use, etc.,
@@ -392,11 +400,11 @@
                              methodElement);
 
 
-                addSOAPAction(doc, methodElement, axisOperation.getName());
+                addSOAPAction(doc, methodElement, axisBindingOperation.getName());
                 //add header ops for input
-                addHeaderOperations(soapHeaderInputParameterList, axisOperation, true);
+                addHeaderOperations(soapHeaderInputParameterList, axisBindingOperation, true);
                 //add header ops for output
-                addHeaderOperations(soapHeaderOutputParameterList, axisOperation, false);
+                addHeaderOperations(soapHeaderOutputParameterList, axisBindingOperation, false);
 
                 PolicyInclude policyInclude = axisOperation.getPolicyInclude();
                 Policy policy = policyInclude.getPolicy();
@@ -410,9 +418,9 @@
                 }
 
                 methodElement.appendChild(
-                        getInputElement(doc, axisOperation, soapHeaderInputParameterList));
+                        getInputElement(doc, axisBindingOperation, soapHeaderInputParameterList));
                 methodElement.appendChild(
-                        getOutputElement(doc, axisOperation, soapHeaderOutputParameterList));
+                        getOutputElement(doc, axisBindingOperation, soapHeaderOutputParameterList));
                 methodElement.appendChild(getFaultElement(doc, axisOperation));
 
                 rootElement.appendChild(methodElement);
@@ -447,9 +455,9 @@
                                  methodElement);
 
 
-                    addSOAPAction(doc, methodElement, axisOperation.getName());
-                    addHeaderOperations(soapHeaderInputParameterList, axisOperation, true);
-                    addHeaderOperations(soapHeaderOutputParameterList, axisOperation, false);
+                    addSOAPAction(doc, methodElement, axisBindingOperation.getName());
+                    addHeaderOperations(soapHeaderInputParameterList, axisBindingOperation, true);
+                    addHeaderOperations(soapHeaderOutputParameterList, axisBindingOperation, false);
 
                     /*
                      * Setting the policy of the operation
@@ -469,10 +477,10 @@
 
 
                     methodElement.appendChild(getInputElement(doc,
-                                                              axisOperation,
+                                                              axisBindingOperation,
                                                               soapHeaderInputParameterList));
                     methodElement.appendChild(getOutputElement(doc,
-                                                               axisOperation,
+                                                               axisBindingOperation,
                                                                soapHeaderOutputParameterList));
                     methodElement.appendChild(getFaultElement(doc,
                                                               axisOperation));

Modified: webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/WSDL11Writer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/WSDL11Writer.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/WSDL11Writer.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/WSDL11Writer.java Sat Dec  1 06:43:28 2007
@@ -150,9 +150,17 @@
                servicesList.add(iter.next());
            }
            Service service;
+           String serviceNameFromFileName = fileName;
+           if (fileName.indexOf(".wsdl") > -1){
+                serviceNameFromFileName = fileName.substring(0,fileName.lastIndexOf(".wsdl"));
+           }
+
+           if (fileName.indexOf(".xsd") > -1){
+               serviceNameFromFileName = fileName.substring(0,fileName.lastIndexOf(".xsd"));
+           }
            for (Iterator iter = servicesList.iterator();iter.hasNext();){
                service = (Service) iter.next();
-               if (!service.getQName().getLocalPart().equals(fileName)){
+               if (!service.getQName().getLocalPart().equals(serviceNameFromFileName)){
                    definition.removeService(service.getQName());
                    removedServices.add(service);
                }

Modified: webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/databinding/CUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/databinding/CUtils.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/databinding/CUtils.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/databinding/CUtils.java Sat Dec  1 06:43:28 2007
@@ -27,14 +27,36 @@
 
     static final String keywords[] =
             {
-                    "auto", "double", "int", "struct",
-                    "break", "else", "long", "switch",
-                    "case", "enum", "register", "typedef",
-                    "char", "extern", "return", "union",
-                    "const", "float", "short", "unsigned",
-                    "continue", "for", "signed", "void",
-                    "default", "goto", "sizeof", "volatile",
-                    "do", "if", "static", "while"
+                   
+                    // c/ c++ keywords
+                    "asm", "auto", "bool", "break", "break", "case", "catch", "char", "class", "const", "const_cast",
+                    "continue", "default", "delete", "do", "double", "dynamic_cast", "else", "enum", "explicit",
+                    "export", "extern", "false", "float", "for", "friend", "goto", "if", "inline", "int", "long",
+                    "mutable", "namespace", "new", "operator", "private", "protected", "public", "register",
+                    "reinterpret_cast", "return", "short", "signed", "sizeof", "static", "static_cast", "struct",
+                    "switch", "template", "this", "throw", "true", "try", "typedef", "typeid", "typename", "union",
+                    "unsigned", "using", "virtual", "void", "volatile", "wchar_t", "while",
+
+                    //microsoft c++ keywords reference: http://msdn2.microsoft.com/en-US/library/2e6a4at9(VS.80).aspx
+                    "__abstract", "abstract", "__alignof Operator", "array", "__asm", "__assume", "__based", "bool",
+                    "__box", "break", "case", "catch", "__cdecl", "char", "class", "const", "const_cast", "continue",
+                    "__declspec", "default", "__delegate", "delegate", "delete", "deprecated", "dllexport", "dllimport",
+                    "do", "double", "dynamic_cast", "else", "enum", "enum class", "enum struct", "event", "__event",
+                    "__except", "explicit", "extern", "false", "__fastcall", "__finally", "finally", "float", "for",
+                    "for each", "in", "__forceinline", "friend", "friend_as", "__gc", "gcnew", "generic", "goto",
+                    "__hook", "__identifier", "if", "__if_exists", "__if_not_exists", "initonly", "__inline", "inline",
+                    "int", "__int8", "__int16", "__int32", "__int64", "__interface", "interface class",
+                    "interface struct", "interior_ptr", "__leave", "literal", "long", "__m64", "__m128", "__m128d",
+                    "__m128i", "__multiple_inheritance", "mutable", "naked", "namespace", "new", "new", "__nogc",
+                    "noinline", "__noop", "noreturn", "nothrow", "novtable", "nullptr", "operator", "__pin", "private",
+                    "__property", "property", "property", "protected", "public", "__raise", "ref struct", "ref class",
+                    "register", "reinterpret_cast", "return", "safecast", "__sealed", "sealed", "selectany", "short",
+                    "signed", "__single_inheritance", "sizeof", "static", "static_cast", "__stdcall", "struct",
+                    "__super", "switch", "template", "this", "thread", "throw", "true", "try", "__try/__except",
+                    "__try/__finally", "__try_cast", "typedef", "typeid", "typeid", "typename", "__unaligned",
+                    "__unhook", "union", "unsigned", "using declaration", "using directive", "uuid", "__uuidof",
+                    "value struct", "value class", "__value", "virtual", "__virtual_inheritance", "void", "volatile",
+                    "__w64", "__wchar_t", "wchar_t", "while",
             };
 
     /** Collator for comparing the strings */
@@ -58,7 +80,7 @@
      * an underscore.)
      */
     public static String makeNonCKeyword(String keyword) {
-        return keywordPrefix + keyword;
+        return keywordPrefix + keyword ;
     }
 
 

Modified: webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties (original)
+++ webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties Sat Dec  1 06:43:28 2007
@@ -68,9 +68,12 @@
 wsdl2code.arg32=                           \t\t\t   -Ejavaversion 1.5                      (for xmlbeans) - generates Java 1.5 code (typed lists instead of arrays) 
 wsdl2code.arg33=                           \t\t\t   -Emp <package name> (for ADB) - extension mapper package name
 wsdl2code.arg34=                           \t\t\t   -Eosv (for ADB) - turn off strict validation.
-wsdl2code.arg35=  --noBuildXML             Don't generate the build.xml in the output directory
-wsdl2code.arg36=  --noWSDL                 Don't generate WSDL's in the resources directory
-wsdl2code.arg37=  --noMessageReceiver      Don't generate a MessageReceiver in the generated sources
+wsdl2code.arg35=                           \t\t\t   -Ewdc (for xmlbeans) - Generate code with a dummy schema. if someone use this option
+wsdl2code.arg36=                           \t\t\t      they have to generate the xmlbeans code seperately with the scomp command comes with the
+wsdl2code.arg37=                           \t\t\t      xmlbeans distribution and replace the Axis2 generated classes with correct classes
+wsdl2code.arg38=  --noBuildXML             Don't generate the build.xml in the output directory
+wsdl2code.arg39=  --noWSDL                 Don't generate WSDL's in the resources directory
+wsdl2code.arg40=  --noMessageReceiver      Don't generate a MessageReceiver in the generated sources
 
 ################## prop file loader #################################
 propfileload.frameworkMismatch=Number of frameworks and extension names do not match!

Modified: webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl (original)
+++ webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl Sat Dec  1 06:43:28 2007
@@ -176,13 +176,14 @@
                     input_val<xsl:value-of select="$position"/>_<xsl:value-of select="position()"/> = <xsl:choose>
                         <xsl:when test="@ours">
                         adb_<xsl:value-of select="@type"/>_create( env);
-                        if( AXIS2_FAILURE == adb_<xsl:value-of select="@type"/>_deserialize(input_val<xsl:value-of select="$position"/>_<xsl:value-of select="position()"/>, env, content_node ))
+                        if( AXIS2_FAILURE == adb_<xsl:value-of select="@type"/>_deserialize(input_val<xsl:value-of select="$position"/>_<xsl:value-of select="position()"/>, env, &amp;content_node ))
                         {
                             adb_<xsl:value-of select="@type"/>_free(input_val<xsl:value-of select="$position"/>_<xsl:value-of select="position()"/>, env);
                       
+                            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DATA_ELEMENT_IS_NULL, AXIS2_FAILURE);
                             AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "NULL returnted from the <xsl:value-of select="@type"/>_deserialize: "
                                         "This should be due to an invalid XML");
-                            return <xsl:value-of select="$method-prefix"/>_on_fault( svc_skeleton, env, NULL);      
+                            return NULL;      
                         }
                         </xsl:when>
                         <xsl:otherwise>content_node;</xsl:otherwise>
@@ -191,14 +192,13 @@
                                                 input_val<xsl:value-of select="$position"/>_<xsl:value-of select="position()"/> );
                     if ( NULL == ret_val<xsl:value-of select="$position"/> )
                     {
-                        AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "NULL returnted from the business logic from <xsl:value-of select="$method-name"/> "
-                                        " %d :: %s", env->error->error_number,
-                                        AXIS2_ERROR_GET_MESSAGE(env->error));
-                        return <xsl:value-of select="$method-prefix"/>_on_fault( svc_skeleton, env, NULL);
+                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DATA_ELEMENT_IS_NULL, AXIS2_FAILURE);
+                        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL returnted from the business logic from <xsl:value-of select="$method-name"/> ");
+                        return NULL; 
                     }
                     ret_node = <xsl:choose>
                                    <xsl:when test="@ours">
-                               adb_<xsl:value-of select="$outputtype"/>_serialize(ret_val<xsl:value-of select="$position"/>, env, NULL, AXIS2_TRUE);
+                               adb_<xsl:value-of select="$outputtype"/>_serialize(ret_val<xsl:value-of select="$position"/>, env, NULL, NULL, AXIS2_TRUE, NULL, NULL);
                                adb_<xsl:value-of select="$outputtype"/>_free(ret_val<xsl:value-of select="$position"/>, env);
                                adb_<xsl:value-of select="@type"/>_free(input_val<xsl:value-of select="$position"/>_<xsl:value-of select="position()"/>, env);
                                    </xsl:when>

Modified: webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl (original)
+++ webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl Sat Dec  1 06:43:28 2007
@@ -10,12 +10,13 @@
         <xsl:variable name="soapVersion"><xsl:value-of select="@soap-version"/></xsl:variable>
         <xsl:variable name="method-prefix"><xsl:value-of select="@prefix"/></xsl:variable>
         <xsl:variable name="qname"><xsl:value-of select="@qname"/></xsl:variable>
+        <xsl:variable name="servicename"><xsl:value-of select="@servicename"/></xsl:variable>
 
         /**
         * <xsl:value-of select="@name"/>.h
         *
         * This file was auto-generated from WSDL for "<xsl:value-of select="$qname"/>" service
-        * by the Apache Axis2/C version: #axisVersion# #today#
+        * by the Apache Axis2/Java version: #axisVersion# #today#
         */
 
         #include &lt;stdio.h&gt;
@@ -40,9 +41,9 @@
 	extern "C" {
 	#endif
 
-        /* function prototypes - for header file*/
+        /***************** function prototypes - for header file *************/
         /**
-         * <xsl:value-of select="$method-prefix"/>_create
+         * axis2_stub_create_<xsl:value-of select="$servicename"/>
          * Create and return the stub with services populated
          * @param env Environment ( mandatory)
          * @param client_home Axis2/C home ( mandatory )
@@ -50,59 +51,61 @@
          * @return Newly created stub object
          */
         axis2_stub_t*
-        <xsl:value-of select="$method-prefix"/>_create (const axutil_env_t *env,
+        axis2_stub_create_<xsl:value-of select="$servicename"/>(const axutil_env_t *env,
                                         axis2_char_t *client_home,
                                         axis2_char_t *endpoint_uri);
         /**
-         * <xsl:value-of select="$method-prefix"/>_populate_services
+         * axis2_stub_populate_services_for_<xsl:value-of select="$servicename"/>
          * populate the svc in stub with the service and operations
          * @param stub The stub
          * @param env environment ( mandatory)
          */
-        void <xsl:value-of select="$method-prefix"/>_populate_services( axis2_stub_t *stub, const axutil_env_t *env);
+        void axis2_stub_populate_services_for_<xsl:value-of select="$servicename"/>( axis2_stub_t *stub, const axutil_env_t *env);
         /**
-         * <xsl:value-of select="$method-prefix"/>_get_endpoint_uri_from_wsdl
+         * axis2_stub_get_endpoint_uri_of_<xsl:value-of select="$servicename"/>
          * Return the endpoint URI picked from WSDL
          * @param env environment ( mandatory)
          * @return The endpoint picked from WSDL
          */
-        axis2_char_t *<xsl:value-of select="$method-prefix"/>_get_endpoint_uri_from_wsdl ( const axutil_env_t *env );
+        axis2_char_t *
+        axis2_stub_get_endpoint_uri_of_<xsl:value-of select="$servicename"/>(const axutil_env_t *env);
 
         <xsl:if test="$isSync='1'">
         <xsl:for-each select="method">
+          <xsl:if test="@mep='11' or @mep='12'">
+            <xsl:variable name="outputours"><xsl:value-of select="output/param/@ours"></xsl:value-of></xsl:variable>
+            <xsl:variable name="outputtype">
+                <xsl:choose>
+                    <xsl:when test="output/param/@ours">adb_<xsl:value-of select="output/param/@type"></xsl:value-of>_t*</xsl:when>
+                    <xsl:otherwise><xsl:value-of select="output/param/@type"></xsl:value-of></xsl:otherwise>
+                </xsl:choose>
+            </xsl:variable>
+            /**
+             * Auto generated function declaration
+             * for "<xsl:value-of select="@qname"/>" operation.
+             * @param stub The stub (axis2_stub_t)
+             * @param env environment ( mandatory)
+             <!--  select only the body parameters  -->
+             <xsl:for-each select="input/param[@type!='']">* @param _<xsl:value-of select="@name"></xsl:value-of></xsl:for-each>
+             * return
+               <xsl:choose>
+               <xsl:when test="$outputtype=''">axis2_status_t</xsl:when>
+               <xsl:when test="$outputtype!=''"><xsl:value-of select="$outputtype"/></xsl:when>
+               </xsl:choose>
+             */
 
-        <xsl:variable name="outputours"><xsl:value-of select="output/param/@ours"></xsl:value-of></xsl:variable>
-        <xsl:variable name="outputtype">
             <xsl:choose>
-                <xsl:when test="output/param/@ours">adb_<xsl:value-of select="output/param/@type"></xsl:value-of>_t*</xsl:when>
-                <xsl:otherwise><xsl:value-of select="output/param/@type"></xsl:value-of></xsl:otherwise>
+            <xsl:when test="$outputtype=''">axis2_status_t</xsl:when>
+            <xsl:when test="$outputtype!=''"><xsl:value-of select="$outputtype"/></xsl:when>
             </xsl:choose>
-        </xsl:variable>
-        /**
-         * Auto generated function declaration
-         * for "<xsl:value-of select="@qname"/>" operation.
-         * @param stub The stub
-         * @param env environment ( mandatory)
-         <!--  select only the body parameters  -->
-         <xsl:for-each select="input/param[@type!='']">* @param <xsl:value-of select="@name"></xsl:value-of></xsl:for-each>
-         * return 
-           <xsl:choose>
-           <xsl:when test="$outputtype=''">axis2_status_t</xsl:when>
-           <xsl:when test="$outputtype!=''"><xsl:value-of select="$outputtype"/></xsl:when>
-           </xsl:choose>
-         */
-
-        <xsl:choose>
-        <xsl:when test="$outputtype=''">axis2_status_t</xsl:when>
-        <xsl:when test="$outputtype!=''"><xsl:value-of select="$outputtype"/></xsl:when>
-        </xsl:choose>
-        <xsl:text> </xsl:text>
-        <xsl:value-of select="$method-prefix"/>_<xsl:value-of select="@name"/>( axis2_stub_t *stub, const axutil_env_t *env<xsl:for-each select="input/param[@type!='']">,
-                                                    <xsl:variable name="inputtype">
-                                                        <xsl:if test="@ours">adb_</xsl:if><xsl:value-of select="@type"/><xsl:if test="@ours">_t*</xsl:if>
-                                                    </xsl:variable>
-                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of select="$inputtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
-                                                </xsl:for-each>);
+            <xsl:text> </xsl:text>
+            axis2_stub_op_<xsl:value-of select="$servicename"/>_<xsl:value-of select="@name"/>( axis2_stub_t *stub, const axutil_env_t *env<xsl:for-each select="input/param[@type!='']">,
+                                                        <xsl:variable name="inputtype">
+                                                            <xsl:if test="@ours">adb_</xsl:if><xsl:value-of select="@type"/><xsl:if test="@ours">_t*</xsl:if>
+                                                        </xsl:variable>
+                                                        <xsl:if test="position()>1">,</xsl:if><xsl:value-of select="$inputtype"/><xsl:text> _</xsl:text><xsl:value-of select="@name"/>
+                                                    </xsl:for-each>);
+          </xsl:if>
         </xsl:for-each>
         </xsl:if>  <!--close for  test="$isSync='1'-->
 
@@ -115,18 +118,18 @@
          * @param stub The stub
          * @param env environment ( mandatory)
          <!--  select only the body parameters  -->
-         <xsl:for-each select="input/param[@type!='']">* @param <xsl:value-of select="@name"></xsl:value-of></xsl:for-each>
+         <xsl:for-each select="input/param[@type!='']">* @param _<xsl:value-of select="@name"></xsl:value-of></xsl:for-each>
          * @param on_complete callback to handle on complete
          * @param on_error callback to handle on error
          */
 
         <xsl:variable name="mep"><xsl:value-of select="@mep"/></xsl:variable>
         <xsl:if test="$mep='12'">
-        void <xsl:value-of select="$method-prefix"/>_<xsl:value-of select="@name"/>_start( axis2_stub_t *stub, const axutil_env_t *env<xsl:for-each select="input/param[@type!='']">,
+        void axis2_stub_start_op_<xsl:value-of select="$servicename"/>_<xsl:value-of select="@name"/>_start( axis2_stub_t *stub, const axutil_env_t *env<xsl:for-each select="input/param[@type!='']">,
                                                         <xsl:variable name="inputtype">
                                                             <xsl:if test="@ours">adb_</xsl:if><xsl:value-of select="@type"/><xsl:if test="@ours">_t*</xsl:if>
                                                         </xsl:variable>
-                                                        <xsl:if test="position()>1">,</xsl:if><xsl:value-of select="$inputtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
+                                                        <xsl:if test="position()>1">,</xsl:if><xsl:value-of select="$inputtype"/><xsl:text> _</xsl:text><xsl:value-of select="@name"/>
                                                     </xsl:for-each>,
                                                         axis2_status_t ( AXIS2_CALL *on_complete ) (struct axis2_callback *, const axutil_env_t* ) ,
                                                         axis2_status_t ( AXIS2_CALL *on_error ) (struct axis2_callback *, const axutil_env_t*, int ) );

Modified: webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl (original)
+++ webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl Sat Dec  1 06:43:28 2007
@@ -9,14 +9,15 @@
       <xsl:variable name="isAsync"><xsl:value-of select="@isAsync"/></xsl:variable>
       <xsl:variable name="soapVersion"><xsl:value-of select="@soap-version"/></xsl:variable>
       <xsl:variable name="callbackname"><xsl:value-of select="@callbackname"/></xsl:variable>
-      <xsl:variable name="method-prefix"><xsl:value-of select="@prefix"/></xsl:variable>
+      <xsl:variable name="method-prefix"><xsl:value-of select="@prefix"/></xsl:variable> <!-- This is no longer using -->
       <xsl:variable name="qname"><xsl:value-of select="@qname"/></xsl:variable>
+      <xsl:variable name="servicename"><xsl:value-of select="@servicename"/></xsl:variable>
 
       /**
        * <xsl:value-of select="@name"/>.c
        *
        * This file was auto-generated from WSDL for "<xsl:value-of select="$qname"/>" service
-       * by the Apache Axis2/C version: #axisVersion# #today#
+       * by the Apache Axis2/Java version: #axisVersion# #today#
        */
 
       #include "<xsl:value-of select="@name"/>.h"
@@ -27,28 +28,40 @@
        */
 
       axis2_stub_t*
-      <xsl:value-of select="$method-prefix"/>_create (const axutil_env_t *env,
+      axis2_stub_create_<xsl:value-of select="$servicename"/>(const axutil_env_t *env,
                                       axis2_char_t *client_home,
                                       axis2_char_t *endpoint_uri)
       {
          axis2_stub_t *stub = NULL;
          axis2_endpoint_ref_t *endpoint_ref = NULL;
-         AXIS2_FUNC_PARAM_CHECK ( client_home, env, NULL)
+         AXIS2_FUNC_PARAM_CHECK (client_home, env, NULL)
 
-         if (NULL == endpoint_uri )
+         if (NULL == endpoint_uri)
          {
-            endpoint_uri = <xsl:value-of select="$method-prefix"/>_get_endpoint_uri_from_wsdl( env );
+            endpoint_uri = axis2_stub_get_endpoint_uri_of_<xsl:value-of select="$servicename"/>(env);
          }
 
          endpoint_ref = axis2_endpoint_ref_create(env, endpoint_uri);
 
-         stub = axis2_stub_create_with_endpoint_ref_and_client_home ( env, endpoint_ref, client_home );
-         <xsl:value-of select="$method-prefix"/>_populate_services( stub, env );
+         stub = axis2_stub_create_with_endpoint_ref_and_client_home (env, endpoint_ref, client_home);
+
+         if (NULL == stub)
+         {
+            if(NULL != endpoint_ref)
+            {
+                axis2_endpoint_ref_free(endpoint_ref, env);
+            }
+            return NULL;
+         }
+
+
+         axis2_stub_populate_services_for_<xsl:value-of select="$servicename"/>(stub, env);
          return stub;
       }
 
 
-      void <xsl:value-of select="$method-prefix"/>_populate_services( axis2_stub_t *stub, const axutil_env_t *env)
+      void
+      axis2_stub_populate_services_for_<xsl:value-of select="$servicename"/>(axis2_stub_t *stub, const axutil_env_t *env)
       {
          axis2_svc_client_t *svc_client = NULL;
          axutil_qname_t *svc_qname =  NULL;
@@ -72,13 +85,12 @@
          msg_out_fault = axis2_op_get_msg(annon_op, env, AXIS2_MSG_OUT_FAULT);
          msg_in_fault = axis2_op_get_msg(annon_op, env, AXIS2_MSG_IN_FAULT);
 
-         axutil_qname_create(env,"<xsl:value-of select="@servicename"/>" ,NULL, NULL);
+         svc_qname = axutil_qname_create(env,"<xsl:value-of select="@servicename"/>" ,NULL, NULL);
          axis2_svc_set_qname (svc, env, svc_qname);
 
          /* creating the operations*/
 
          <xsl:for-each select="method">
-
            op_qname = axutil_qname_create(env,
                                          "<xsl:value-of select="@localpart"/>" ,
                                          "<xsl:value-of select="@namespace"/>",
@@ -110,7 +122,7 @@
        *return end point picked from wsdl
        */
       axis2_char_t*
-      <xsl:value-of select="$method-prefix"/>_get_endpoint_uri_from_wsdl ( const axutil_env_t *env )
+      axis2_stub_get_endpoint_uri_of_<xsl:value-of select="$servicename"/>( const axutil_env_t *env )
       {
         axis2_char_t *endpoint_uri = NULL;
         /* set the address from here */
@@ -156,7 +168,7 @@
          /**
           * auto generated method signature
           * for "<xsl:value-of select="@qname"/>" operation.
-          <xsl:for-each select="input/param[@type!='']">* @param <xsl:value-of select="@name"></xsl:value-of></xsl:for-each>
+          <xsl:for-each select="input/param[@type!='']">* @param _<xsl:value-of select="@name"/></xsl:for-each>
           * @return
           */
          <xsl:choose>
@@ -164,11 +176,11 @@
          <xsl:otherwise><xsl:value-of select="$outputtype"/></xsl:otherwise>
          </xsl:choose>
          <xsl:text> </xsl:text>
-         <xsl:value-of select="$method-prefix"/>_<xsl:value-of select="@name"/>( axis2_stub_t *stub, const axutil_env_t *env<xsl:for-each select="input/param[@type!='']">,
+         axis2_stub_op_<xsl:value-of select="$servicename"/>_<xsl:value-of select="@name"/>( axis2_stub_t *stub, const axutil_env_t *env<xsl:for-each select="input/param[@type!='']">,
                                               <xsl:variable name="inputtype">
                                                   <xsl:if test="@ours">adb_</xsl:if><xsl:value-of select="@type"/><xsl:if test="@ours">_t*</xsl:if>
                                               </xsl:variable>
-                                              <xsl:if test="position()>1">,</xsl:if><xsl:value-of select="$inputtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
+                                              <xsl:if test="position()>1">,</xsl:if><xsl:value-of select="$inputtype"/><xsl:text> _</xsl:text><xsl:value-of select="@name"/>
                                               </xsl:for-each>)
          {
             axis2_svc_client_t *svc_client = NULL;
@@ -193,23 +205,21 @@
                 <xsl:if test="position()=1">
                     <xsl:choose>
                         <xsl:when test="@ours">
-                            payload = adb_<xsl:value-of select="@type"/>_serialize(<xsl:value-of select="@name"/>, env, NULL, AXIS2_TRUE);
+                            payload = adb_<xsl:value-of select="@type"/>_serialize(_<xsl:value-of select="@name"/>, env, NULL, NULL, AXIS2_TRUE, NULL, NULL);
                         </xsl:when>
                         <xsl:otherwise>
-                            payload = <xsl:value-of select="@name"/>;
+                            payload = _<xsl:value-of select="@name"/>;
                         </xsl:otherwise>
                     </xsl:choose>
                 </xsl:if>
             </xsl:for-each>
 
-
             options = axis2_stub_get_options( stub, env);
             if ( NULL == options )
             {
-              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in stub: Error code:"
-                    " %d :: %s", env->error->error_number,
-                    AXIS2_ERROR_GET_MESSAGE(env->error));
-              return NULL;
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE);
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in stub");
+                return NULL;
             }
             svc_client = axis2_stub_get_svc_client(stub, env );
             soap_action = axis2_options_get_action( options, env );
@@ -254,7 +264,7 @@
                     }
                     ret_val = adb_<xsl:value-of select="output/param/@type"/>_create(env);
 
-                    adb_<xsl:value-of select="output/param/@type"/>_deserialize(ret_val, env, ret_node );
+                    adb_<xsl:value-of select="output/param/@type"/>_deserialize(ret_val, env, &amp;ret_node );
                     return ret_val;
                 </xsl:when>
                 <xsl:otherwise>
@@ -269,17 +279,17 @@
           * auto generated method signature for asynchronous invocations
           * for "<xsl:value-of select="@qname"/>" operation.
           <!--  select only the body parameters  -->
-          <xsl:for-each select="input/param[@type!='']">* @param <xsl:value-of select="@name"></xsl:value-of></xsl:for-each>
+          <xsl:for-each select="input/param[@type!='']">* @param _<xsl:value-of select="@name"></xsl:value-of></xsl:for-each>
           * @param on_complete callback to handle on complete
           * @param on_error callback to handle on error
           */
          <xsl:variable name="callbackoncomplete"><xsl:value-of select="$callbackname"></xsl:value-of><xsl:text>_on_complete</xsl:text></xsl:variable>
          <xsl:variable name="callbackonerror"><xsl:value-of select="$callbackname"></xsl:value-of><xsl:text>_on_error</xsl:text></xsl:variable>
-         void <xsl:value-of select="$method-prefix"/>_<xsl:value-of select="@name"/>_start( axis2_stub_t *stub, const axutil_env_t *env<xsl:for-each select="input/param[@type!='']">,
+         void axis2_stub_start_op_<xsl:value-of select="$servicename"/>_<xsl:value-of select="@name"/>( axis2_stub_t *stub, const axutil_env_t *env<xsl:for-each select="input/param[@type!='']">,
                                                     <xsl:variable name="inputtype">
                                                         <xsl:if test="@ours">adb_</xsl:if><xsl:value-of select="@type"/><xsl:if test="@ours">_t*</xsl:if>
                                                     </xsl:variable>
-                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of select="$inputtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
+                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of select="$inputtype"/><xsl:text> _</xsl:text><xsl:value-of select="@name"/>
                                                   </xsl:for-each>,
                                                   axis2_status_t ( AXIS2_CALL *on_complete ) (struct axis2_callback *, const axutil_env_t *) ,
                                                   axis2_status_t ( AXIS2_CALL *on_error ) (struct axis2_callback *, const axutil_env_t *, int ) )
@@ -303,10 +313,10 @@
                 <xsl:if test="position()=1">
                     <xsl:choose>
                         <xsl:when test="@ours">
-                            payload = adb_<xsl:value-of select="@type"/>_serialize(<xsl:value-of select="@name"/>, env, NULL, AXIS2_TRUE);
+                            payload = adb_<xsl:value-of select="@type"/>_serialize(_<xsl:value-of select="@name"/>, env, NULL, NULL, AXIS2_TRUE, NULL, NULL);
                         </xsl:when>
                         <xsl:otherwise>
-                            payload = <xsl:value-of select="@name"/>;
+                            payload = _<xsl:value-of select="@name"/>;
                         </xsl:otherwise>
                     </xsl:choose>
                 </xsl:if>
@@ -316,9 +326,8 @@
             options = axis2_stub_get_options( stub, env);
             if (NULL == options)
             {
-              AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "options is null in stub: Error code:"
-                      " %d :: %s", env->error->error_number,
-                      AXIS2_ERROR_GET_MESSAGE(env->error));
+              AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE);
+              AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "options is null in stub");
               return;
             }
             svc_client = axis2_stub_get_svc_client (stub, env);
@@ -369,16 +378,16 @@
           * auto generated method signature for in only mep invocations
           * for "<xsl:value-of select="@qname"/>" operation.
           <!--  select only the body parameters  -->
-          <xsl:for-each select="input/param[@type!='']">* @param <xsl:value-of select="@name"></xsl:value-of></xsl:for-each>
+          <xsl:for-each select="input/param[@type!='']">* @param _<xsl:value-of select="@name"></xsl:value-of></xsl:for-each>
           * @param on_complete callback to handle on complete
           * @param on_error callback to handle on error
           */
          axis2_status_t
-         <xsl:value-of select="$method-prefix"/>_<xsl:value-of select="@name"/>( axis2_stub_t *stub, const axutil_env_t *env <xsl:for-each select="input/param[@type!='']"> ,
+         axis2_stub_op_<xsl:value-of select="$servicename"/>_<xsl:value-of select="@name"/>( axis2_stub_t *stub, const axutil_env_t *env <xsl:for-each select="input/param[@type!='']"> ,
                                                  <xsl:variable name="inputtype">
                                                     <xsl:if test="@ours">adb_</xsl:if><xsl:value-of select="@type"/><xsl:if test="@ours">_t*</xsl:if>
                                                  </xsl:variable>
-                                                 <xsl:if test="position()>1">,</xsl:if><xsl:value-of select="$inputtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
+                                                 <xsl:if test="position()>1">,</xsl:if><xsl:value-of select="$inputtype"/><xsl:text> _</xsl:text><xsl:value-of select="@name"/>
                                               </xsl:for-each>)
          {
             axis2_status_t status;
@@ -395,10 +404,10 @@
                 <xsl:if test="position()=1">
                     <xsl:choose>
                         <xsl:when test="@ours">
-                            payload = adb_<xsl:value-of select="@type"/>_serialize(<xsl:value-of select="@name"/>, env, NULL, AXIS2_TRUE);
+                            payload = adb_<xsl:value-of select="@type"/>_serialize(_<xsl:value-of select="@name"/>, env, NULL, NULL, AXIS2_TRUE, NULL, NULL);
                         </xsl:when>
                         <xsl:otherwise>
-                            payload = <xsl:value-of select="@name"/>;
+                            payload = _<xsl:value-of select="@name"/>;
                         </xsl:otherwise>
                     </xsl:choose>
                 </xsl:if>
@@ -407,10 +416,9 @@
 
             options = axis2_stub_get_options( stub, env);
             if ( NULL == options )
-            {
-              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in stub: Error code:"
-                      " %d :: %s", env->error->error_number,
-                      AXIS2_ERROR_GET_MESSAGE(env->error));
+            { 
+              AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE);
+              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in stub");
               return AXIS2_FAILURE;
             }
             svc_client = axis2_stub_get_svc_client (stub, env );

Modified: webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/general/ServiceXMLTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/general/ServiceXMLTemplate.xsl?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/general/ServiceXMLTemplate.xsl (original)
+++ webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/general/ServiceXMLTemplate.xsl Sat Dec  1 06:43:28 2007
@@ -66,6 +66,7 @@
 				<operation>
 					<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
 					<xsl:attribute name="mep"><xsl:value-of select="@mepURI"/></xsl:attribute>
+					<xsl:attribute name="namespace"><xsl:value-of select="@namespace"/></xsl:attribute>
 					<actionMapping>
 						<xsl:value-of select="@soapaction"/>
 					</actionMapping>

Modified: webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original)
+++ webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Sat Dec  1 06:43:28 2007
@@ -314,7 +314,7 @@
                     <xsl:for-each select="fault/param[@type!='']">
                         ,<xsl:value-of select="@name"/>
                     </xsl:for-each>{
-
+              org.apache.axis2.context.MessageContext _messageContext = null;
               try{
                org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[<xsl:value-of select="position()-1"/>].getName());
               _operationClient.getOptions().setAction("<xsl:value-of select="$soapAction"/>");
@@ -326,7 +326,7 @@
               </xsl:for-each>
 
               // create a message context
-              org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
+              _messageContext = new org.apache.axis2.context.MessageContext();
 
               <!--todo if the stub was generated with unwrapping, wrap all parameters into a single element-->
 
@@ -495,7 +495,7 @@
                                              _returnEnv.getBody().getFirstElement() ,
                                              <xsl:value-of select="$outputtype"/>.class,
                                               getEnvelopeNamespaces(_returnEnv));
-                                _messageContext.getTransportOut().getSender().cleanup(_messageContext);
+
                                <xsl:choose>
                                    <xsl:when test="$outputparamcount=1">
                                         return get<xsl:value-of select="$outputparamshorttype"/><xsl:value-of
@@ -568,7 +568,9 @@
             }else{
                 throw f;
             }
-        }
+            } finally {
+                _messageContext.getTransportOut().getSender().cleanup(_messageContext);
+            }
         }
             </xsl:if>
             <!-- Async method generation -->
@@ -625,7 +627,7 @@
 
               // create SOAP envelope with that payload
               org.apache.axiom.soap.SOAPEnvelope env=null;
-              org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
+              final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
 
                     <xsl:variable name="count" select="count(input/param[@type!=''])"/>
                     <xsl:choose>
@@ -856,7 +858,11 @@
                             }
 
                             public void onComplete() {
-                                // Do nothing by default
+                                try {
+                                    _messageContext.getTransportOut().getSender().cleanup(_messageContext);
+                                } catch (org.apache.axis2.AxisFault axisFault) {
+                                    callback.receiveError<xsl:value-of select="@name"/>(axisFault);
+                                }
                             }
                 });
                         </xsl:otherwise>
@@ -926,6 +932,7 @@
                     </xsl:for-each>
                 </xsl:if>
                 {
+                org.apache.axis2.context.MessageContext _messageContext = null;
 
                 <xsl:if test="$mep='11'">try {</xsl:if>
                 org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[<xsl:value-of select="position()-1"/>].getName());
@@ -939,7 +946,7 @@
 
                 <xsl:for-each select="input/param[@Action!='']">_operationClient.getOptions().setAction("<xsl:value-of select="@Action"/>");</xsl:for-each>
                 org.apache.axiom.soap.SOAPEnvelope env = null;
-                org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
+                 _messageContext = new org.apache.axis2.context.MessageContext();
 
                 <xsl:variable name="count" select="count(input/param[@type!=''])"/>
                                     <xsl:choose>
@@ -1092,7 +1099,12 @@
                   }else{
                       throw f;
                   }
+              } finally {
+                _messageContext.getTransportOut().getSender().cleanup(_messageContext);
               }
+           </xsl:if>
+           <xsl:if test="not($mep='11')">
+              _messageContext.getTransportOut().getSender().cleanup(_messageContext); 
            </xsl:if>
              return;
            }

Modified: webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl (original)
+++ webservices/axis2/branches/java/jaxws21/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl Sat Dec  1 06:43:28 2007
@@ -29,7 +29,7 @@
 
 
     <!--Template for in out message receiver -->
-    <xsl:template match="/interface[@basereceiver='org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver']">
+    <xsl:template match="/interface[@basereceiver='org.apache.axis2.receivers.AbstractInOutMessageReceiver']">
 
         <xsl:variable name="skeletonname"><xsl:value-of select="@skeletonInterfaceName"/></xsl:variable>
         <xsl:variable name="isbackcompatible" select="@isbackcompatible"/>
@@ -453,7 +453,7 @@
     </xsl:template>
 
     <!--Template for robust in message receiver -->
-    <xsl:template match="/interface[@basereceiver='org.apache.axis2.receivers.AbstractRobustInMessageReceiver']">
+    <xsl:template match="/interface[@basereceiver='org.apache.axis2.receivers.AbstractMessageReceiver']">
 
         <xsl:variable name="skeletonname"><xsl:value-of select="@skeletonInterfaceName"/></xsl:variable>
         <xsl:variable name="isbackcompatible" select="@isbackcompatible"/>

Modified: webservices/axis2/branches/java/jaxws21/modules/distribution/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/distribution/pom.xml?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/distribution/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/distribution/pom.xml Sat Dec  1 06:43:28 2007
@@ -186,8 +186,8 @@
             <artifactId>woden-impl-dom</artifactId>
         </dependency>
         <dependency>
-            <groupId>xmlbeans</groupId>
-            <artifactId>xbean</artifactId>
+            <groupId>org.apache.xmlbeans</groupId>
+            <artifactId>xmlbeans</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.ws.jaxme</groupId>
@@ -214,7 +214,20 @@
             <artifactId>log4j</artifactId>
         </dependency>
     </dependencies>
-
+	<distributionManagement>
+		<repository>
+			<id>apache-repo</id>
+			<name>Maven Central Repository</name>
+			<url>
+            scpexe://people.apache.org//www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
+		</repository>
+		<snapshotRepository>
+			<id>apache-snapshots</id>
+			<name>Apache Development Repository</name>
+			<url>scpexe://people.apache.org//www/people.apache.org/repo/m2-snapshot-repository</url>
+			<uniqueVersion>false</uniqueVersion>
+		</snapshotRepository>
+	</distributionManagement>
     <build>
         <plugins>
             <plugin>

Modified: webservices/axis2/branches/java/jaxws21/modules/documentation/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/documentation/pom.xml?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/documentation/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/documentation/pom.xml Sat Dec  1 06:43:28 2007
@@ -180,8 +180,8 @@
         </dependency>
 
         <dependency>
-            <groupId>xmlbeans</groupId>
-            <artifactId>xbean</artifactId>
+            <groupId>org.apache.xmlbeans</groupId>
+            <artifactId>xmlbeans</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.ws.jaxme</groupId>

Modified: webservices/axis2/branches/java/jaxws21/modules/documentation/xdocs/tools/1_3/maven-plugins/maven-wsdl2code-plugin.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/documentation/xdocs/tools/1_3/maven-plugins/maven-wsdl2code-plugin.xml?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/documentation/xdocs/tools/1_3/maven-plugins/maven-wsdl2code-plugin.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/documentation/xdocs/tools/1_3/maven-plugins/maven-wsdl2code-plugin.xml Sat Dec  1 06:43:28 2007
@@ -47,18 +47,21 @@
     &lt;build&gt;
     	&lt;plugins&gt;
     		&lt;plugin&gt;
-    			&lt;groupId&gt;org.apache.axis2.maven2&lt;/groupId&gt;
+    			&lt;groupId&gt;org.apache.axis2&lt;/groupId&gt;
     			&lt;artifactId&gt;axis2-wsdl2code-maven-plugin&lt;/artifactId&gt;
+				&lt;version&gt;1.3&lt;/version&gt;
     			&lt;executions&gt;
     				&lt;execution&gt;
     					&lt;goals&gt;
     						&lt;goal&gt;wsdl2code&lt;/goal&gt;
     					&lt;/goals&gt;
-    				&lt;/execution&gt;
-    			&lt;/executions&gt;
-    			&lt;configuration&gt;
-    				&lt;packageName&gt;com.foo.myservice&lt;/packageName&gt;
-    			&lt;/configuration&gt;
+    				&lt;configuration&gt;
+					&lt;packageName&gt;com.foo.myservice&lt;/packageName&gt;
+					&lt;wsdlFile&gt;src/main/wsdl/myservice.wsdl&lt;/wsdlFile&gt;
+					&lt;databindingName&gt;xmlbeans&lt;/databindingName&gt;
+				&lt;/configuration&gt;
+				&lt;/execution&gt;
+			&lt;/executions&gt;
     		&lt;/plugin&gt;
     	&lt;/plugins&gt;
     &lt;/build&gt;
@@ -67,7 +70,7 @@
 phase. You can also invoke it directly from the command line by
 running the command</p>
 <pre>
-mvn wsdl2code:wsdl2code
+mvn axis2-wsdl2code:wsdl2code
 </pre>
 <h3>The WSDL2Code Goal</h3>
 <p>By default, the plugin reads the file
@@ -150,7 +153,7 @@
 <td></td>
 <td>Map of namespace URI to packages. Example:
 &lt;namespaceURIs&gt; &lt;namespaceURI&gt;
-&lt;uri&gt;uri1&lt;/uri&gt; &lt;package&gt;package1&lt;/package&gt;
+&lt;uri&gt;uri1&lt;/uri&gt; &lt;packageName&gt;package1&lt;/packageName&gt;
 &lt;/namespaceURI&gt; ........ &lt;/namespaceURI&gt;</td>
 <td></td>
 </tr>

Modified: webservices/axis2/branches/java/jaxws21/modules/integration/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/integration/pom.xml?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/integration/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/integration/pom.xml Sat Dec  1 06:43:28 2007
@@ -279,8 +279,8 @@
             <artifactId>servlet-api</artifactId>
         </dependency>
         <dependency>
-            <groupId>xmlbeans</groupId>
-            <artifactId>xbean</artifactId>
+            <groupId>org.apache.xmlbeans</groupId>
+            <artifactId>xmlbeans</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.activemq</groupId>

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/binding/SOAPBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/binding/SOAPBinding.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/binding/SOAPBinding.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/binding/SOAPBinding.java Sat Dec  1 06:43:28 2007
@@ -24,6 +24,7 @@
 import org.apache.axis2.jaxws.client.config.MTOMConfigurator;
 import org.apache.axis2.jaxws.description.EndpointDescription;
 import org.apache.axis2.jaxws.feature.ClientConfigurator;
+import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.jaxws.utility.SAAJFactory;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -193,8 +194,7 @@
             // Throw an exception for setting a role of "none"
             // Per JAXWS 2.0 Sec 10.1.1.1 SOAP Roles, page 116:
             if (set.contains(SOAPConstants.URI_SOAP_1_2_ROLE_NONE)) {
-                // TODO: RAS/NLS
-                throw ExceptionFactory.makeWebServiceException("The role of 'none' is not allowed.");
+                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("roleValidatioErr"));
             }
         }
         

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncResponse.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncResponse.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncResponse.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncResponse.java Sat Dec  1 06:43:28 2007
@@ -26,6 +26,7 @@
 import org.apache.axis2.jaxws.handler.HandlerChainProcessor;
 import org.apache.axis2.jaxws.handler.HandlerInvokerUtils;
 import org.apache.axis2.jaxws.handler.TransportHeadersAdapter;
+import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.jaxws.message.attachments.AttachmentUtils;
 import org.apache.axis2.jaxws.spi.Constants;
 import org.apache.axis2.jaxws.spi.migrator.ApplicationContextMigratorUtil;
@@ -130,9 +131,8 @@
     private void setThreadClassLoader(final ClassLoader cl) {
         if (this.classLoader != null) {
             if (!this.classLoader.getClass().equals(cl.getClass())) {
-                throw ExceptionFactory.makeWebServiceException("Attemping to use ClassLoader of type " + cl.getClass().toString() +
-                                                               ", which is incompatible with current ClassLoader of type " +
-                                                               this.classLoader.getClass().toString());
+                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("threadClsLoaderErr",
+                		cl.getClass().toString(),this.classLoader.getClass().toString()));
             }
         }
         else {
@@ -221,7 +221,7 @@
 
     public Object get() throws InterruptedException, ExecutionException {
         if (cancelled) {
-            throw new CancellationException("The task was cancelled.");
+            throw new CancellationException(Messages.getMessage("getErr"));
         }
 
         // Wait for the response to come back
@@ -244,7 +244,7 @@
     public Object get(long timeout, TimeUnit unit)
             throws InterruptedException, ExecutionException, TimeoutException {
         if (cancelled) {
-            throw new CancellationException("The task was cancelled.");
+            throw new CancellationException(Messages.getMessage("getErr"));
         }
 
         // Wait for the response to come back
@@ -264,8 +264,7 @@
         // If the response still hasn't been returned, then we've timed out
         // and must throw a TimeoutException
         if (latch.getCount() > 0) {
-            throw new TimeoutException(
-                    "The client timed out while waiting for an asynchronous response");
+            throw new TimeoutException(Messages.getMessage("getErr1"));
         }
 
         return responseObject;
@@ -288,7 +287,7 @@
         // If we don't have a fault, then we have to have a MessageContext for the response.
         if (response == null) {
             latch.countDown();
-            throw new ExecutionException(ExceptionFactory.makeWebServiceException("null response"));
+            throw new ExecutionException(ExceptionFactory.makeWebServiceException(Messages.getMessage("processRespErr")));
         }
 
         // Avoid a reparse of the message. If we already retrived the object, return

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java Sat Dec  1 06:43:28 2007
@@ -136,17 +136,8 @@
             Binding binding = (Binding) getBinding();
             invocationContext.setHandlers(binding.getHandlerChain());
 
-            Message requestMsg = null;
-            try {
-                if (isValidInvocationParam(obj)) {
-                    requestMsg = createMessageFromValue(obj);
-                } else {
-                    throw ExceptionFactory.makeWebServiceException(Messages.getMessage("dispatchInvalidParam"));
-                }
-            } catch (Exception e) {
-                throw getProtocolException(e);
-            }
-
+            Message requestMsg = createRequestMessage(obj);
+           
             setupMessageProperties(requestMsg);
             requestMsgCtx.setMessage(requestMsg);
 
@@ -229,16 +220,7 @@
             Binding binding = (Binding) getBinding();
             invocationContext.setHandlers(binding.getHandlerChain());
 
-            Message requestMsg = null;
-            try {
-                if (isValidInvocationParam(obj)) {
-                    requestMsg = createMessageFromValue(obj);
-                } else {
-                    throw ExceptionFactory.makeWebServiceException(Messages.getMessage("dispatchInvalidParam"));
-                }
-            } catch (Exception e){
-                throw getProtocolException(e);
-            }
+            Message requestMsg = createRequestMessage(obj);
 
             setupMessageProperties(requestMsg);
             requestMsgCtx.setMessage(requestMsg);
@@ -305,12 +287,7 @@
             Binding binding = (Binding) getBinding();
             invocationContext.setHandlers(binding.getHandlerChain());
 
-            Message requestMsg = null;
-            if (isValidInvocationParam(obj)) {
-                requestMsg = createMessageFromValue(obj);
-            } else {
-                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("dispatchInvalidParam"));
-            }
+            Message requestMsg = createRequestMessage(obj);
 
             setupMessageProperties(requestMsg);
             requestMsgCtx.setMessage(requestMsg);
@@ -388,12 +365,7 @@
             Binding binding = (Binding) getBinding();
             invocationContext.setHandlers(binding.getHandlerChain());
 
-            Message requestMsg = null;
-            if (isValidInvocationParam(obj)) {
-                requestMsg = createMessageFromValue(obj);
-            } else {
-                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("dispatchInvalidParam"));
-            }
+            Message requestMsg = createRequestMessage(obj);
 
             setupMessageProperties(requestMsg);
             requestMsgCtx.setMessage(requestMsg);
@@ -471,37 +443,6 @@
 
         return null;
     }
-    
-    private ProtocolException getProtocolException(Exception e) {
-        if (getBinding() instanceof SOAPBinding) {
-            // Throw a SOAPFaultException
-            if (log.isDebugEnabled()) {
-                log.debug("Constructing SOAPFaultException for " + e);
-            }
-            try {
-                SOAPFault soapFault = SOAPFactory.newInstance().createFault();
-                soapFault.setFaultString(e.getMessage());
-                return new SOAPFaultException(soapFault);
-            } catch (Exception ex) {
-                if (log.isDebugEnabled()) {
-                    log.debug("Exception occurred during fault processing:", ex);
-                }
-                return ExceptionFactory.makeProtocolException(e.getMessage(), null);
-            }
-        } else if (getBinding() instanceof HTTPBinding) {
-            if (log.isDebugEnabled()) {
-                log.debug("Constructing ProtocolException for " + e);
-            }
-            HTTPException ex = new HTTPException(HttpURLConnection.HTTP_INTERNAL_ERROR);
-            ex.initCause(new Throwable(e.getMessage()));
-            return ex;
-        } else {
-            if (log.isDebugEnabled()) {
-                log.debug("Constructing ProtocolException for " + e);
-            }
-            return ExceptionFactory.makeProtocolException(e.getMessage(), null);
-        }
-    }
 
     /**
      * Returns a boolean indicating whether or not the MessageContext contained a fault.
@@ -569,5 +510,25 @@
 
         // If we've gotten this far, then all is good.
         return true;
+    }
+    
+    private Message createRequestMessage(Object obj) throws WebServiceException {
+        
+        // Check to see if the object is a valid invocation parameter.  
+        // Then create the message from the object.
+        // If an exception occurs, it is local to the client and therefore is a
+        // WebServiceException (and not ProtocolExceptions).
+        // This code complies with JAX-WS 2.0 sections 4.3.2, 4.3.3 and 4.3.4.
+        if (!isValidInvocationParam(obj)) {
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("dispatchInvalidParam"));
+        } 
+        Message requestMsg = null;
+        try {
+             requestMsg = createMessageFromValue(obj);
+        } catch (Throwable t) {
+            // The webservice exception wraps the thrown exception.
+            throw ExceptionFactory.makeWebServiceException(t);
+        }
+        return requestMsg;
     }
 }

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java Sat Dec  1 06:43:28 2007
@@ -28,6 +28,7 @@
 import org.apache.axis2.jaxws.description.OperationDescription;
 import org.apache.axis2.jaxws.description.ServiceDescription;
 import org.apache.axis2.jaxws.description.ServiceDescriptionWSDL;
+import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.transport.http.HTTPConstants;
 import org.apache.axis2.util.XMLUtils;
 import org.apache.commons.logging.Log;
@@ -79,9 +80,8 @@
                         wsdlLocationURI = wsdlLocation.toURI();
                     }
                     catch (URISyntaxException ex) {
-                        // TODO: NLS/RAS
-                        log.warn("Unable to convert WSDL location URL to URI.  URL: " +
-                                wsdlLocation.toString() + "; Service: " + description.getServiceQName(), ex);
+                        log.warn(Messages.getMessage("addPropertiesErr",
+                        		wsdlLocation.toString(),description.getServiceQName().toString()), ex);
                     }
                     soapMessageContext
                             .put(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION, wsdlLocationURI);

Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java?rev=600141&r1=600140&r2=600141&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java Sat Dec  1 06:43:28 2007
@@ -52,7 +52,6 @@
 
     private InvocationContext invocationCtx;
     private org.apache.axis2.context.MessageContext axisMsgCtx;
-    private Map<String, Object> properties;
     private EndpointDescription endpointDesc;
     private OperationDescription operationDesc;
     private QName operationName;    //FIXME: This should become the OperationDescription
@@ -61,10 +60,6 @@
     private boolean isOutbound;  // Outbound or inbound message context
     private boolean isServer = false; // Indicate if server role, default is false
     
-    // TODO:  flag to set whether we delegate property setting up to the
-    // axis2 message context object or keep it local
-    private boolean DELEGATE_TO_AXISMC = true;
-    
     /*
      * JAXWS runtime uses a request and response mc, but we need to know the pair.
      * We will use this mepCtx as a wrapper to the request and response message contexts
@@ -85,10 +80,6 @@
     public MessageContext() {
         axisMsgCtx = new org.apache.axis2.context.MessageContext();
         isOutbound = true;
-        if (!DELEGATE_TO_AXISMC) {
-            properties = new HashMap<String, Object>();
-        }
-           
     }
     
     /**
@@ -98,9 +89,6 @@
      * @throws WebServiceException
      */
     public MessageContext(org.apache.axis2.context.MessageContext mc) throws WebServiceException {
-        if (!DELEGATE_TO_AXISMC) {
-            properties = new HashMap<String, Object>();
-        }
         // Assume inbound (caller must setOutbound)
         isOutbound = false;
 
@@ -130,65 +118,41 @@
     }
 
     public Map<String, Object> getProperties() {
-        if (DELEGATE_TO_AXISMC) {
-            // only use properties that are local to the axis2 MC,
-            // not the options bag.  See org.apache.axis2.context.AbstractContext
-            Iterator names = axisMsgCtx.getPropertyNames();
-            HashMap tempProps = new HashMap<String, Object>();
-            for (; names.hasNext();) {
-                String name = (String)names.next();
-                tempProps.put(name, axisMsgCtx.getProperty(name));
-            }
-            //return new ReadOnlyProperties(tempProps);
-            return tempProps;
+        // only use properties that are local to the axis2 MC,
+        // not the options bag.  See org.apache.axis2.context.AbstractContext
+        Iterator names = axisMsgCtx.getPropertyNames();
+        HashMap tempProps = new HashMap<String, Object>();
+        for (; names.hasNext();) {
+            String name = (String)names.next();
+            tempProps.put(name, axisMsgCtx.getProperty(name));
         }
-        return properties;
+        //return new ReadOnlyProperties(tempProps);
+        return tempProps;
     }
     
     public void setProperties(Map<String, Object> _properties) {
-        if (DELEGATE_TO_AXISMC) {
-            // make sure copy is made, not just reference:
-            _properties.put(org.apache.axis2.context.MessageContext.COPY_PROPERTIES, true);
-            axisMsgCtx.setProperties(_properties);
-        } else {
-            getProperties().putAll(_properties);
-        }
+        // make sure copy is made, not just reference:
+        _properties.put(org.apache.axis2.context.MessageContext.COPY_PROPERTIES, true);
+        axisMsgCtx.setProperties(_properties);
     }
     
     public Object getProperty(String key) {
-        if (DELEGATE_TO_AXISMC) {
-            // only use properties that are local to the axis2 MC,
-            // not the options bag.  See org.apache.axis2.context.AbstractContext
-            Iterator names = axisMsgCtx.getPropertyNames();
-            for (; names.hasNext();) {
-                String name = (String)names.next();
-                if (name.equals(key)) {
-                    return axisMsgCtx.getProperty(key);
-                }
-            }
-            return null;
-        }
-        return getProperties().get(key);
+        // only use properties that are local to the axis2 MC.
+        return axisMsgCtx.getLocalProperty(key, false);
+    }
+    
+    public boolean containsKey(Object key) {
+        // Only use properties that are local to the axis2 MC.
+        // @see getProperty(String key)
+        return (key instanceof String && getProperty((String)key) != null);
     }
     
     // acts like Map.put(key, value)
     public Object setProperty(String key, Object value) {
-        if (DELEGATE_TO_AXISMC) {
-            // only use properties that are local to the axis2 MC,
-            // not the options bag.  See org.apache.axis2.context.AbstractContext
-            Object retval = null;
-            Iterator names = axisMsgCtx.getPropertyNames();
-            for (; names.hasNext();) {
-                String name = (String)names.next();
-                if (name.equals(key)) {
-                    retval = axisMsgCtx.getProperty(key);
-                }
-            }
-            axisMsgCtx.setProperty(key, value);
-            return retval;
-        } else {
-            return getProperties().put(key, value);
-        }
+        // only use properties that are local to the axis2 MC
+        Object retval = axisMsgCtx.getLocalProperty(key, false);
+        axisMsgCtx.setProperty(key, value);
+        return retval;
     }
 
     public EndpointDescription getEndpointDescription() {



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


Mime
View raw message