axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cvs commit: xml-axis/java/samples/userguide/example3
Date Fri, 08 Mar 2002 23:12:56 GMT
butek       02/03/08 15:12:56

  Modified:    java/docs user-guide.html
  Round 2 of User's Guide updates.
  Revision  Changes    Path
  1.39      +35 -37    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.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- user-guide.html	7 Mar 2002 16:14:54 -0000	1.38
  +++ user-guide.html	8 Mar 2002 23:12:56 -0000	1.39
  @@ -73,9 +73,8 @@
   <a NAME="Introduction"></a>Introduction</h2>
  -Welcome to Axis, the third generation of Apache SOAP! This is the <b>alpha
  -3 </b>version. Please note that Axis is a work in progress, and although
  -the basic functionality is there, there are still a lot of unfinished areas
  +Welcome to Axis, the third generation of Apache SOAP! This is the <b>beta 1</b>
version. Please note that Axis is a work in progress, and although
  +the basic functionality is there, there are still some unfinished areas
   and rough edges. That said, we're very psyched about the package so far
   and would love to get your take on how we can make it better.
  @@ -197,13 +196,8 @@
   Support for the SOAP with Attachments specification</li>
  -Supprt for multi-dimensional arrays</li>
   Support for the SOAP actor attribute</li>
  -Support for generating complex type definitions in WSDL</li>
   All of these items are on the list for the final release.
  @@ -211,8 +205,16 @@
   See the <a href="xml-axis/java/docs/install.html">Axis Installation Guide</a>
   for instructions on installing Axis as a web application on your J2EE server.
   <p>Before running the examples in this guide, you'll need to make sure
  -that axis.jar is in your classpath. You should find it in the build/lib
  -directory of the distribution.
  +that your CLASSPATH includes (note:  if you build axis from a CVS checkout, these will
be in xml-axis/java/build/lib instead of xml-axis-beta1/lib):
  +<li>xml-axis-beta1/ # for the sample code</li>
  +<li>An XML parser such as xerces</li>
   <a NAME="ConsumingServices"></a>Consuming Web Services with Axis</h2>
  @@ -235,19 +237,18 @@
Call&nbsp;&nbsp;&nbsp;&nbsp; call&nbsp;&nbsp;&nbsp; = (Call) service.createCall();
call.setTargetEndpointAddress( new );
call.setOperationName( "echoString" );
call.setProperty( Call.NAMESPACE, "" );
String ret = (String) call.invoke( new Object[] { "Hello!" } );
System.out.println("Sent 'Hello!', got '" + ret + "'");
  -21&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } catch
(Exception e) {
  -23&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
  -24&nbsp;&nbsp;&nbsp;&nbsp; }
  -25&nbsp; }</pre>
call.setOperationName( new QName("", "echoString")  );
String ret = (String) call.invoke( new Object[] { "Hello!" } );
System.out.println("Sent 'Hello!', got '" + ret + "'");
  +20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } catch
