dims        2002/12/26 15:26:23

  Modified:    java/test/wsdl/interop4/groupG/dime/rpc build.xml
                        dime-rpc.wsdl
  Added:       java/test/wsdl/interop4/groupG/dime/rpc
                        AttachmentsBindingImpl.java
                        DimeRPCInteropTestCase.java
  Log:
  Initial checkin for dime/rpc GroupG test. WSDL2Java does not understand dime 
extensions right now. It just ignores them...So this is just a placeholder.
  
  Revision  Changes    Path
  1.3       +9 -10     xml-axis/java/test/wsdl/interop4/groupG/dime/rpc/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/interop4/groupG/dime/rpc/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml 29 Nov 2002 23:32:52 -0000      1.2
  +++ build.xml 26 Dec 2002 23:26:22 -0000      1.3
  @@ -54,9 +54,10 @@
       <!-- generate skeletons -->
       <wsdl2java url="${axis.home}/test/wsdl/interop4/groupG/dime/rpc/dime-rpc.wsdl"
                  output="${root.dir}/build/work" 
  -               skeletonDeploy="no"
  +               skeletonDeploy="yes"
                  testCase="yes"
  -               serverSide="yes">
  +               serverSide="yes"
  +               timeout="-1">
           <mapping namespace="http://soapinterop.org/attachments/wsdl"; 
package="test.wsdl.interop4.groupG.dime.rpc"/>
           <mapping namespace="http://soapinterop.org/"; 
package="test.wsdl.interop4.groupG.dime.rpc"/>
           <mapping namespace="http://soapinterop.org/attachments/xsd"; 
package="test.wsdl.interop4.groupG.dime.rpc.xsd"/>
  @@ -70,14 +71,12 @@
       </wsdl2java>
   
       <mkdir dir="${build.dest}"/>
  -    <!--
  -    <copy file="BaseTypesInteropTestsTestCase.java"
  -         todir="${root.dir}/build/work/test/wsdl/interop5/basetype/"
  -         overwrite="yes"/>
  -    <copy file="InteropTestsBindingImpl.java"
  -         todir="${root.dir}/build/work/test/wsdl/interop5/basetype/"
  -         overwrite="yes"/>
  -    -->
  +    <copy 
file="${axis.home}/test/wsdl/interop4/groupG/dime/rpc/DimeRPCInteropTestCase.java"
  +          todir="${root.dir}/build/work/test/wsdl/interop4/groupG/dime/rpc"
  +          overwrite="yes"/>
  +    <copy 
file="${axis.home}/test/wsdl/interop4/groupG/dime/rpc/AttachmentsBindingImpl.java"
  +          todir="${root.dir}/build/work/test/wsdl/interop4/groupG/dime/rpc"
  +          overwrite="yes"/>
       <!-- compile the skeletons -->
       <javac srcdir="${build.dir}/work"
         destdir="${build.dest}" debug="on">
  
  
  
  1.2       +5 -0      xml-axis/java/test/wsdl/interop4/groupG/dime/rpc/dime-rpc.wsdl
  
  Index: dime-rpc.wsdl
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/interop4/groupG/dime/rpc/dime-rpc.wsdl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- dime-rpc.wsdl     1 Nov 2002 21:43:04 -0000       1.1
  +++ dime-rpc.wsdl     26 Dec 2002 23:26:22 -0000      1.2
  @@ -163,4 +163,9 @@
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:binding>
  +    <wsdl:service name="DimeRPCInterop">
  +         <wsdl:port name="DimeRPCSoapPort" binding="AttachmentsBinding">
  +            <soap:address 
location="http://localhost:8080/axis/services/DimeRPCSoapPort"/>
  +        </wsdl:port>
  +    </wsdl:service>
   </wsdl:definitions>
  
  
  
  1.1                  
xml-axis/java/test/wsdl/interop4/groupG/dime/rpc/AttachmentsBindingImpl.java
  
  Index: AttachmentsBindingImpl.java
  ===================================================================
  /**
   * AttachmentsBindingImpl.java
   *
   * This file was auto-generated from WSDL
   * by the Apache Axis WSDL2Java emitter.
   */
  
  package test.wsdl.interop4.groupG.dime.rpc;
  
  public class AttachmentsBindingImpl implements 
test.wsdl.interop4.groupG.dime.rpc.AttachmentsPortType{
      public test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary 
echoAttachment(test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary in) throws 
java.rmi.RemoteException {
          return in;
      }
  
      public test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary[] 
echoAttachments(test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary[] in) throws 
java.rmi.RemoteException {
          return in;
      }
  
      public byte[] 
echoAttachmentAsBase64(test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary in) 
throws java.rmi.RemoteException {
          return in.getValue();
      }
  
      public test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary 
echoBase64AsAttachment(byte[] in) throws java.rmi.RemoteException {
          return new test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary(in);
      }
  
      public void echoUnrefAttachments() throws java.rmi.RemoteException {
          //TODO: What should we do here?
      }
  
      public java.lang.String 
echoAttachmentAsString(test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedText in) 
throws java.rmi.RemoteException {
          return new String(in.getValue());
      }
  }
  
  
  
  1.1                  
