You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by to...@apache.org on 2004/10/20 05:15:30 UTC

cvs commit: ws-site/targets/axis/java user-guide.html user-guide.pdf

toshi       2004/10/19 20:15:30

  Modified:    targets/axis/java user-guide.html user-guide.pdf
  Log:
  Fix for;
  http://issues.apache.org/jira/browse/AXIS-1540
  
  Revision  Changes    Path
  1.14      +117 -4    ws-site/targets/axis/java/user-guide.html
  
  Index: user-guide.html
  ===================================================================
  RCS file: /home/cvs/ws-site/targets/axis/java/user-guide.html,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- user-guide.html	13 Jul 2004 10:00:28 -0000	1.13
  +++ user-guide.html	20 Oct 2004 03:15:29 -0000	1.14
  @@ -284,6 +284,60 @@
   <em>Feedback: axis-dev@ws.apache.org</em>
   </p>
   <div class="h4">
  +<h4>Table of Contents</h4>
  +</div>
  +<ul>
  +<li>
  +<a href="#Introduction">Introduction</a>
  +</li>
  +<li>
  +<a href="#Installation">Installing Axis</a>
  +</li>
  +<li>
  +<a href="#ConsumingServices">Consuming Web Services with Axis</a>
  +</li>
  +<li>
  +<a href="#PublishingServices">Publishing Web Services with Axis</a>
  +</li>
  +<li>
  +<a href="#DataMapping">XML &lt;-&gt; Java Data Mapping in Axis</a>
  +</li>
  +<li>
  +<a href="#WSDL">Using WSDL with Axis</a>
  +</li>
  +<li style="list-style: none">
  +<ul>
  +<li>
  +<a href="#WSDLObtaining">?WSDL: Obtaining WSDL for deployed services</a>
  +</li>
  +<li>
  +<a href="#WSDL2Java">WSDL2Java: Building stubs, skeletons, and data</a>
  +</li>
  +<li>
  +<a href="#Java2WSDL">Java2WSDL: Building WSDL from Java</a>
  +</li>
  +</ul>
  +</li>
  +<li>
  +<a href="#publishedinterfaces">Published Interfaces</a>
  +</li>
  +<li>
  +<a href="#newbie">Newbie Tips: Finding Your Way Around</a>
  +</li>
  +<li>
  +<a href="#tcpmon">Appendix : Using TCPMon</a>
  +</li>
  +<li>
  +<a href="#soapmon">Appendix : Using SOAP Monitor</a>
  +</li>
  +<li>
  +<a href="#Glossary">Glossary</a>
  +</li>
  +</ul>
  +<p>
  +<a name="Introduction"></a>
  +</p>
  +<div class="h4">
   <h4>Introduction</h4>
   </div>
   <p>Welcome to Axis, the third generation of Apache SOAP!</p>
  @@ -311,14 +365,31 @@
   <ul>
   <li>
   <strong>Speed.</strong> Axis uses SAX (event-based) parsing to acheive significantly greater speed than earlier versions of Apache SOAP.</li>
  +<li style="list-style: none">
  +<p></p>
  +</li>
   <li>
   <strong>Flexibility.</strong> The Axis architecture gives the developer complete freedom to insert extensions into the engine for custom header processing, system management, or anything else you can imagine.</li>
  +<li style="list-style: none">
  +<p>
  +<a name="publishedinterfaces"></a>
  +</p>
  +</li>
   <li>
  -<strong>Stability.</strong> Axis defines a set of <a href="#published%20interfaces">published interfaces</a> which change relatively slowly compared to the rest of Axis.</li>
  +<strong>Stability.</strong> Axis defines a set of <strong>published interfaces</strong> which change relatively slowly compared to the rest of Axis.</li>
  +<li style="list-style: none">
  +<p></p>
  +</li>
   <li>
   <strong>Component-oriented deployment.</strong> You can easily define reusable networks of Handlers to implement common patterns of processing for your applications, or to distribute to partners.</li>
  +<li style="list-style: none">
  +<p></p>
  +</li>
   <li>
   <strong>Transport framework.</strong> We have a clean and simple abstraction for designing transports (i.e., senders and listeners for SOAP over various protocols such as SMTP, FTP, message-oriented middleware, etc), and the core of the engine is completely transport-independent.</li>
  +<li style="list-style: none">
  +<p></p>
  +</li>
   <li>
   <strong>WSDL support.</strong> Axis supports the <a href="http://www.w3.org/TR/wsdl">Web Service Description Language</a>, version 1.1, which allows you to easily build stubs to access remote services, and also to automatically export machine-readable descriptions of your deployed services from Axis.</li>
   </ul>
  @@ -355,6 +426,9 @@
   <h2>What's still to do?</h2>
   </div>
   <p>Please click for <a href="to-do.html">a list of what we think needs doing</a> - and please consider helping out if you're interested &amp; able!</p>
  +<p>
  +<a name="Installation"></a>
  +</p>
   <div class="h4">
   <h4>Installing Axis and Using this Guide</h4>
   </div>
  @@ -371,6 +445,9 @@
   </li>
   <li>A JAXP-1.1 compliant XML parser such as Xerces or Crimson</li>
   </ul>
  +<p>
  +<a name="ConsumingServices"></a>
  +</p>
   <div class="h4">
   <h4>Consuming Web Services with Axis</h4>
   </div>
  @@ -483,6 +560,9 @@
   <pre class="example">call.setReturnClass(String.class);
   </pre>
   <p>OK - so now you know the basics of accessing SOAP services as a client. But how do you publish your own services?</p>
  +<p>
  +<a name="PublishingServices"></a>
  +</p>
   <div class="h4">
   <h4>Publishing Web Services with Axis</h4>
   </div>
  @@ -526,6 +606,9 @@
   </div>
   <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 - there might be times when you want to expose a pre-existing class on your system without source. Also, the amount of configuration you can do as to how the service gets accessed is pretty limited - you can't specify custom type mappings, or control which Handlers get invoked when people are using your service. <em>(Note for the future : the Axis team, and the Java SOAP community at large, are thinking about ways to be able to embed this sort of metadata into your source files if desired - stay tuned!)</em>
   </p>
  +<p>
  +<a name="descriptors"></a>
  +</p>
   <div class="h5">
   <h5>Deploying via descriptors</h5>
   </div>
  @@ -643,7 +726,7 @@
    &lt;/sequence&gt;
     &lt;/complexType&gt;
     &lt;element name="PurchaseOrder" type="POType"/&gt;
  -&lt;/deployment&gt;
  +&lt;/schema&gt;
   </pre>
   <p>For a <strong>document</strong> style service, this would map to a method like this:</p>
   <p>public void method(PurchaseOrder po)</p>
  @@ -681,6 +764,9 @@
   </pre>
   <p>Note that the "style" attribute is different from the RPC deployment example. The "message" style tells Axis that this service is to be handled by <span class="codefrag">org.apache.axis.providers.java.MsgProvider</span> rather than <span class="codefrag">org.apache.axis.providers.java.RPCProvider</span>.</p>
   <p>You can test this service by deploying it, then running samples.message.TestMsg (look at the source to see what the test driver does).</p>
  +<p>
  +<a name="DataMapping"></a>
  +</p>
   <div class="h4">
   <h4>XML &lt;-&gt; Java Data Mapping in Axis</h4>
   </div>
  @@ -819,6 +905,9 @@
   </pre>
   <p>This looks a lot like the &lt;beanMapping&gt; tag we saw earlier, but there are three extra attributes. One, <strong>serializer</strong>, is the Java class name of the Serializer <em>factory</em> which gets the serializer to be used to marshal an object of the specified Java class (i.e., my.java.thingy) into XML. Another, <strong>deserializer</strong>, is the class name of a Deserializer <em>factory</em> that gets the deserializer to be used to unmarshall XML into the correct Java class. The final attribute, the <strong>encodingStyle</strong>, which is SOAP encoding.</p>
   <p>(The &lt;beanMapping&gt; tag is really just shorthand for a &lt;typeMapping&gt; tag with <tt>serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"</tt>, <tt>deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"</tt>, and <tt>encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"</tt>, but clearly it can save a lot of typing!)</p>
  +<p>
  +<a name="WSDL"></a>
  +</p>
   <div class="h4">
   <h4>Using WSDL with Axis</h4>
   </div>
  @@ -829,12 +918,18 @@
   <li>We provide a "WSDL2Java" tool which will build Java proxies and skeletons for services with WSDL descriptions.</li>
   <li>We provide a "Java2WSDL" tool which will build WSDL from Java classes.</li>
   </ol>
  +<p>
  +<a name="WSDLObtaining"></a>
  +</p>
   <div class="h2">
   <h2>?WSDL: Obtaining WSDL for deployed services</h2>
   </div>
   <p>When you make a service available using Axis, there is typically a unique URL associated with that service. For JWS files, that URL is simply the path to the JWS file itself. For non-JWS services, this is usually the URL "http://&lt;host&gt;/axis/services/&lt;service-name&gt;".</p>
   <p>If you access the service URL in a browser, you'll see a message indicating that the endpoint is an Axis service, and that you should usually access it using SOAP. However, if you tack on "?wsdl" to the end of the URL, Axis will automatically generate a service description for the deployed service, and return it as XML in your browser (try it!). The resulting description may be saved or used as input to proxy-generation, described next. You can give the WSDL-generation URL to your online partners, and they'll be able to use it to access your service with toolkits like .NET, SOAP::Lite, or any other software which supports using WSDL.</p>
  -<p>You can also generate WSDL files from existing Java classes (see <a href="#Java2WSDL:%20Building%20WSDL%20from%20Java">Java2WSDL: Building WSDL from Java</a> ).<br>
  +<p>You can also generate WSDL files from existing Java classes (see <a href="#Java2WSDL">Java2WSDL: Building WSDL from Java</a> ).<br>
  +</p>
  +<p>
  +<a name="WSDL2Java"></a>
   </p>
   <div class="h2">
   <h2>WSDL2Java: Building stubs, skeletons, and data types from WSDL</h2>
  @@ -1109,6 +1204,9 @@
   <h5>Services</h5>
   </div>
   <p>The tool also builds you a "deploy.wsdd" and an "undeploy.wsdd" for each service for use with the AdminClient. These files may be used to deploy the service once you've filled in the methods of the Implementation class, compiled the code, and made the classes available to your Axis engine.</p>
  +<p>
  +<a name="Java2WSDL"></a>
  +</p>
   <div class="h2">
   <h2>Java2WSDL: Building WSDL from Java</h2>
   </div>
  @@ -1153,7 +1251,7 @@
   <div class="h5">
   <h5>Step 3: Create Bindings using WSDL2Java</h5>
   </div>
  -<p>Use the generated WSDL file to build the appropriate client/server bindings for the web service (see <a href="#WSDL2Java:%20Building%20stubs,%20skeletons,%20and%20data">WSDL2Java</a>):</p>
  +<p>Use the generated WSDL file to build the appropriate client/server bindings for the web service (see <a href="#WSDL2Java:Buildingstubs,skeletons,anddata">WSDL2Java</a>):</p>
   <pre class="example">% java org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -S true
     -Nurn:Example6 samples.userguide.example6 wp.wsdl
   </pre>
  @@ -1180,6 +1278,9 @@
   <li>(data types): Java files will be produced for all of the other types and holders necessary for the web service. There are no additional files for the WidgetPrice web service.</li>
   </ul>
   <p>Now you have all of the necessary files to build your client/server side code and deploy the web service!</p>
  +<p>
  +<a name="published_interfaces"></a>
  +</p>
   <div class="h4">
   <h4>Published Axis Interfaces</h4>
   </div>
  @@ -1288,6 +1389,9 @@
   </ul>
   </li>
   </ul>
  +<p>
  +<a name="newbie"></a>
  +</p>
   <div class="h4">
   <h4>Newbie Tips: Finding Your Way Around</h4>
   </div>
  @@ -1338,6 +1442,9 @@
   <h5>org.apache.axis.SOAPEnvelope</h5>
   </div>
   <p>As you can see, starting with the MessageContext lets you work your way down through the API, discovering all the information available to you about a single request/response exchange. A MessageContext has two Messages, which each have a SOAPPart that contains a SOAPEnvelope. The SOAPEnvelope, in turn, holds a full representation of the SOAP Envelope that is sent over the wire. From here you can get and set the contents of the SOAP Header and the SOAP Body. See the Javadocs for a full list of the properties available.</p>
  +<p>
  +<a name="tcpmon"></a>
  +</p>
   <div class="h4">
   <h4>Appendix : Using the Axis TCP Monitor (tcpmon)</h4>
   </div>
  @@ -1356,6 +1463,9 @@
   </p>
   <p>Now each time a SOAP connection is made to the local port, you will see the request appear in the "Request" panel, and the response from the server in the "Response" panel. Tcpmon keeps a log of all request/response pairs, and allows you to view any particular pair by selecting an entry in the top panel. You may also remove selected entries, or all of them, or choose to save to a file for later viewing.</p>
   <p>The "resend" button will resend the request you are currently viewing, and record a new response. This is particularly handy in that you can edit the XML in the request window before resending - so you can use this as a great tool for testing the effects of different XML on SOAP servers. Note that you may need to change the content-length HTTP header value before resending an edited request.</p>
  +<p>
  +<a name="soapmon"></a>
  +</p>
   <div class="h4">
   <h4>Appendix: Using the SOAP Monitor</h4>
   </div>
  @@ -1364,6 +1474,9 @@
   <p>The SOAP message information is accessed with a web browser by going to http://localhost:&lt;port&gt;/axis/SOAPMonitor (where &lt;port&gt; is the port number where the application server is running).</p>
   <p>The SOAP message information is displayed through a web browser by using an applet that opens a socket connection to the SOAP monitor service. This applet requires a Java plug-in 1.3 or higher to be installed in your browser. If you do not have a correct plug-in, the browser should prompt you to install one.</p>
   <p>The port used by the SOAP monitor service to comminicate with applets is configurable. Edit the web.xml file for the Axis web application to change the port to be used. <strong>Note: The SOAP Monitor is NOT enabled by default for security reasons.</strong>
  +</p>
  +<p>
  +<a name="Glossary"></a>
   </p>
   <div class="h4">
   <h4>Glossary</h4>
  
  
  
  1.9       +1523 -1252ws-site/targets/axis/java/user-guide.pdf
  
  	<<Binary file>>