axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/samples/userguide/example2 CalcClient.java Calculator.java
Date Tue, 14 Aug 2001 20:01:39 GMT
gdaniels    01/08/14 13:01:39

  Modified:    java     build.xml
               java/docs user-guide.html
               java/samples/userguide/example2 CalcClient.java
                        Calculator.java
  Log:
  Merge changes from alpha onto main branch.
  
  Revision  Changes    Path
  1.34      +16 -6     xml-axis/java/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/build.xml,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- build.xml	2001/08/13 22:01:07	1.33
  +++ build.xml	2001/08/14 20:01:38	1.34
  @@ -163,6 +163,7 @@
         <include name="samples/**/*.java" />
         <exclude name="samples/**/*SMTP*.java" unless="smtp.present" />
         <exclude name="**/old/**/*.java" />
  +      <exclude name="samples/userguide/example2/*.java"/>
       </javac>
     </target>
   
  @@ -305,13 +306,22 @@
     <!-- =================================================================== -->
     <!-- Creates the source distribution                                     -->
     <!-- =================================================================== -->
  -  <target name="srcdist">
  -    <copy todir="${dist.dir}/src">
  -      <fileset dir="${src.dir}"/>
  -    </copy>
  +  <target name="srcdist" depends="javadocs" >
  +    <copy todir="${dist.dir}">
  +      <fileset dir=".">
  +        <include name="build.xml"/>
  +        <include name="README"/>
  +        <include name="docs/**"/>
  +        <include name="lib/**"/>
  +        <include name="samples/**"/>
  +        <include name="src/**"/>
  +        <include name="test/**"/>
  +        <include name="webapps/**"/>
   
  -    <copy file="LICENSE" tofile="${dist.dir}/LICENSE"/>
  -    <copy file="${build.file}" tofile="${dist.dir}/${build.file}"/>
  +        <exclude name="**/CVS/**"/>
  +      </fileset>
  +    </copy>
  +    <copy file="../LICENSE" tofile="${dist.dir}/LICENSE"/>
     </target>
   
     <!-- =================================================================== -->
  
  
  
  1.12      +7 -5      xml-axis/java/docs/user-guide.html
  
  Index: user-guide.html
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/docs/user-guide.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- user-guide.html	2001/08/13 23:25:55	1.11
  +++ user-guide.html	2001/08/14 20:01:38	1.12
  @@ -274,20 +274,22 @@
     rename it "Calculator.jws". So you might do something like this:</p>
   <pre>% copy Calculator.java <i><font color="#0000FF">&lt;your-webapp-root&gt;</font></i>/axis/Calculator.jws</pre>
   <p>Now for step 2... hm, wait a minute. You're done! You should now be able to 
  -  access the service at the following URL (assuming you've mapped the Axis web 
  -  application to port 80):</p>
  -<p><a href="http://localhost/axis/Calculator.jws">http://localhost/axis/Calculator.jws</a>

  +  access the service at the following URL (assuming your Axis web application 
  +  is on port 8080):</p>
  +<p><a href="http://localhost:8080/axis/Calculator.jws">http://localhost:8080/axis/Calculator.jws</a>

   </p>
   <p>Axis automatically locates the file, compiles the class, and converts SOAP 
     calls correctly into Java invocations of your service class. Try it out - there's 
     a calculator client in samples/userguide/example2/CalcClient.java, which you 
     can use like this:</p>
   <pre>% javac CalcClient.java
  -% java CalcClient add 2 5
  +% java CalcClient -p8080 add 2 5
   Got result : 7
  -% java CalcClient subtract 10 9
  +% java CalcClient -p8080 subtract 10 9
   Got result : 1
   % </pre>
  +(note that you may need to replace the &quot;-p8080&quot; with whatever port your

  +J2EE server is running on) 
   <h3>Custom Deployment - deploy.xml files and the AdminClient</h3>
   <p>JWS files are great quick ways to get your classes out there as Web Services,

     but they're not always the best choice. For one thing, you need the source code 
  
  
  
  1.4       +7 -3      xml-axis/java/samples/userguide/example2/CalcClient.java
  
  Index: CalcClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/userguide/example2/CalcClient.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CalcClient.java	2001/08/10 16:29:47	1.3
  +++ CalcClient.java	2001/08/14 20:01:39	1.4
  @@ -53,14 +53,18 @@
    * <http://www.apache.org/>.
    */
   
  -package samples.userguide.example2;
  -
   import org.apache.axis.client.ServiceClient;
  +import org.apache.axis.utils.Options;
   
   public class CalcClient
   {
      public static void main(String [] args) throws Exception {
  -       String endpoint = "http://localhost:8080/axis/Calculator.jws";
  +       Options options = new Options(args);
  +       
  +       String endpoint = "http://localhost:" + options.getPort() +
  +                         "/axis/Calculator.jws";
  +       
  +       args = options.getRemainingArgs();
          
          if (args.length != 3) {
              System.err.println("Usage: CalcClient <add|subtract> arg1 arg2");
  
  
  
  1.4       +0 -2      xml-axis/java/samples/userguide/example2/Calculator.java
  
  Index: Calculator.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/userguide/example2/Calculator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Calculator.java	2001/08/10 16:29:47	1.3
  +++ Calculator.java	2001/08/14 20:01:39	1.4
  @@ -53,8 +53,6 @@
    * <http://www.apache.org/>.
    */
   
  -package samples.userguide.example2;
  -
   public class Calculator {
     public int add(int i1, int i2)
     {
  
  
  

Mime
View raw message