axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/utils axisNLS.properties
Date Fri, 02 Aug 2002 16:05:57 GMT
tomj        2002/08/02 09:05:57

  Modified:    java/src/org/apache/axis/wsdl/symbolTable SymbolTable.java
               java/test/wsdl/import3/MultiImpIncl/wsdl MultiImp.wsdl
               java/src/org/apache/axis/utils axisNLS.properties
  Log:
  Fix bug 11376 -
   WSDL2Java generates invalid stubs when a method has an in/out parameter
    http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11376
  
  The logic for defining InOut paramters was getting skipped if the WSDL was
  wrapped (i.e. from .NET).  Turn this back on.
  
  In addition, throw an error if we encounter two parts with the same name but
  different types.  This is illegal so we shouldn't let it slide.
  
  Fix one of our test cases which had this bad WSDL in it.
  
  Revision  Changes    Path
  1.19      +8 -5      xml-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java
  
  Index: SymbolTable.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- SymbolTable.java	2 Aug 2002 12:55:33 -0000	1.18
  +++ SymbolTable.java	2 Aug 2002 16:05:57 -0000	1.19
  @@ -1114,7 +1114,7 @@
                                 int index, 
                                 int outdex, 
                                 Parameters parameters, 
  -                              boolean trimInput) {        
  +                              boolean trimInput) throws IOException {        
           Parameter p = (Parameter)inputs.get(index);
           // If this is an element, we want the XML to reflect the element name
           // not the part name.
  @@ -1131,9 +1131,7 @@
           // At this point we know the name and type of the parameter, and that it's at least
an
           // in parameter.  Now check to see whether it's also in the outputs Vector.  If
it is,
           // then it's an inout parameter.
  -        // Don't bother doing this if the parameters are wrapped since their
  -        // names won't be the part names.
  -        if (outdex >= 0 && !wrapped) {
  +        if (outdex >= 0) {
               Parameter outParam = (Parameter)outputs.get(outdex);
               if (p.getType().equals(outParam.getType())) {
                   outputs.remove(outdex);
  @@ -1143,7 +1141,12 @@
                   // If we're here, we have both an input and an output
                   // part with the same name but different types.... guess
                   // it's not really an inout....
  -                ++parameters.inputs;  // Is this OK??
  +                throw new IOException(JavaUtils.getMessage("differentTypes00", 
  +                     new String[] { p.getName(), 
  +                                    p.getType().getQName().toString(), 
  +                                    outParam.getType().getQName().toString()
  +                                   }
  +                ));
               }
           } else {
               ++parameters.inputs;
  
  
  
  1.2       +2 -2      xml-axis/java/test/wsdl/import3/MultiImpIncl/wsdl/MultiImp.wsdl
  
  Index: MultiImp.wsdl
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/import3/MultiImpIncl/wsdl/MultiImp.wsdl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MultiImp.wsdl	26 Jul 2002 15:48:27 -0000	1.1
  +++ MultiImp.wsdl	2 Aug 2002 16:05:57 -0000	1.2
  @@ -17,12 +17,12 @@
   
     <message name="DataRequestMessage">
       <part name="header" element="ses:Session"/>
  -    <part name="body" element="cmp:DataRequest"/>
  +    <part name="bodyin" element="cmp:DataRequest"/>
     </message>
   
     <message name="DataResponseMessage">
       <part name="header" element="ses:Session"/>
  -    <part name="body" element="cmp:DataRequestResponse"/>
  +    <part name="bodyout" element="cmp:DataRequestResponse"/>
     </message>
   
     <portType name="multiImpInclDataPortType">
  
  
  
  1.33      +1 -0      xml-axis/java/src/org/apache/axis/utils/axisNLS.properties
  
  Index: axisNLS.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/axisNLS.properties,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- axisNLS.properties	1 Aug 2002 22:13:09 -0000	1.32
  +++ axisNLS.properties	2 Aug 2002 16:05:57 -0000	1.33
  @@ -953,4 +953,5 @@
   wrongNamespace00=The XML Schema type ''{0}'' is not valid in the Schema version ''{1}''.
   
   onlyOneBodyFor12=Only one body allowed for SOAP 1.2 RPC
  +differentTypes00=Error: The input and output parameter have the same name, ''{0}'', but
are defined with type ''{1}'' and also with type ''{2}''.
   
  
  
  

Mime
View raw message