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/opStylesDoc VerifyTestCase.java build.xml opStylesDoc.wsdl
Date Thu, 08 Apr 2004 12:36:56 GMT
dims        2004/04/08 05:36:56

  Modified:    java/src/org/apache/axis/message RPCHandler.java
  Added:       java/test/wsdl/opStylesDoc VerifyTestCase.java build.xml
                        opStylesDoc.wsdl
  Log:
  Fix for AXIS-1291 - could not find deserialzer for type {http://xml.apache.org/axis/}Void
  from Jarek Gawor
  
  Revision  Changes    Path
  1.74      +7 -1      ws-axis/java/src/org/apache/axis/message/RPCHandler.java
  
  Index: RPCHandler.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/RPCHandler.java,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- RPCHandler.java	25 Feb 2004 14:02:42 -0000	1.73
  +++ RPCHandler.java	8 Apr 2004 12:36:56 -0000	1.74
  @@ -30,6 +30,7 @@
   import org.apache.axis.encoding.Deserializer;
   import org.apache.axis.encoding.DeserializerImpl;
   import org.apache.axis.encoding.MethodTarget;
  +import org.apache.axis.encoding.XMLType;
   import org.apache.axis.utils.JavaUtils;
   import org.apache.axis.utils.Messages;
   import org.apache.axis.soap.SOAPConstants;
  @@ -225,7 +226,12 @@
                   type = paramDesc.getTypeQName();
               }
           }
  -            
  +
  +        if (type.equals(XMLType.AXIS_VOID)) {
  +            Deserializer nilDSer =  new DeserializerImpl();
  +            return (SOAPHandler) nilDSer;
  +        }
  +
           // If the nil attribute is set, just
           // return the base DeserializerImpl.
           // Register the value target to set the value
  
  
  
  1.1                  ws-axis/java/test/wsdl/opStylesDoc/VerifyTestCase.java
  
  Index: VerifyTestCase.java
  ===================================================================
  package test.wsdl.opStylesDoc;
  
  import junit.framework.AssertionFailedError;
  import junit.framework.TestCase;
  
  import javax.xml.rpc.ServiceException;
  import javax.xml.rpc.Stub;
  import java.rmi.RemoteException;
  
  public class VerifyTestCase extends junit.framework.TestCase {
      public VerifyTestCase(String name) {
          super(name);
      }
  
      public void testOpStyles() throws Exception {
          OpStyles binding;
          try {
              binding = new OpStyleDocServiceLocator().getOpStylesDoc();
          }
          catch (ServiceException jre) {
              throw new AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
          }
  
          binding.requestResponse();
          binding.requestResponse2();
          binding.requestResponse3(null);
  
     } // testOpStyles
  } // class VerifyTestCase
  
  
  
  1.1                  ws-axis/java/test/wsdl/opStylesDoc/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/opStylesDoc" />
          &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.opStylesDoc"/>
      <!-- Operation style test (oneway, request/response, -->
      <!-- solicit/response, notification -->
      <wsdl2java url="${axis.home}/test/wsdl/opStylesDoc/opStylesDoc.wsdl"
                 output="${axis.home}/build/work"
                 serverSide="yes"
                 skeletonDeploy="yes"
                 testcase="yes">
      </wsdl2java>
  
      <copy todir="${build.dir}/work/test/wsdl/opStylesDoc" overwrite="yes">
        <fileset dir="${axis.home}/test/wsdl/opStylesDoc">
          <include name="*TestCase.java"/>
          <include name="*Impl.java"/>
        </fileset>
      </copy>
  
      <javac srcdir="${build.dir}/work" destdir="${build.dest}" nowarn="${nowarn}" fork="${javac.fork}"
             debug="${debug}">
        <classpath refid="classpath" />
        <include name="test/wsdl/opStylesDoc/*.java" />
      </javac>
  
  </target>
  
  <target name="run" >
    <antcall target="execute-Component" />
  </target>
  
  </project>
  
  
  
  1.1                  ws-axis/java/test/wsdl/opStylesDoc/opStylesDoc.wsdl
  
  Index: opStylesDoc.wsdl
  ===================================================================
  <?xml version="1.0" ?>
  
  <definitions 
      name="operation styles test"
      targetNamespace="urn:opStylesDoc.wsdl.test"
      xmlns:tns="urn:opStylesDoc.wsdl.test"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns="http://schemas.xmlsoap.org/wsdl/">
  
    <!-- type defs -->
    <types>
      <xsd:schema targetNamespace="urn:opStylesDoc.wsdl.test"
                  xmlns:xsd="http://www.w3.org/1999/XMLSchema">
  
         <xsd:element name="emptyElementIn">
          <xsd:complexType/>
         </xsd:element>
  
        <xsd:element name="emptyElementOut">
          <xsd:complexType/>
         </xsd:element>
          
      </xsd:schema>
    </types>
  
    <!-- message declns -->
    <message name="empty"/>
  
    <message name="emptyElementIn">
      <part name="input" element="tns:emptyElementIn"/>
    </message>
  
    <message name="emptyElementOut">
      <part name="output" element="tns:emptyElementOut"/>
    </message>
  
    <!-- port type declns -->
    <portType name="opStyles">
      <operation name="requestResponse">
        <input message="tns:empty"/>
        <output message="tns:emptyElementOut"/>
      </operation>
      <operation name="requestResponse2">
        <input message="tns:empty"/>
        <output message="tns:empty"/>
      </operation>
     <operation name="requestResponse3">
        <input message="tns:emptyElementIn"/>
        <output message="tns:emptyElementOut"/>
      </operation>
      <operation name="notifyMessage">
        <input message="tns:empty"/>
      </operation>
    </portType>
  
    <!-- binding declns -->
    <binding name="opStyleBinding" type="tns:opStyles">
      <soap:binding
          style="document"
          transport="http://schemas.xmlsoap.org/soap/http"/>
  
      <operation name="requestResponse">
        <soap:operation soapAction=""/>
        <input>
          <soap:body
              use="literal"
              namespace=""
              encodingStyle=""/>
        </input>
        <output>
          <soap:body
              use="literal"
              namespace=""
              encodingStyle=""/>
        </output>
      </operation>
  
      <operation name="requestResponse2">
        <soap:operation soapAction=""/>
        <input>
          <soap:body
              use="literal"
              namespace=""
              encodingStyle=""/>
        </input>
        <output>
          <soap:body
              use="literal"
              namespace=""
              encodingStyle=""/>
        </output>
      </operation>
  
      <operation name="requestResponse3">
        <soap:operation soapAction=""/>
        <input>
          <soap:body
              use="literal"
              namespace=""
              encodingStyle=""/>
        </input>
        <output>
          <soap:body
              use="literal"
              namespace=""
              encodingStyle=""/>
        </output>
      </operation>
  
      <operation name="notifyMessage">
        <soap:operation soapAction=""/>
        <input>
          <soap:body
              use="literal"
              namespace=""
              encodingStyle=""/>
        </input>
      </operation>
    </binding>
  
    <!-- service decln -->
    <service name="opStyleDocService">
      <port name="OpStylesDoc" binding="tns:opStyleBinding">
        <soap:address location="http://localhost:8080/axis/services/OpStylesDoc"/>
      </port>
    </service>
  
  </definitions>
  
  
  
  

Mime
View raw message