You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by he...@apache.org on 2004/10/12 12:56:57 UTC

cvs commit: ws-axis/contrib/ews/samples/servlet/echo build.xml

hemapani    2004/10/12 03:56:57

  Added:       contrib/ews/samples/servlet/echo/WEB-INF webservice.xml
                        web.xml
               contrib/ews/samples/servlet/echo/org/apache/ws/echosample
                        SmallEchoStruct.java Echo.java EchoStruct.java
                        EchoBean.java
               contrib/ews/samples/servlet/echo build.xml
  Log:
  adding the java class based echo sample
  
  Revision  Changes    Path
  1.1                  ws-axis/contrib/ews/samples/servlet/echo/WEB-INF/webservice.xml
  
  Index: webservice.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <webservices xmlns="http://java.sun.com/xml/ns/j2ee" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:ns1="http://echosample.ws.apache.org"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
  http://www.ibm.com/standards/xml/webservices/j2ee/j2ee_web_services_1_1.xsd" version="1.1">
      <description>echo Service</description>
  	<display-name>echo</display-name>
  	<webservice-description >
  		<description>echo</description>
  		<display-name>echo</display-name>
  		<webservice-description-name >echoService</webservice-description-name>
  		<wsdl-file >echo.wsdl</wsdl-file>
  		<jaxrpc-mapping-file >echomapping.xml</jaxrpc-mapping-file>
  		<port-component >
  			<description >echo</description>
  			<display-name >echo</display-name>
  			
  			<icon xml:lang="en-us" id="ID000298">
  				<small-icon>token</small-icon>
  				<large-icon>token</large-icon>
  			</icon>
  
  			<port-component-name >echo</port-component-name>
  			<wsdl-port id="ID000311">ns1:echoPort</wsdl-port>
  			<service-endpoint-interface >org.apache.ws.echosample.Echo</service-endpoint-interface>
  			<service-impl-bean >
  				<servlet-link>echo</servlet-link>
  			</service-impl-bean>
  		</port-component>
  	</webservice-description>
  </webservices>
  
  
  
  1.1                  ws-axis/contrib/ews/samples/servlet/echo/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
           version="2.4">
    <servlet>
      <servlet-name>simple</servlet-name>
      <servlet-class>org.apache.ws.echosample.EchoBean</servlet-class>
      <load-on-startup>1</load-on-startup>
    </servlet>
  
    <servlet-mapping>
      <servlet-name>simple</servlet-name>
      <url-pattern>/simple</url-pattern>
    </servlet-mapping>
  </web-app>
  
  
  
  1.1                  ws-axis/contrib/ews/samples/servlet/echo/org/apache/ws/echosample/SmallEchoStruct.java
  
  Index: SmallEchoStruct.java
  ===================================================================
  
  package org.apache.ws.echosample;
  
  import java.io.Serializable;
  
  public class SmallEchoStruct implements Serializable{
  	private String val1;
  	private String val2;
      /**
       * @return
       */
      public String getVal1() {
          return val1;
      }
  
      /**
       * @return
       */
      public String getVal2() {
          return val2;
      }
  
      /**
       * @param string
       */
      public void setVal1(String string) {
          val1 = string;
      }
  
      /**
       * @param string
       */
      public void setVal2(String string) {
          val2 = string;
      }
  
  }
  
  
  
  1.1                  ws-axis/contrib/ews/samples/servlet/echo/org/apache/ws/echosample/Echo.java
  
  Index: Echo.java
  ===================================================================
  package org.apache.ws.echosample;
  public interface Echo  extends java.rmi.Remote {
  	public void echoVoid()throws java.rmi.RemoteException;
  	public int echoInt(int in)throws java.rmi.RemoteException;
  	public double echoDouble(double in)throws java.rmi.RemoteException;
  	public float echoFloat(float in)throws java.rmi.RemoteException;
  	public boolean echoBoolean(boolean in)throws java.rmi.RemoteException;
  	public String echoString(String in)throws java.rmi.RemoteException;
  	public short echoShort(short in)throws java.rmi.RemoteException;
  	public long echoLong(long in)throws java.rmi.RemoteException;
  	//public char echoChar(char in);
  	public byte[] echoBytes(byte[] in)throws java.rmi.RemoteException;
  	public void echoEvoid()throws java.rmi.RemoteException;
  	public EchoStruct echoStruct(EchoStruct in)throws java.rmi.RemoteException;
  	//public EchoStruct[] echoAStruct(EchoStruct[] in)throws java.rmi.RemoteException;
  	
  }
  
  
  
  1.1                  ws-axis/contrib/ews/samples/servlet/echo/org/apache/ws/echosample/EchoStruct.java
  
  Index: EchoStruct.java
  ===================================================================
  package org.apache.ws.echosample;
  
  import java.io.Serializable;
  
  public class EchoStruct implements Serializable{
  	private int intVal;
  	private double doubleVal;
  	private byte[] bytesVal;
  	private float floatVal;
  	private long longVal;
  	private short shortVal;
  	private boolean boolaenVal;
  	
  	private String strVal;
  	
  	private int[] intaVal;
  	private double[] doubleaVal;
  	private byte[][] bytesaVal;
  	private float[] floataVal;
  	private long[] longaVal;
  	private short[] shortaVal;
  	private boolean[] boolaenaVal;
  	
  	private String[] straVal;
  	
  	private SmallEchoStruct sturctVal;
  	private SmallEchoStruct sturctaVal;
  	
      /**
       * @return
       */
      public boolean[] getBoolaenaVal() {
          return boolaenaVal;
      }
  
      /**
       * @return
       */
      public boolean isBoolaenVal() {
          return boolaenVal;
      }
  
      /**
       * @return
       */
      public byte[][] getBytesaVal() {
          return bytesaVal;
      }
  
      /**
       * @return
       */
      public byte[] getBytesVal() {
          return bytesVal;
      }
  
     
     
  
      /**
       * @return
       */
      public double[] getDoubleaVal() {
          return doubleaVal;
      }
  
      /**
       * @return
       */
      public double getDoubleVal() {
          return doubleVal;
      }
  
      /**
       * @return
       */
      public float[] getFloataVal() {
          return floataVal;
      }
  
      /**
       * @return
       */
      public float getFloatVal() {
          return floatVal;
      }
  
      /**
       * @return
       */
      public int[] getIntaVal() {
          return intaVal;
      }
  
      /**
       * @return
       */
      public int getIntVal() {
          return intVal;
      }
  
      /**
       * @return
       */
      public long[] getLongaVal() {
          return longaVal;
      }
  
      /**
       * @return
       */
      public long getLongVal() {
          return longVal;
      }
  
      /**
       * @return
       */
      public short[] getShortaVal() {
          return shortaVal;
      }
  
      /**
       * @return
       */
      public short getShortVal() {
          return shortVal;
      }
  
      /**
       * @return
       */
      public String[] getStraVal() {
          return straVal;
      }
  
      /**
       * @return
       */
      public String getStrVal() {
          return strVal;
      }
  
      /**
       * @param bs
       */
      public void setBoolaenaVal(boolean[] bs) {
          boolaenaVal = bs;
      }
  
      /**
       * @param b
       */
      public void setBoolaenVal(boolean b) {
          boolaenVal = b;
      }
  
      /**
       * @param bs
       */
      public void setBytesaVal(byte[][] bs) {
          bytesaVal = bs;
      }
  
      /**
       * @param bs
       */
      public void setBytesVal(byte[] bs) {
          bytesVal = bs;
      }
  
      
      /**
       * @param ds
       */
      public void setDoubleaVal(double[] ds) {
          doubleaVal = ds;
      }
  
      /**
       * @param d
       */
      public void setDoubleVal(double d) {
          doubleVal = d;
      }
  
      /**
       * @param fs
       */
      public void setFloataVal(float[] fs) {
          floataVal = fs;
      }
  
      /**
       * @param f
       */
      public void setFloatVal(float f) {
          floatVal = f;
      }
  
      /**
       * @param is
       */
      public void setIntaVal(int[] is) {
          intaVal = is;
      }
  
      /**
       * @param i
       */
      public void setIntVal(int i) {
          intVal = i;
      }
  
      /**
       * @param ls
       */
      public void setLongaVal(long[] ls) {
          longaVal = ls;
      }
  
      /**
       * @param l
       */
      public void setLongVal(long l) {
          longVal = l;
      }
  
      /**
       * @param ses
       */
      public void setShortaVal(short[] ses) {
          shortaVal = ses;
      }
  
      /**
       * @param s
       */
      public void setShortVal(short s) {
          shortVal = s;
      }
  
      /**
       * @param strings
       */
      public void setStraVal(String[] strings) {
          straVal = strings;
      }
  
      /**
       * @param string
       */
      public void setStrVal(String string) {
          strVal = string;
      }
  
      /**
       * @return
       */
      public SmallEchoStruct getSturctaVal() {
          return sturctaVal;
      }
  
      /**
       * @return
       */
      public SmallEchoStruct getSturctVal() {
          return sturctVal;
      }
  
      /**
       * @param struct
       */
      public void setSturctaVal(SmallEchoStruct struct) {
          sturctaVal = struct;
      }
  
      /**
       * @param struct
       */
      public void setSturctVal(SmallEchoStruct struct) {
          sturctVal = struct;
      }
  
  }
  
  
  
  1.1                  ws-axis/contrib/ews/samples/servlet/echo/org/apache/ws/echosample/EchoBean.java
  
  Index: EchoBean.java
  ===================================================================
  
  package org.apache.ws.echosample;
  public class EchoBean implements Echo{
  	public void ejbCreate() {}
  	
  	public void echoVoid(){}
  	public int echoInt(int in){
  		return in;
  	}
  	public double echoDouble(double in){
  		return in;
  	}
  	public float echoFloat(float in){
  		return in;
  	}
  	public boolean echoBoolean(boolean in){
  		return in;
  	}
  	public String echoString(String in){
  		return in;
  	}
  	public short echoShort(short in){
  		return in;
  	}
  	public long echoLong(long in){
  		return in;
  	}
  	public char echoChar(char in){
  		return in;
  	}
  	public byte[] echoBytes(byte[] in){
  		return in;
  	}
  	public void echoEvoid(){
  		
  	}
  	public EchoStruct echoStruct(EchoStruct in){
  		return in;
  	}
  //	public EchoStruct[] echoAStruct(EchoStruct[] in){
  //		return in;
  //	}
  		
  	public void ejbActivate() throws javax.ejb.EJBException, java.rmi.RemoteException {}
  	public void ejbPassivate() throws javax.ejb.EJBException, java.rmi.RemoteException {}
  	public void ejbRemove() throws javax.ejb.EJBException, java.rmi.RemoteException {}
  	public void setSessionContext(javax.ejb.SessionContext arg0)throws javax.ejb.EJBException, java.rmi.RemoteException {}
  }
  
  
  
  1.1                  ws-axis/contrib/ews/samples/servlet/echo/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0"?>
  <project basedir="." default="jar">
  	<property name="src" location="."/>
  	<property name="build" location="build"/>
  	<property name="build.classes" location="${build}/WEB-INF/classes"/>
  	<property name="build.lib" location="${build}/lib"/>
  	<property name="lib" location="lib"/>
  	<property name="jar.dir" location="../../../target/generated/samples/"/>
  	
  	<target name="compile" depends="init" unless="jars.uptodate">
  	   <mkdir dir="${build.classes}"/>
  	   <mkdir dir="${build.lib}"/>
  		<javac destdir="${build.classes}" debug="on">
  			<classpath refid="maven.dependency.classpath" />
  			<src path="${src}"/>
  		</javac>
  	</target>
  	
  	<target name="jar" depends="compile" unless="jars.uptodate">
  		<copy file ="${basedir}/WEB-INF/webservice.xml" todir="${build.classes}/.."/>
  		<copy file ="${basedir}/WEB-INF/web.xml" todir="${build.classes}/.."/>
  		<mkdir dir="${jar.dir}"/>
  		
   		<jar jarfile="${jar.dir}/echo.war" basedir="${build}" >
  			<include name="**/*.class" />
  			<include name="**/*.xml" />
  		</jar>
  		<delete dir="${build}"/>
  	</target>
  	
  	<target name="init">
  		<uptodate property="jars.uptodate" targetfile="${jar.dir}/echo.jar">
  			<srcfiles dir="${src}">
  				<include name="**/*.java"/>
  				<include name="**/*.xml"/>
  				<include name="**/*.wsdl"/>
  				<exclude name="${build}/**"/>
  			</srcfiles>
  		</uptodate>
  		<echo message="the files are up to date = ${jars.uptodate}"></echo>
  	</target>
  	
  </project>