xml-axis/java/test/wsdl/interop4/groupG/dime/rpc/DimeRPCInteropTestCase.java
  
  Index: DimeRPCInteropTestCase.java
  ===================================================================
  /**
   * DimeRPCInteropTestCase.java
   *
   * This file was auto-generated from WSDL
   * by the Apache Axis WSDL2Java emitter.
   */
  
  package test.wsdl.interop4.groupG.dime.rpc;
  
  import java.util.Arrays;
  
  public class DimeRPCInteropTestCase extends junit.framework.TestCase {
      public DimeRPCInteropTestCase(java.lang.String name) {
          super(name);
      }
      public void test1DimeRPCSoapPortEchoAttachment() throws Exception {
          test.wsdl.interop4.groupG.dime.rpc.AttachmentsPortType binding;
          try {
              binding = new 
test.wsdl.interop4.groupG.dime.rpc.DimeRPCInteropLocator().getDimeRPCSoapPort();
          }
          catch (javax.xml.rpc.ServiceException jre) {
              if(jre.getLinkedCause()!=null)
                  jre.getLinkedCause().printStackTrace();
              throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException 
caught: " + jre);
          }
          assertTrue("binding is null", binding != null);
  
          test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary input = new 
test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary("EchoAttachment".getBytes());
          // Test operation
          test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary output = null;
          output = binding.echoAttachment(input);
          // TBD - validate results
          assertTrue(Arrays.equals(input.getValue(),output.getValue()));
      }
  
      public void test2DimeRPCSoapPortEchoAttachments() throws Exception {
          test.wsdl.interop4.groupG.dime.rpc.AttachmentsPortType binding;
          try {
              binding = new 
test.wsdl.interop4.groupG.dime.rpc.DimeRPCInteropLocator().getDimeRPCSoapPort();
          }
          catch (javax.xml.rpc.ServiceException jre) {
              if(jre.getLinkedCause()!=null)
                  jre.getLinkedCause().printStackTrace();
              throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException 
caught: " + jre);
          }
          assertTrue("binding is null", binding != null);
  
          test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary input[] = new 
test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary[2];
          input[0] = new 
test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary("EchoAttachments0".getBytes());
 
          input[1] = new 
test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary("EchoAttachments1".getBytes());
          
          // Test operation
          test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary[] output = null;
          output = binding.echoAttachments(input);
          // TBD - validate results
          assertTrue(Arrays.equals(input[0].getValue(),output[0].getValue()));
          assertTrue(Arrays.equals(input[1].getValue(),output[1].getValue()));
      }
  
      public void test3DimeRPCSoapPortEchoAttachmentAsBase64() throws Exception {
          test.wsdl.interop4.groupG.dime.rpc.AttachmentsPortType binding;
          try {
              binding = new 
test.wsdl.interop4.groupG.dime.rpc.DimeRPCInteropLocator().getDimeRPCSoapPort();
          }
          catch (javax.xml.rpc.ServiceException jre) {
              if(jre.getLinkedCause()!=null)
                  jre.getLinkedCause().printStackTrace();
              throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException 
caught: " + jre);
          }
          assertTrue("binding is null", binding != null);
  
          test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary input = new 
test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary("EchoAttachmentAsBase64".getBytes());
          // Test operation
          byte[] output = null;
          output = binding.echoAttachmentAsBase64(input);
          // TBD - validate results
          assertTrue(Arrays.equals(input.getValue(),output));
      }
  
      public void test4DimeRPCSoapPortEchoBase64AsAttachment() throws Exception {
          test.wsdl.interop4.groupG.dime.rpc.AttachmentsPortType binding;
          try {
              binding = new 
test.wsdl.interop4.groupG.dime.rpc.DimeRPCInteropLocator().getDimeRPCSoapPort();
          }
          catch (javax.xml.rpc.ServiceException jre) {
              if(jre.getLinkedCause()!=null)
                  jre.getLinkedCause().printStackTrace();
              throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException 
caught: " + jre);
          }
          assertTrue("binding is null", binding != null);
  
          byte input[] = "EchoBase64AsAttachment".getBytes();
          // Test operation
          test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedBinary output = null;
          output = binding.echoBase64AsAttachment(input);
          // TBD - validate results
          assertTrue(Arrays.equals(input,output.getValue()));
      }
  
      public void test5DimeRPCSoapPortEchoUnrefAttachments() throws Exception {
          test.wsdl.interop4.groupG.dime.rpc.AttachmentsPortType binding;
          try {
              binding = new 
test.wsdl.interop4.groupG.dime.rpc.DimeRPCInteropLocator().getDimeRPCSoapPort();
          }
          catch (javax.xml.rpc.ServiceException jre) {
              if(jre.getLinkedCause()!=null)
                  jre.getLinkedCause().printStackTrace();
              throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException 
caught: " + jre);
          }
          assertTrue("binding is null", binding != null);
  
          // TODO: What do we do here?
          // Test operation
          binding.echoUnrefAttachments();
          // TBD - validate results
      }
  
      public void test6DimeRPCSoapPortEchoAttachmentAsString() throws Exception {
          test.wsdl.interop4.groupG.dime.rpc.AttachmentsPortType binding;
          try {
              binding = new 
test.wsdl.interop4.groupG.dime.rpc.DimeRPCInteropLocator().getDimeRPCSoapPort();
          }
          catch (javax.xml.rpc.ServiceException jre) {
              if(jre.getLinkedCause()!=null)
                  jre.getLinkedCause().printStackTrace();
              throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException 
caught: " + jre);
          }
          assertTrue("binding is null", binding != null);
  
          test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedText input = new 
test.wsdl.interop4.groupG.dime.rpc.xsd.ReferencedText("3344");
          // Test operation
          java.lang.String output = null;
          output = binding.echoAttachmentAsString(input);
      }
  }
  
  
  


Reply via email to