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/test/wsdl/marshall3/types ShortArrayTest.java ShortArrayTestResponse.java StringArrayTest.java StringArrayTestResponse.java
Date Fri, 29 Apr 2005 18:48:16 GMT
dims        2005/04/29 11:48:16

  Added:       java/test/wsdl/marshall3
                        Marshall3TestPort1SoapBindingImpl.java
                        MarshallTestServiceTestCase.java build.xml
                        marshall3.wsdl
               java/test/wsdl/marshall3/types ShortArrayTest.java
                        ShortArrayTestResponse.java StringArrayTest.java
                        StringArrayTestResponse.java
  Log:
  As promised the test case for replicating jonas failures.
  
  Revision  Changes    Path
  1.1                  ws-axis/java/test/wsdl/marshall3/Marshall3TestPort1SoapBindingImpl.java
  
  Index: Marshall3TestPort1SoapBindingImpl.java
  ===================================================================
  /**
   * Marshall3TestPort1SoapBindingImpl.java
   *
   * This file was auto-generated from WSDL
   * by the Apache Axis 1.2RC3 Apr 29, 2005 (10:05:23 EDT) WSDL2Java emitter.
   */
  
  package test.wsdl.marshall3;
  
  import test.wsdl.marshall3.types.ShortArrayTest;
  import test.wsdl.marshall3.types.ShortArrayTestResponse;
  import test.wsdl.marshall3.types.StringArrayTest;
  import test.wsdl.marshall3.types.StringArrayTestResponse;
  
  public class Marshall3TestPort1SoapBindingImpl implements test.wsdl.marshall3.MarshallTest{
      public ShortArrayTestResponse shortArrayTest(ShortArrayTest parameters) throws java.rmi.RemoteException
{
          return new ShortArrayTestResponse(parameters.getShortArray());
      }
  
      public StringArrayTestResponse stringArrayTest(StringArrayTest parameters) throws java.rmi.RemoteException
{
          return new StringArrayTestResponse(parameters.getStringArray());
      }
  
      public short[] echoShortListTypeTest(short[] fooShortListTypeRequest) throws java.rmi.RemoteException
{
          return fooShortListTypeRequest;
      }
  
  }
  
  
  
  1.1                  ws-axis/java/test/wsdl/marshall3/MarshallTestServiceTestCase.java
  
  Index: MarshallTestServiceTestCase.java
  ===================================================================
  /**
   * MarshallTestServiceTestCase.java
   *
   * This file was auto-generated from WSDL
   * by the Apache Axis 1.2RC3 Apr 29, 2005 (10:05:23 EDT) WSDL2Java emitter.
   */
  
  package test.wsdl.marshall3;
  
  import test.wsdl.marshall3.types.ShortArrayTest;
  import test.wsdl.marshall3.types.ShortArrayTestResponse;
  import test.wsdl.marshall3.types.StringArrayTest;
  import test.wsdl.marshall3.types.StringArrayTestResponse;
  
  public class MarshallTestServiceTestCase extends junit.framework.TestCase {
      public MarshallTestServiceTestCase(java.lang.String name) {
          super(name);
      }
  
      public void test1Marshall3TestPort1ShortArrayTest() throws Exception {
          test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub binding;
          try {
              binding = (test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub)
                            new test.wsdl.marshall3.MarshallTestServiceLocator().getMarshall3TestPort1();
          }
          catch (javax.xml.rpc.ServiceException jre) {
              if(jre.getLinkedCause()!=null)
                  jre.getLinkedCause().printStackTrace();
              throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught:
" + jre);
          }
          assertNotNull("binding is null", binding);
  
          // Time out after a minute
          binding.setTimeout(60000);
  
          // Test operation
          ShortArrayTestResponse value = null;
          value = binding.shortArrayTest(new ShortArrayTest(new short[]{1,2,3}));
          assertEquals(3,value.getShortArray().length);
      }
  
      public void test2Marshall3TestPort1StringArrayTest() throws Exception {
          test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub binding;
          try {
              binding = (test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub)
                            new test.wsdl.marshall3.MarshallTestServiceLocator().getMarshall3TestPort1();
          }
          catch (javax.xml.rpc.ServiceException jre) {
              if(jre.getLinkedCause()!=null)
                  jre.getLinkedCause().printStackTrace();
              throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught:
" + jre);
          }
          assertNotNull("binding is null", binding);
  
          // Time out after a minute
          binding.setTimeout(60000);
  
          // Test operation
          StringArrayTestResponse value = null;
          value = binding.stringArrayTest(new StringArrayTest(new String[]{"1","2","","4",null,"6"}));
          // TBD - validate results
          assertEquals(6,value.getStringArray().length);
      }
  
      public void test3Marshall3TestPort1EchoShortListTypeTest() throws Exception {
          test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub binding;
          try {
              binding = (test.wsdl.marshall3.Marshall3TestPort1SoapBindingStub)
                            new test.wsdl.marshall3.MarshallTestServiceLocator().getMarshall3TestPort1();
          }
          catch (javax.xml.rpc.ServiceException jre) {
              if(jre.getLinkedCause()!=null)
                  jre.getLinkedCause().printStackTrace();
              throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught:
" + jre);
          }
          assertNotNull("binding is null", binding);
  
          // Time out after a minute
          binding.setTimeout(60000);
  
          // Test operation
          short[] value = null;
          value = binding.echoShortListTypeTest(new short[]{1,2,3});
          // TBD - validate results
          assertEquals(3,value.length);
      }
  
  }
  
  
  
  1.1                  ws-axis/java/test/wsdl/marshall3/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0" ?>
  <!DOCTYPE project [
          <!ENTITY properties SYSTEM "file:../../../xmls/properties.xml">
          <!ENTITY paths  SYSTEM "file:../../../xmls/path_refs.xml">
          <!ENTITY taskdefs SYSTEM "file:../../../xmls/taskdefs.xml">
          <!ENTITY taskdefs_post_compile SYSTEM "file:../../../xmls/taskdefs_post_compile.xml">
          <!ENTITY targets SYSTEM "file:../../../xmls/targets.xml">
  ]>
  
  <!-- ===================================================================
  <description>
     Test/Sample Component file for Axis
  
  Notes:
     This is a build file for use with the Jakarta Ant build tool.
  
  Prerequisites:
  
     jakarta-ant from http://jakarta.apache.org
  
  Build Instructions:
     To compile
          ant compile
     To execute
          ant run
  
  Author:
    Matt Seibert mseibert@us.ibm.com
  
  Copyright:
    Copyright (c) 2002-2003 Apache Software Foundation.
  </description>
  ==================================================================== -->
  
  <project default="compile">
  
  <property name="axis.home" location="../../.." />
  <property name="componentName" value="test/wsdl/marshall3" />
          &properties;
          &paths;
          &taskdefs;
          &taskdefs_post_compile;
          &targets;
  
  <target name="clean">
      <echo message="Removing ${build.dir}/classes/${componentName} and ${build.dir}/work/${componentName}"
