axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmu...@apache.org
Subject cvs commit: xml-axis-wsif/java/samples/SimpleSOAP/client/stub README.html Run.java
Date Mon, 09 Dec 2002 21:46:06 GMT
nmukhi      2002/12/09 13:46:06

  Modified:    java/samples/SimpleSOAP/client/dynamic README.html
               java/samples/SimpleSOAP/client/stub README.html Run.java
  Log:
  Minor edits to client README files; wrote and tested client code
  
  Revision  Changes    Path
  1.2       +1 -1      xml-axis-wsif/java/samples/SimpleSOAP/client/dynamic/README.html
  
  Index: README.html
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/samples/SimpleSOAP/client/dynamic/README.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- README.html	6 Dec 2002 21:17:22 -0000	1.1
  +++ README.html	9 Dec 2002 21:46:05 -0000	1.2
  @@ -10,7 +10,7 @@
   <h2>
   Web Services Invocation Framework:<br>
   Invoking the SimpleSOAP Sample using WSIF's dynamic invocation interface</h2>
  -<p>Setting up the CLASSPATH for running the sample: You must have the following on
your classpath:
  +<p>You must have the following on your classpath:
   <ul>
     <li>wsif.jar</li>
     <li>wsifsamples.jar</li>
  
  
  
  1.2       +4 -4      xml-axis-wsif/java/samples/SimpleSOAP/client/stub/README.html
  
  Index: README.html
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/samples/SimpleSOAP/client/stub/README.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- README.html	6 Dec 2002 21:17:22 -0000	1.1
  +++ README.html	9 Dec 2002 21:46:06 -0000	1.2
  @@ -10,7 +10,7 @@
   <h2>
   Web Services Invocation Framework:<br>
   Invoking the SimpleSOAP Sample through a high level stub interface</h2>
  -<p>Setting up the CLASSPATH for running the sample: You must have the following on
your classpath:
  +<p>You must have the following on your classpath:
   <ul>
     <li>wsif.jar</li>
     <li>wsifsamples.jar</li>
  @@ -21,10 +21,10 @@
     <li>JAR files required by Axis - log4j.jar, commons-logging.jar, jaxrpc.jar, saaj.jar</li>
   </ul>
   </p>
  -<p>This directory contains a file called <tt>Run.java</tt> that contains
the <tt>main</tt> method. This is the logic that uses the generated stub interface
to run the sample. So yu can run this class, specifying on the command line the symbol for
the company whose stock quote you are interested in. For example, <br>
  -<tt>java samples.SimpleSOAP.client.static.Run IBM</tt></p>
  +<p>This directory contains a file called <tt>Run.java</tt> that contains
the <tt>main</tt> method. This is the logic that uses the generated stub interface
to run the sample. So you can run this class, specifying on the command line the location
of the WSDL file for the sample and the symbol for the company whose stock quote you are interested
in. For example, <br>
  +<tt>java samples.SimpleSOAP.client.static.Run file:/mywsifinstallation/samples/SimpleSOAP/StockquoteSOAP.wsdl
IBM</tt></p>
   <p>To generate the stub interface, you can use any tool that generates Java interfaces
for WSDL services using their port type descriptions, such as WSDL2Java from Axis. WSIF assumes
a correspondence between the generated Java interface and the WSDL port type that has its
abstract description as specified in the JAX-RPC specification. This particular sample used
WSDL2Java in the following way:<br>
   <tt>java org.apache.axis.wsdl.WSDL2Java ../../StockquoteSOAP.wsdl</tt><br>
  -After the tool finished running, we deleted all the generated files except the one whose
name ended with <tt>PortType</tt> (this is the java interface corresponding to
the port type and is all that is required by WSIF).</p>
  +After the tool finished running, we deleted all the generated files except <tt>NetXmethodsServicesStockquoteStockQuotePortType.java</tt>
(this is the java interface corresponding to the port type and is all that is required by
WSIF).</p>
   <hr width="100%">
   </body></html>
  
  
  
  1.2       +5 -5      xml-axis-wsif/java/samples/SimpleSOAP/client/stub/Run.java
  
  Index: Run.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/samples/SimpleSOAP/client/stub/Run.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Run.java	6 Dec 2002 21:17:22 -0000	1.1
  +++ Run.java	9 Dec 2002 21:46:06 -0000	1.2
  @@ -17,22 +17,22 @@
   public class Run {
       public static void main(String [] args) {
   	try {
  -	    if (args.length!=1) {
  -		System.out.println("Usage: java samples.SimpleSOAP.client.stub.Run <company symbol>");
  +	    if (args.length!=2) {
  +		System.out.println("Usage: java samples.SimpleSOAP.client.stub.Run <wsdl location>
<company symbol>");
   		System.exit(1);
   	    }
   	    // create a service factory
   	    WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
   	    // parse WSDL
  -	    WSIFService service = factory.getService("file:/work/xml-axis-wsif/java/samples/SimpleSOAP/StockquoteSOAP.wsdl",
null,
  +	    WSIFService service = factory.getService(args[0], null,
   						     null, "http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/",

   						     "net.xmethods.services.stockquote.StockQuotePortType"); 
   	    NetXmethodsServicesStockquoteStockQuotePortType stub = null;
   	    // create the stub
   	    stub = (NetXmethodsServicesStockquoteStockQuotePortType) service.getStub(NetXmethodsServicesStockquoteStockQuotePortType.class);
   	    // do the invocation
  -	    // args[0] is the company symbol
  -	    float quote = stub.getQuote(args[0]);
  +	    // args[1] is the company symbol
  +	    float quote = stub.getQuote(args[1]);
   	    System.out.println(quote);
   	} catch (WSIFException we) {
   	    System.out.println("Error while executing sample, received an exception from WSIF;
details:");
  
  
  

Mime
View raw message