axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@apache.org
Subject cvs commit: xml-axis/java/test/wsdl/types ComprehensiveTypes.wsdl
Date Tue, 11 Dec 2001 16:43:28 GMT
butek       01/12/11 08:43:28

  Modified:    java/src/org/apache/axis/wsdl/toJava JavaTestCaseWriter.java
               java/test/wsdl/types ComprehensiveTypes.wsdl
  Log:
  The comprehensive types test is growing, and finding more bugs, this time just in
  the emission of the TestCase class.
  
  Revision  Changes    Path
  1.2       +16 -1     xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java
  
  Index: JavaTestCaseWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaTestCaseWriter.java	2001/12/11 15:08:47	1.1
  +++ JavaTestCaseWriter.java	2001/12/11 16:43:28	1.2
  @@ -59,6 +59,7 @@
   import java.util.HashMap;
   import java.util.Iterator;
   import java.util.Map;
  +import java.util.Vector;
   
   import javax.wsdl.Binding;
   import javax.wsdl.Fault;
  @@ -238,7 +239,21 @@
                       } else if (paramType.equals("byte[]")) {
                           pw.print("new byte[0]");
                       } else {
  -                        pw.print("new " + paramType + "()");
  +
  +                        // We have some constructed type.
  +                        Vector v = SchemaUtils.getEnumerationBaseAndValues(
  +                                param.type.getNode(), symbolTable);
  +
  +                        if (v != null) {
  +
  +                            // This constructed type is an enumeration.  Use the first
one.
  +                            String enumeration = (String) v.get(1);
  +                            pw.print(paramType + "." + enumeration);
  +                        } else {
  +
  +                            // This constructed type is a normal type, instantiate it.
  +                            pw.print("new " + paramType + "()");
  +                        }
                       }
                   }
                   pw.print(suffix);
  
  
  
  1.2       +183 -0    xml-axis/java/test/wsdl/types/ComprehensiveTypes.wsdl
  
  Index: ComprehensiveTypes.wsdl
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/types/ComprehensiveTypes.wsdl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ComprehensiveTypes.wsdl	2001/12/07 18:32:44	1.1
  +++ ComprehensiveTypes.wsdl	2001/12/11 16:43:28	1.2
  @@ -71,6 +71,18 @@
       <part name="soapBase64" type="soapenc:base64"/>
     </message>
   
  +  <message name="enum">
  +    <part name="enum" type="typens:enum"/>
  +  </message>
  +
  +  <message name="complexAll">
  +    <part name="complexAll" type="typens:complexAll"/>
  +  </message>
  +
  +  <message name="complexSequence">
  +    <part name="complexSequence" type="typens:complexSequence"/>
  +  </message>
  +
     <!-- port type declns -->
     <portType name="TypeTest">
       <operation name="allPrimitivesIn">
  @@ -85,6 +97,42 @@
         <input message="tns:empty"/>
         <output message="tns:allPrimitives"/>
       </operation>
  +    <operation name="enumIn">
  +      <input message="tns:enum"/>
  +      <output message="tns:empty"/>
  +    </operation>
  +    <operation name="enumInout">
  +      <input message="tns:enum"/>
  +      <output message="tns:enum"/>
  +    </operation>
  +    <operation name="enumOut">
  +      <input message="tns:empty"/>
  +      <output message="tns:enum"/>
  +    </operation>
  +    <operation name="complexAllIn">
  +      <input message="tns:complexAll"/>
  +      <output message="tns:empty"/>
  +    </operation>
  +    <operation name="complexAllInout">
  +      <input message="tns:complexAll"/>
  +      <output message="tns:complexAll"/>
  +    </operation>
  +    <operation name="complexAllOut">
  +      <input message="tns:empty"/>
  +      <output message="tns:complexAll"/>
  +    </operation>
  +    <operation name="complexSequenceIn">
  +      <input message="tns:complexSequence"/>
  +      <output message="tns:empty"/>
  +    </operation>
  +    <operation name="complexSequenceInout">
  +      <input message="tns:complexSequence"/>
  +      <output message="tns:complexSequence"/>
  +    </operation>
  +    <operation name="complexSequenceOut">
  +      <input message="tns:empty"/>
  +      <output message="tns:complexSequence"/>
  +    </operation>
     </portType>
   
     <!-- binding declns -->
  @@ -123,6 +171,141 @@
         </output>
       </operation>
       <operation name="allPrimitivesOut">
  +      <soap:operation soapAction=""/>
  +      <input>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </input>
  +      <output>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </output>
  +    </operation>
  +    <operation name="enumIn">
  +      <soap:operation soapAction=""/>
  +      <input>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </input>
  +      <output>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </output>
  +    </operation>
  +    <operation name="enumInout">
  +      <soap:operation soapAction=""/>
  +      <input>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </input>
  +      <output>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </output>
  +    </operation>
  +    <operation name="enumOut">
  +      <soap:operation soapAction=""/>
  +      <input>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </input>
  +      <output>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </output>
  +    </operation>
  +    <operation name="complexAllIn">
  +      <soap:operation soapAction=""/>
  +      <input>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </input>
  +      <output>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </output>
  +    </operation>
  +    <operation name="complexAllInout">
  +      <soap:operation soapAction=""/>
  +      <input>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </input>
  +      <output>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </output>
  +    </operation>
  +    <operation name="complexAllOut">
  +      <soap:operation soapAction=""/>
  +      <input>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </input>
  +      <output>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </output>
  +    </operation>
  +    <operation name="complexSequenceIn">
  +      <soap:operation soapAction=""/>
  +      <input>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </input>
  +      <output>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </output>
  +    </operation>
  +    <operation name="complexSequenceInout">
  +      <soap:operation soapAction=""/>
  +      <input>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </input>
  +      <output>
  +        <soap:body
  +            use="encoded"
  +            namespace=""
  +            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </output>
  +    </operation>
  +    <operation name="complexSequenceOut">
         <soap:operation soapAction=""/>
         <input>
           <soap:body
  
  
  

Mime
View raw message