/>
      <delete dir="${build.dir}/classes/${componentName}"/>
      <delete dir="${build.dir}/work/${componentName}"/>
  </target>
  
  <target name="copy" depends="setenv"/>
  
  <target name="compile" depends="copy">
    <echo message="Compiling test.wsdl.marshall3"/>
      <!-- marshall3 Sample Test -->
      <wsdl2java url="${axis.home}/test/wsdl/marshall3/marshall3.wsdl"
                 output="${axis.home}/build/work"
                 deployscope="session"
                 serverSide="yes"
                 typeMappingVersion="1.3"
                 helperGen="true"
                 testcase="yes"
                 wrapArrays="yes">
  	    <mapping namespace="http://marshalltestservice.org/" package="test.wsdl.marshall3"/>
  	    <mapping namespace="http://marshalltestservice.org/types" package="test.wsdl.marshall3.types"/>
  	    <mapping namespace="http://marshalltestservice.org/types2" package="test.wsdl.marshall3.types2"/>
      </wsdl2java>
  
      <copy todir="${build.dir}/work/test/wsdl/marshall3" overwrite="yes">
        <fileset dir="${axis.home}/test/wsdl/marshall3">
          <include name="**/*.java"/>
        </fileset>
      </copy>
  
      <javac srcdir="${build.dir}/work" destdir="${build.dest}" nowarn="${nowarn}" source="${source}"
