axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/providers/java JavaProvider.java RPCProvider.java
Date Mon, 02 May 2005 11:39:37 GMT
dims        2005/05/02 04:39:37

  Modified:    java/src/org/apache/axis/wsdl/fromJava Emitter.java
               java/src/org/apache/axis/wsdl/toJava JavaDeployWriter.java
                        JavaGeneratorFactory.java JavaImplWriter.java
                        JavaSkelWriter.java JavaStubWriter.java
                        JavaTestCaseWriter.java
               java/src/org/apache/axis/providers/java JavaProvider.java
                        RPCProvider.java
  Log:
  Patch for AXIS-1970 - Workaround for wsdl4j OperationType not being correctly serializable
  
  Revision  Changes    Path
  1.145     +2 -2      ws-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v
  retrieving revision 1.144
  retrieving revision 1.145
  diff -u -r1.144 -r1.145
  --- Emitter.java	29 Apr 2005 16:41:36 -0000	1.144
  +++ Emitter.java	2 May 2005 11:39:36 -0000	1.145
  @@ -1117,7 +1117,7 @@
           oper.setInput(input);
           def.addMessage(msg);
           
  -        if (desc.getMep() == OperationType.REQUEST_RESPONSE) {
  +        if (OperationType.REQUEST_RESPONSE.equals(desc.getMep())) {
               msg = writeResponseMessage(def, desc, bindingOper);
               
               Output output = def.createOutput();
  @@ -1227,7 +1227,7 @@
           BindingOutput bindingOutput = null;
           
           // TODO : Make this deal with all MEPs
  -        if (desc.getMep() == OperationType.REQUEST_RESPONSE)
  +        if (OperationType.REQUEST_RESPONSE.equals(desc.getMep())) 
               bindingOutput = def.createBindingOutput();
   
           bindingOper.setName(oper.getName());
  
  
  
  1.93      +7 -8      ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java
  
  Index: JavaDeployWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- JavaDeployWriter.java	1 May 2005 04:05:38 -0000	1.92
  +++ JavaDeployWriter.java	2 May 2005 11:39:36 -0000	1.93
  @@ -433,8 +433,8 @@
   
                   // These operation types are not supported.  The signature
                   // will be a string stating that fact.
  -                if ((type == OperationType.NOTIFICATION)
  -                        || (type == OperationType.SOLICIT_RESPONSE)) {
  +                if ((OperationType.NOTIFICATION.equals(type))
  +                        || (OperationType.SOLICIT_RESPONSE.equals(type))) {
                       continue;
                   }
                   String javaOperName = null;
  @@ -587,8 +587,7 @@
                       + "\"");
           }
   
  -        if (params.mep != null &&
  -                params.mep != OperationType.REQUEST_RESPONSE) {
  +        if (!OperationType.REQUEST_RESPONSE.equals(params.mep)) {
               String mepString = getMepString(params.mep);
               if (mepString != null) {
                   pw.print(" mep=\""
  @@ -714,13 +713,13 @@
           return new PrintWriter(writer);
       }
       
  -    public static Map mepStrings = new HashMap();
  +    private static final Map mepStrings = new HashMap();
       static {
  -        mepStrings.put(OperationType.REQUEST_RESPONSE, "request-response");
  -        mepStrings.put(OperationType.ONE_WAY, "oneway");
  +        mepStrings.put(OperationType.REQUEST_RESPONSE.toString(), "request-response");
  +        mepStrings.put(OperationType.ONE_WAY.toString(), "oneway");
       }
       
       String getMepString(OperationType mep) {
  -        return (String)mepStrings.get(mep);
  +        return (String)mepStrings.get(mep.toString());
       }
   }    // class JavaDeployWriter
  
  
  
  1.68      +2 -2      ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java
  
  Index: JavaGeneratorFactory.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- JavaGeneratorFactory.java	23 Apr 2005 01:49:03 -0000	1.67
  +++ JavaGeneratorFactory.java	2 May 2005 11:39:36 -0000	1.68
  @@ -1390,14 +1390,14 @@
                           Parameters parameters =
                                   bEntry.getParameters(operation);
   
  -                        if (type == OperationType.SOLICIT_RESPONSE) {
  +                        if (OperationType.SOLICIT_RESPONSE.equals(type)) {
                               parameters.signature =
                                       "    // "
                                       + Messages.getMessage("invalidSolResp00", javaOpName);
   
                               System.err.println(
                                       Messages.getMessage("invalidSolResp00", javaOpName));
  -                        } else if (type == OperationType.NOTIFICATION) {
  +                        } else if (OperationType.NOTIFICATION.equals(type)) {
                               parameters.signature =
                                       "    // "
                                       + Messages.getMessage("invalidNotif00", javaOpName);
  
  
  
  1.37      +2 -2      ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaImplWriter.java
  
  Index: JavaImplWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaImplWriter.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- JavaImplWriter.java	10 May 2004 17:25:43 -0000	1.36
  +++ JavaImplWriter.java	2 May 2005 11:39:36 -0000	1.37
  @@ -84,8 +84,8 @@
   
               // These operation types are not supported.  The signature
               // will be a string stating that fact.
  -            if ((type == OperationType.NOTIFICATION)
  -                    || (type == OperationType.SOLICIT_RESPONSE)) {
  +            if ((OperationType.NOTIFICATION.equals(type))
  +                    || (OperationType.SOLICIT_RESPONSE.equals(type))) {
                   pw.println(parameters.signature);
                   pw.println();
               } else {
  
  
  
  1.64      +4 -4      ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java
  
  Index: JavaSkelWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- JavaSkelWriter.java	21 Apr 2005 22:56:46 -0000	1.63
  +++ JavaSkelWriter.java	2 May 2005 11:39:36 -0000	1.64
  @@ -137,8 +137,8 @@
   
               // These operation types are not supported.  The signature
               // will be a string stating that fact.
  -            if ((type == OperationType.NOTIFICATION)
  -                    || (type == OperationType.SOLICIT_RESPONSE)) {
  +            if ((OperationType.NOTIFICATION.equals(type))
  +                    || (OperationType.SOLICIT_RESPONSE.equals(type))) {
                   continue;
               }
   
  @@ -451,8 +451,8 @@
   
               // These operation types are not supported.  The signature
               // will be a string stating that fact.
  -            if ((type == OperationType.NOTIFICATION)
  -                    || (type == OperationType.SOLICIT_RESPONSE)) {
  +            if ((OperationType.NOTIFICATION.equals(type))
  +                    || (OperationType.SOLICIT_RESPONSE.equals(type))) {
                   pw.println(parameters.signature);
                   pw.println();
               } else {
  
  
  
  1.150     +4 -4      ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
  
  Index: JavaStubWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
  retrieving revision 1.149
  retrieving revision 1.150
  diff -u -r1.149 -r1.150
  --- JavaStubWriter.java	1 May 2005 19:39:25 -0000	1.149
  +++ JavaStubWriter.java	2 May 2005 11:39:36 -0000	1.150
  @@ -456,8 +456,8 @@
   
               // These operation types are not supported.  The signature
               // will be a string stating that fact.
  -            if ((type == OperationType.NOTIFICATION)
  -                    || (type == OperationType.SOLICIT_RESPONSE)) {
  +            if ((OperationType.NOTIFICATION.equals(type))
  +                    || (OperationType.SOLICIT_RESPONSE.equals(type))) {
                   pw.println(parameters.signature);
                   pw.println();
               } else {
  @@ -593,8 +593,8 @@
   
               // These operation types are not supported.  The signature
               // will be a string stating that fact.
  -            if ((type == OperationType.NOTIFICATION)
  -                    || (type == OperationType.SOLICIT_RESPONSE)) {
  +            if ((OperationType.NOTIFICATION.equals(type))
  +                    || (OperationType.SOLICIT_RESPONSE.equals(type))) {
                   pw.println(parameters.signature);
                   pw.println();
               }
  
  
  
  1.62      +2 -2      ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java
  
  Index: JavaTestCaseWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- JavaTestCaseWriter.java	18 Aug 2004 11:33:57 -0000	1.61
  +++ JavaTestCaseWriter.java	2 May 2005 11:39:36 -0000	1.62
  @@ -163,8 +163,8 @@
   
               // These operation types are not supported.  The signature
               // will be a string stating that fact.
  -            if ((type == OperationType.NOTIFICATION)
  -                    || (type == OperationType.SOLICIT_RESPONSE)) {
  +            if ((OperationType.NOTIFICATION.equals(type))
  +                    || (OperationType.SOLICIT_RESPONSE.equals(type))) {
                   pw.println("    " + params.signature);
   
                   continue;
  
  
  
  1.115     +1 -1      ws-axis/java/src/org/apache/axis/providers/java/JavaProvider.java
  
  Index: JavaProvider.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/providers/java/JavaProvider.java,v
  retrieving revision 1.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- JavaProvider.java	8 Feb 2005 18:44:37 -0000	1.114
  +++ JavaProvider.java	2 May 2005 11:39:36 -0000	1.115
  @@ -295,7 +295,7 @@
               // associated with a one-way operation....
               OperationDesc operation = msgContext.getOperation();
               if (operation != null &&
  -                    operation.getMep() == OperationType.ONE_WAY) {
  +                    OperationType.ONE_WAY.equals(operation.getMep())) {
                   msgContext.setResponseMessage(null);
               } else {
                   Message        resMsg  = msgContext.getResponseMessage();
  
  
  
  1.121     +7 -2      ws-axis/java/src/org/apache/axis/providers/java/RPCProvider.java
  
  Index: RPCProvider.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/providers/java/RPCProvider.java,v
  retrieving revision 1.120
  retrieving revision 1.121
  diff -u -r1.120 -r1.121
  --- RPCProvider.java	8 Feb 2005 18:44:37 -0000	1.120
  +++ RPCProvider.java	2 May 2005 11:39:36 -0000	1.121
  @@ -161,7 +161,6 @@
               QName qname = new QName(body.getNamespaceURI(),
                       body.getName());
               operation = serviceDesc.getOperationByElementQName(qname);
  -        }
   
           if (operation == null) {
               SOAPConstants soapConstants = msgContext == null ?
  @@ -180,6 +179,9 @@
                   throw new AxisFault(Constants.FAULT_CLIENT, Messages.getMessage("noSuchOperation",
methodName),
                           null, null);                        
               }
  +            } else {
  +                 msgContext.setOperation(operation);
  +            }
           }
           
           // Create the array we'll use to hold the actual parameter
  @@ -304,7 +306,8 @@
           
           /** If this is a one-way operation, there is nothing more to do.
            */ 
  -        if (operation.getMep() == OperationType.ONE_WAY)
  +        if (OperationType.ONE_WAY.equals(operation.getMep())) 
  +
               return;
           
           /* Now put the result in the result SOAPEnvelope */
  @@ -372,6 +375,7 @@
   
       /**
        * This method encapsulates the method invocation.             
  +     *
        * @param msgContext MessageContext
        * @param method the target method.
        * @param obj the target object
  @@ -386,6 +390,7 @@
   
       /**
        * Throw an AxisFault if the requested method is not allowed.
  +     *
        * @param msgContext MessageContext
        * @param allowedMethods list of allowed methods
        * @param methodName name of target method
  
  
  

Mime
View raw message