(Exception e) {
  +22&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
  +23&nbsp;&nbsp;&nbsp;&nbsp; }
  +24&nbsp; }</pre>
  -(You'll find this file in <a href="xml-axis/java/samples/userguide/example1/">samples/userguide/example1/</a>)
  +(You'll find this file in <a href="../samples/userguide/example1/">samples/userguide/example1/</a>)
   <p>Assuming you have a network connection active, this program can be run
   as follows:
   <pre>% java samples.userguide.example1.TestClient
  @@ -257,8 +258,7 @@
   Call objects. These are the standard JAX-RPC objects that are used to store
   metadata about the service to invoke. On line 14, we set up our endpoint
   URL - this is the destination for our SOAP message. On line 15 we define
  -the operation (method) name of the Web Service. Line 16 defines the namespace
  -to use on the Body of the SOAP message. And on line 18 we actually invoke
  +the operation (method) name of the Web Service. And on line 17 we actually invoke
   the desired service, passing in an array of parameters - in this case just
   one String.
   <p>You can see what happens to the arguments by looking at the SOAP request
  @@ -291,7 +291,7 @@
   <div class="example">
   <pre>&nbsp; call.addParameter("testParam",&nbsp;
   This will assign the name <b>testParam</b> to the 1st (and only) parameter
   on the invoke call. This will also define the type of the parameter (<tt>org.apache.axis.encoding.XMLType.XSD_STRING</tt>)
  @@ -366,7 +366,7 @@
   &nbsp;&nbsp;&nbsp; return i1 - i2;
   &nbsp; }
  -(You'll find this very class in <a href="xml-axis/java/samples/userguide/example2/">samples/userguide/example2/</a>.)
  +(You'll find this very class in <a href="../samples/userguide/example2/">samples/userguide/example2/</a>.)
   <p>How do we go about making this class available via SOAP? There are a
   couple of answers to that question, but we'll start with the easiest way
   Axis provides to do this, which takes almost no effort at all!
  @@ -383,10 +383,9 @@
   SOAP calls correctly into Java invocations of your service class. Try it
   out - there's a calculator client in samples/userguide/example2/,
   which you can use like this:
  -<pre>% javac
  -% java CalcClient -p8080 add 2 5
  +<pre>% java samples.userguide.example2.CalcClient -p8080 add 2 5
   Got result : 7
  -% java CalcClient -p8080 subtract 10 9
  +% java samples.userguide.example2.CalcClient -p8080 subtract 10 9
   Got result : 1
   (note that you may need to replace the "-p8080" with whatever port your
  @@ -407,20 +406,19 @@
   format. A deployment descriptor contains a bunch of things you want to
   "deploy" into Axis - i.e. make available to the Axis engine. The most common
   thing to deploy is a Web Service, so let's start by taking a look at a
  -deployment descriptor for a basic service (this file is samples/userguide/example3/deploy.wsdd):
  +deployment descriptor for a basic service (this file is <a href="../samples/userguide/example3/deploy.wsdd">samples/userguide/example3/deploy.wsdd</a>):
   <div class="example">
   <pre>&lt;deployment xmlns=""
   &nbsp;&lt;service name="MyService" provider="java:RPC">
   &nbsp; &lt;parameter name="className" value="samples.userguide.example3.MyService"/>
  -&nbsp; &lt;parameter name="methodName" value="*"/>
  +&nbsp; &lt;parameter name="allowedMethods" value="*"/>
   Pretty simple, really - the outermost element tells the engine that this
   is a WSDD deployment, and defines the "java" namespace. Then the service
  -element actually defines the service for us. If you remember from the architecture
  -overview, a service is a <b>targeted chain</b>, which means it may have
  +element actually defines the service for us. A service is a <b>targeted chain</b>
(see the <a href="architecture-guide.html">Architecture Guide</a>), which means
it may have
   any/all of: a request Handler, a pivot Handler (which for a service is
   called a "provider"), and a response Handler. In this case, our provider
   is "java:RPC", which is predefined to indicate a Java RPC service.
  @@ -463,8 +461,8 @@
   called. We've included a sample handler in the samples/log directory to
   do just this. To use a handler class like this, you first need to deploy
   the Handler itself, and then use the name that you give it in deploying
  -a service. Here's a sample deploy.wsdd file (this is example 4in samples/userguide):
  -<pre>&lt;deployment xmlns=""
  +a service. Here's a sample deploy.wsdd file (this is example 4 in samples/userguide):
  +<div class="example"><pre>&lt;deployment xmlns=""
   &nbsp;&lt;!-- define the logging handler configuration -->
  @@ -479,9 +477,9 @@
   &nbsp; &lt;/requestFlow>
   &nbsp; &lt;parameter name="className" value="samples.userguide.example4.Service"/>
  -&nbsp; &lt;parameter name="methodName" value="*"/>
  +&nbsp; &lt;parameter name="allowedMethods" value="*"/>
   The first section defines a Handler called "track" that is implemented
   by the class samples.userguide.example4.LogHandler. We give this Handler
   an option to let it know which file to write its messages into.
  1.9       +1 -0      xml-axis/java/samples/userguide/example3/
  RCS file: /home/cvs/xml-axis/java/samples/userguide/example3/,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  ---	11 Jan 2002 21:42:11 -0000	1.8
  +++	8 Mar 2002 23:12:56 -0000	1.9
  @@ -86,6 +86,7 @@
               call.setTargetEndpointAddress( new );
               call.setOperationName( new QName("MyService", "serviceMethod") );
               call.addParameter( "arg1", XMLType.XSD_STRING, ParameterMode.PARAM_MODE_IN);
  +            call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING );
               String ret = (String) call.invoke( new Object[] { textToSend } );

View raw message