fork="${javac.fork}"
             debug="${debug}">
        <classpath refid="classpath" />
        <include name="test/wsdl/marshall3/*.java" />
      </javac>
  
  </target>
  
  <target name="run" >
    <antcall target="execute-Component" />
  </target>
  
  </project>
  
  
  
  1.1                  ws-axis/java/test/wsdl/marshall3/marshall3.wsdl
  
  Index: marshall3.wsdl
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <wsdl:definitions xmlns:impl="http://marshalltestservice.org/" 
                    xmlns:intf="http://marshalltestservice.org/" 
                    xmlns:tns1="http://marshalltestservice.org/types" 
                    xmlns:tns2="http://marshalltestservice.org/types2" 
                    xmlns="http://schemas.xmlsoap.org/wsdl/" 
                    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
                    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
                    targetNamespace="http://marshalltestservice.org/">
      <wsdl:types>
          <schema targetNamespace="http://marshalltestservice.org/types" xmlns="http://www.w3.org/2001/XMLSchema">
              <complexType name="ShortArrayTest">
                  <sequence>
                      <element name="shortArray" type="short" minOccurs="0" maxOccurs="unbounded"/>
                  </sequence>
              </complexType>
              <complexType name="ShortArrayTestResponse">
                  <sequence>
                      <element name="shortArray" type="short" minOccurs="0" maxOccurs="unbounded"/>
                  </sequence>
              </complexType>
              <complexType name="StringArrayTest">
                  <sequence>
                      <element name="StringArray" type="string" nillable="true" minOccurs="0"
maxOccurs="unbounded"/>
                  </sequence>
              </complexType>
              <complexType name="StringArrayTestResponse">
                  <sequence>
                      <element name="StringArray" type="string" nillable="true" minOccurs="0"
