nmukhi      2002/12/03 11:54:56

  Added:       java/doc samples.html
  Log:
  Sample documentation
  
  Revision  Changes    Path
  1.1                  xml-axis-wsif/java/doc/samples.html
  
  Index: samples.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="Author" content="Nirmal Mukhi">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <title>Web Services Invocation Framework: Samples</title>
  <link rel="stylesheet" href="wsif.css" type="text/css"></head>
  
  <body alink="#0000ff" bgcolor="#ffffff" leftmargin="2" topmargin="2" marginwidth="2" 
marginheight="2">
  
  <h1>
  Web Services Invocation Framework:<br>
  Samples</h1>
  <p>The WSIF distribution comes with a set of sample clients that demonstrate WSIF 
features. This document describes the features demonstrated by each sample, along with 
a guide to running them. The samples begin with invocation of a basic SOAP service and 
progress to more complex WSDL described services. Each sample has two clients - one 
that uses WSIF's DII directly, the other that uses a local proxy for the WSDL 
service.</p>
  <p><table>
  <tr bgcolor="lightgreen"><td><h3>Invoking a simple SOAP service</h3>
  <br><b>Stockquote sample</b> (under <tt>samples/stockquote</tt>)
  <br><b>Value of sample</b>: Demonstrates how to invoke most common kind of WSDL 
described service - one with a SOAP binding. Note that same client can be used for a 
different binding as well, its code is <em>not</em> binding specific - welcome to WSIF!
  <br><b>Running the sample</b>: Deploy the SOAP service as described <a 
href="#deployingsoap">here</a>. Once you have verified that the service is properly 
deployed, you can use any of the two clients to invoke the service.
  <br><em>Running DII client</em>: Run the DynamicInvoker class, specifying as command 
line arguments the location of the WSDL file for the stockquote sample followed by the 
operation you wish to invoke and the symbol for the company whose stockquote you are 
interested in. For example, <tt>java samples.clients.DynamicInvoker 
file://mywsifinstallation/samples/stockquote/Stockquote.wsdl getQuote IBM</tt>
  <br><em>Running proxy client</em>: Run the StockquoteClient class, specifying on the 
command line the symbol for the compnay whose stockquote you are interested in. For 
example, <tt>java samples.clients.StockquoteClient IBM</tt>
  </td></tr>
  <tr bgcolor="lightgrey""><td><h3>Exploiting multiple bindings offered by a 
service</h3>
  <br><b>StockquoteMulti sample</b> (under <tt>samples/stockquotemulti</tt>)
  <br><b>Value of sample</b>: Demonstrates how to exploit multiple bindings offered by 
a service, choose desired binding at runtime in a transparent way. Note that client 
code here is much the same as first sample. This shows that if our service was 
originally accessible over SOAP and we needed to switch this to JMS, our client code 
what not undergo any change at all. If it is accessible over both protocols, we can 
choose the one that is more convenient at the itme of invocation.
  <br><b>Running the sample</b>: Deploy the SOAP service as described <a 
href="#deployingsoap">here</a>. Deploy the JMS-accessible service as described <a 
href="#deployingjms">here</a>. Once you have verified that the service is properly 
deployed and available through boths protocols, you can use any of the two clients to 
invoke the service.
  <br><em>Running DII client</em>: Run the DynamicInvoker class, specifying as command 
line arguments the location of the WSDL file for the stockquotemulti sample followed 
by the port you wish to use, the operation you wish to invoke and the symbol for the 
company whose stockquote you are interested in. For example, <tt>java 
samples.clients.DynamicInvoker 
file://mywsifinstallation/samples/stockquote/Stockquote.wsdl JMSPort getQuote IBM</tt>
  <br><em>Running proxy client</em>: Run the StockquoteMultiClient class, specifying 
on the command line the name of the port you wish to use followed by the symbol for 
the compnay whose stockquote you are interested in. For example, <tt>java 
samples.clients.StockquoteClient SOAPPort IBM</tt>
  </td></tr>
  <tr bgcolor="lightgreen"><td><h3>Invoking a service that uses custom types</h3>
  <br><b>AddressBook sample</b> (under <tt>samples/addressbook</tt>)
  <br><b>Value of sample</b>: Demonstrates how to invoke service that use custom 
types. Here, the service is offered as an EJB, and note that the client code is 
predictably much the same as first two samples.
  <br><b>Running the sample</b>: Deploy the EJB as described <a 
href="#deployingejb">here</a>.
  <br><em>Running DII client</em>
  <br><em>Running proxy client</em>
  </td></tr>
  <tr bgcolor="lightgrey"><td><h3>Customising your invocation framework for maximum 
flexibility</h3>
  <br><b>AddressBookMulti sample</b> (under <tt>samples/addressbookmulti</tt>)
  Service WSDL will have complex types and a SOAP, Java, EJB, JMS, JCA binding. Client 
setup will plugin a custom implementation of WSIFServiceFactory and WSIFService that 
uses some heuristics to pick the best binding in the getPort call. 
  <br><b>Value of sample</b>: Demonstrates how to exploit multiple bindings, leaving 
client code unchanged while plugging in customisations into the WSIF framework.
  <br><b>Running the sample</b>: 
  <br><em>Running DII client</em>
  <br><em>Running proxy client</em>
  </td></tr>
  </table>
  </p>
  <p><a name="deployingsoap"><b>Deploying SOAP services</b>: You first need to run 
your favorite web server on your local machine, port 8080. In the future 
localhost:8080 will be a property loaded from wsif.test.propeerties. Find the 
deployment descriptor for your service (usually a file called 
DeploymentDescriptor.xml) in the sample directory and deploy the service.  The way a 
service is deployed depends on the SOAP libraries you use. I use soap 2.2 on tomcat so 
I issue java org.apache.soap.server.ServiceManagerClient 
http://localhost:8080/soap/servlet/rpcrouter deploy 
"samples\services\addressbook\DeploymentDescriptor.xml".
  </p>
  <p><a name="deployingejb"><b>Deploying EJB services</b>:</p>
  <p><a name="deployingjava"><b>Deploying Java services</b>:</p>
  <p><a name="deployingjms"><b>Deploying JMS services</b>:</p>
  <p><a name="deployingjca"><b>Deploying JCA services</b>:</p>
  <hr width="100%">
  </body></html>
  
  


Reply via email to