axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/message RPCHandler.java
Date Thu, 08 Nov 2001 15:04:43 GMT
dug         01/11/08 07:04:43

  Modified:    java/src/org/apache/axis/client Call.java
               java/src/org/apache/axis/message RPCHandler.java
  Log:
  OK - With Russell's help here's a fix for the functional-tests.
  I was assuming that any untyped value must be the return of
  the RPC - when in fact I should have checked for any OUTPUT params
  first (by name).
  
  Perhaps we could agree to NOT checkin failing testcases since it
  leaves people in a state where if they make additional changes
  they don't know if their new code is what broke things or if it
  is supposed to fail or if someone else broke it.  Ah, the importance
  of making sure you don't commit until: ant clean all   works.
  
  Revision  Changes    Path
  1.34      +15 -2     xml-axis/java/src/org/apache/axis/client/Call.java
  
  Index: Call.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Call.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Call.java	2001/11/08 12:53:10	1.33
  +++ Call.java	2001/11/08 15:04:43	1.34
  @@ -214,8 +214,6 @@
       public void addParameter(String paramName, XMLType paramType,
                                int parameterMode) {
   
  -        QName qn = paramType.getType();
  -
           if ( paramNames == null ) {
               paramNames = new Vector();
               paramTypes = new Vector();
  @@ -225,6 +223,21 @@
           paramNames.add( paramName );
           paramTypes.add( paramType.getType() );
           paramModes.add( new Integer(parameterMode) );
  +    }
  +
  +    public XMLType getParameterTypeByName(String paramName) {
  +        int  i ;
  +
  +        if ( paramNames == null ) return( null );
  +
  +        for (i = 0 ; i< paramNames.size() ; i++ ) 
  +            if ( ((String)paramNames.get(i)).equals(paramName) ) {
  +                org.apache.axis.encoding.XMLType  type ;
  +                QName qn = (QName) paramTypes.get(i);
  +                type = new org.apache.axis.encoding.XMLType( qn );
  +                return( type );
  +            }
  +        return( null );
       }
   
       /**
  
  
  
  1.19      +11 -1     xml-axis/java/src/org/apache/axis/message/RPCHandler.java
  
  Index: RPCHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/RPCHandler.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- RPCHandler.java	2001/11/08 13:11:28	1.18
  +++ RPCHandler.java	2001/11/08 15:04:43	1.19
  @@ -179,7 +179,17 @@
               if ( msg != null && msg.getMessageType() == Message.RESPONSE ) {
                   Call c = (Call) msgContext.getProperty( MessageContext.CALL );
                   if ( c != null ) {
  -                    XMLType xmlType = (XMLType) c.getReturnType();
  +                    XMLType xmlType = null ;
  +
  +                    // First look for this param by name
  +                    xmlType = (XMLType) c.getParameterTypeByName(localName);
  +
  +                    // If we can't find it by name then assume it must
  +                    // be the return type - is this correct/safe????
  +                    if ( xmlType == null )
  +                        xmlType = (XMLType) c.getReturnType();
  +
  +                    // Now get the QName
                       if ( xmlType != null )
                           type = xmlType.getType();
                   }
  
  
  

Mime
View raw message