maxOccurs="unbounded"/>
                  </sequence>
              </complexType>
              <element name="ShortArrayTest" type="tns1:ShortArrayTest"/>
              <element name="ShortArrayTestResponse" type="tns1:ShortArrayTestResponse"/>
              <element name="StringArrayTest" type="tns1:StringArrayTest"/>
              <element name="StringArrayTestResponse" type="tns1:StringArrayTestResponse"/>
          </schema>
          <schema targetNamespace="http://marshalltestservice.org/types2" xmlns="http://www.w3.org/2001/XMLSchema">
              <simpleType name="FooShortListType">
                  <list itemType="short"/>
              </simpleType>
              <element name="FooShortListType" type="tns2:FooShortListType"/>
          </schema>
      </wsdl:types>
      <message name="MarshallTest_shortArrayTest">
          <part name="parameters" element="tns1:ShortArrayTest"/>
      </message>
      <message name="MarshallTest_shortArrayTestResponse">
          <part name="result" element="tns1:ShortArrayTestResponse"/>
      </message>
      <message name="MarshallTest_stringArrayTest">
          <part name="parameters" element="tns1:StringArrayTest"/>
      </message>
      <message name="MarshallTest_stringArrayTestResponse">
          <part name="result" element="tns1:StringArrayTestResponse"/>
      </message>
      <message name="FooShortListTypeRequest">
          <part name="fooShortListTypeRequest" element="tns2:FooShortListType"/>
      </message>
      <message name="FooShortListTypeResponse">
          <part name="fooShortListTypeResponse" element="tns2:FooShortListType"/>
      </message>
      <portType name="MarshallTest">
          <operation name="shortArrayTest">
              <input message="impl:MarshallTest_shortArrayTest"/>
              <output message="impl:MarshallTest_shortArrayTestResponse"/>
          </operation>
          <operation name="stringArrayTest">
              <input message="impl:MarshallTest_stringArrayTest"/>
              <output message="impl:MarshallTest_stringArrayTestResponse"/>
          </operation>
          <operation name="echoShortListTypeTest">
              <input message="impl:FooShortListTypeRequest"/>
              <output message="impl:FooShortListTypeResponse"/>
          </operation>
      </portType>
      <binding name="Marshall3TestPort1SoapBinding" type="impl:MarshallTest">
          <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
          <operation name="shortArrayTest">
              <soap:operation/>
              <input>
                  <soap:body use="literal"/>
              </input>
              <output>
                  <soap:body use="literal"/>
              </output>
          </operation>
          <operation name="stringArrayTest">
              <soap:operation/>
              <input>
                  <soap:body use="literal"/>
              </input>
              <output>
                  <soap:body use="literal"/>
              </output>
          </operation>
          <operation name="echoShortListTypeTest">
              <soap:operation/>
              <input>
                  <soap:body use="literal"/>
              </input>
              <output>
                  <soap:body use="literal"/>
              </output>
          </operation>
      </binding>
      <service name="MarshallTestService">
          <port name="Marshall3TestPort1" binding="impl:Marshall3TestPort1SoapBinding">
              <soap:address location="http://localhost:8080/axis/services/Marshall3TestPort1"/>
          </port>
      </service>
  </wsdl:definitions>
  
  
  
  1.1                  ws-axis/java/test/wsdl/marshall3/types/ShortArrayTest.java
  
  Index: ShortArrayTest.java
  ===================================================================
  /**
   * ShortArrayTest.java
   *
   * This file was auto-generated from WSDL
   * by the Apache Axis 1.2RC3 Apr 29, 2005 (10:05:23 EDT) WSDL2Java emitter.
   */
  package test.wsdl.marshall3.types;
  
  public class ShortArrayTest  implements java.io.Serializable {
      private short[] shortArray;
  
      public ShortArrayTest() {
      }
  
      public ShortArrayTest(
              short[] shortArray) {
          this.shortArray = shortArray;
      }
  
      /**
       * Gets the shortArray value for this ShortArrayTest.
       *
       * @return shortArray
       */
      public short[] getShortArray() {
          return shortArray;
      }
  
      /**
       * Sets the shortArray value for this ShortArrayTest.
       *
       * @param shortArray
       */
      public void setShortArray(short[] shortArray) {
          this.shortArray = shortArray;
      }
  }
  
  
  
  1.1                  ws-axis/java/test/wsdl/marshall3/types/ShortArrayTestResponse.java
  
  Index: ShortArrayTestResponse.java
  ===================================================================
  /**
   * ShortArrayTestResponse.java
   *
   * This file was auto-generated from WSDL
   * by the Apache Axis 1.2RC3 Apr 29, 2005 (10:05:23 EDT) WSDL2Java emitter.
   */
  package test.wsdl.marshall3.types;
  
  public class ShortArrayTestResponse  implements java.io.Serializable {
      private short[] shortArray;
  
      public ShortArrayTestResponse() {
      }
  
      public ShortArrayTestResponse(
              short[] shortArray) {
          this.shortArray = shortArray;
      }
  
      /**
       * Gets the shortArray value for this ShortArrayTestResponse.
       *
       * @return shortArray
       */
      public short[] getShortArray() {
          return shortArray;
      }
  
      /**
       * Sets the shortArray value for this ShortArrayTestResponse.
       *
       * @param shortArray
       */
      public void setShortArray(short[] shortArray) {
          this.shortArray = shortArray;
      }
  }
  
  
  
  1.1                  ws-axis/java/test/wsdl/marshall3/types/StringArrayTest.java
  
  Index: StringArrayTest.java
  ===================================================================
  /**
   * StringArrayTest.java
   *
   * This file was auto-generated from WSDL
   * by the Apache Axis 1.2RC3 Apr 29, 2005 (10:05:23 EDT) WSDL2Java emitter.
   */
  package test.wsdl.marshall3.types;
  
  public class StringArrayTest  implements java.io.Serializable {
      private java.lang.String[] stringArray;
  
      public StringArrayTest() {
      }
  
      public StringArrayTest(
              java.lang.String[] stringArray) {
          this.stringArray = stringArray;
      }
  
      /**
       * Gets the stringArray value for this StringArrayTest.
       *
       * @return stringArray
       */
      public java.lang.String[] getStringArray() {
          return stringArray;
      }
  
      /**
       * Sets the stringArray value for this StringArrayTest.
       *
       * @param stringArray
       */
      public void setStringArray(java.lang.String[] stringArray) {
          this.stringArray = stringArray;
      }
  }
  
  
  
  1.1                  ws-axis/java/test/wsdl/marshall3/types/StringArrayTestResponse.java
  
  Index: StringArrayTestResponse.java
  ===================================================================
  /**
   * StringArrayTestResponse.java
   *
   * This file was auto-generated from WSDL
   * by the Apache Axis 1.2RC3 Apr 29, 2005 (10:05:23 EDT) WSDL2Java emitter.
   */
  package test.wsdl.marshall3.types;
  
  public class StringArrayTestResponse  implements java.io.Serializable {
      private java.lang.String[] stringArray;
  
      public StringArrayTestResponse() {
      }
  
      public StringArrayTestResponse(
              java.lang.String[] stringArray) {
          this.stringArray = stringArray;
      }
  
      /**
       * Gets the stringArray value for this StringArrayTestResponse.
       *
       * @return stringArray
       */
      public java.lang.String[] getStringArray() {
          return stringArray;
      }
  
      /**
       * Sets the stringArray value for this StringArrayTestResponse.
       *
       * @param stringArray
       */
      public void setStringArray(java.lang.String[] stringArray) {
          this.stringArray = stringArray;
      }
  }
  
  
  

Mime
View raw message