<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FWeb_Services_SOA%2FAXIS2</id>
		<title>Java/Web Services SOA/AXIS2 - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FWeb_Services_SOA%2FAXIS2"/>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/Web_Services_SOA/AXIS2&amp;action=history"/>
		<updated>2026-04-19T00:49:51Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java/Web_Services_SOA/AXIS2&amp;diff=9242&amp;oldid=prev</id>
		<title> в 18:01, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/Web_Services_SOA/AXIS2&amp;diff=9242&amp;oldid=prev"/>
				<updated>2010-05-31T18:01:50Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== A simple service that returns a text which contains the version number and the built date of the Axis2 Distribution used. ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Sample: Version&lt;br /&gt;
===============&lt;br /&gt;
Introduction&lt;br /&gt;
============&lt;br /&gt;
A simple service that returns a text which contains the version number and the built &lt;br /&gt;
date of the Axis2 Distribution used.&lt;br /&gt;
In other words, this is a simple service used by many to test whether the distribution they got is setup &lt;br /&gt;
and working properly. It contains a single method that simply returns version and built &lt;br /&gt;
date of the Axis2 distribution used.&lt;br /&gt;
&lt;br /&gt;
Pre-Requisites&lt;br /&gt;
==============&lt;br /&gt;
Apache Ant 1.6.2 or later&lt;br /&gt;
Running the Sample&lt;br /&gt;
==================&lt;br /&gt;
Type $ant from Axis2_HOME/samples/version&lt;br /&gt;
&lt;br /&gt;
Help&lt;br /&gt;
====&lt;br /&gt;
Please contact axis-user list (axis-user@ws.apache.org) if you have any trouble running the sample.&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== AXIS2 Event ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Steps to build and run the Savan-Eventing sample&lt;br /&gt;
------------------------------------------------&lt;br /&gt;
To build&lt;br /&gt;
--------&lt;br /&gt;
1. Move to the sample folder.&lt;br /&gt;
2. Create a subfolders &amp;quot;build/lib&amp;quot;.&lt;br /&gt;
3. Copy all the jars from a compatible Axis2 distribution to &amp;quot;build/lib&amp;quot;.&lt;br /&gt;
4. Copy the savan jar file to &amp;quot;build/lib&amp;quot;.&lt;br /&gt;
5. Run &amp;quot;ant&amp;quot; to build the sample.&lt;br /&gt;
&lt;br /&gt;
To run&lt;br /&gt;
------&lt;br /&gt;
1. Start a Axis2 server.&lt;br /&gt;
2. Deploy savan and addressing modules.&lt;br /&gt;
3. Deploy the three services that were created in the &amp;quot;build&amp;quot; folder.&lt;br /&gt;
4. Run the &amp;quot;samples.eventing.Client&amp;quot; class, you can pass the repository with a &amp;quot;-r&amp;quot; parameter and the server port with a &amp;quot;-p&amp;quot; parameter.&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to write a Web service and Web service client with Apache Axis2 using XML based client APIs (Axis2&amp;quot;s Primary APIs) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Axis2 User&amp;quot;s Guide Sample&lt;br /&gt;
=========================&lt;br /&gt;
This sample contains the source code relevant to xdocs/1_1/adv-userguide.html, &lt;br /&gt;
more specifically to xdocs/1_1/dii.html and xmlbased-server.html which are sections &lt;br /&gt;
of the Axis2 Advanced User&amp;quot;s Guide found in the Documents Distribution.&lt;br /&gt;
The sample explains how to write a Web service and Web service client with &lt;br /&gt;
Apache Axis2 using XML based client APIs (Axis2&amp;quot;s Primary APIs).&lt;br /&gt;
Introduction&lt;br /&gt;
============&lt;br /&gt;
The following sample clients are located at &lt;br /&gt;
AXIS2_HOME/samples/userguide/samples/userguide/src/userguide/clients directory. &lt;br /&gt;
EchoBlockingClient.java -- Demonstrates the request-response, blocking client which &lt;br /&gt;
is written using Axis2&amp;quot;s primary APIs.&lt;br /&gt;
EchoBlockingDualClient.java -- Demonstrates the request-response, blocking client which &lt;br /&gt;
uses two transport connections and written using Axis2&amp;quot;s primary APIs.&lt;br /&gt;
EchoNonBlockingClient.java -- Demonstrates the request-response, non-blocking invocation &lt;br /&gt;
which is written using Axis2&amp;quot;s primary APIs.&lt;br /&gt;
EchoNonBlockingDualClient.java -- Demonstrates the request-response, non-blocking invocation &lt;br /&gt;
using two transport connections and is written using Axis2&amp;quot;s primary APIs.&lt;br /&gt;
MailClient.java -- Represents a client for invoking &lt;br /&gt;
PingClient.java -- Represents a simple one-way client which is written using Axis2&amp;quot;s primary APIs.&lt;br /&gt;
RESTClient.java -- Represents a client for invoking a REST Web service&lt;br /&gt;
TCPClient.java -- Demonstrates a client for invoking a Web service using TCP&lt;br /&gt;
example1, example2 and example3 directories inside Axis2_home/samples/userguide/src/userguide &lt;br /&gt;
contain the Web services which are invoked by the above clients.&lt;br /&gt;
&lt;br /&gt;
Pre-Requisites&lt;br /&gt;
==============&lt;br /&gt;
Apache Ant 1.6.2 or later&lt;br /&gt;
Building the Service&lt;br /&gt;
====================&lt;br /&gt;
* Type &amp;quot;ant generate.module&amp;quot; from Axis2_HOME/samples/userguide to generate the logging module.&lt;br /&gt;
* Add the logging phase to the ../../conf/axis2.xml. For more details please refer to the &lt;br /&gt;
  http://ws.apache.org/axis2/1_2/modules.html&lt;br /&gt;
* Type &amp;quot;ant generate.service&amp;quot; or just &amp;quot;ant&amp;quot; from Axis2_HOME/samples/userguide&lt;br /&gt;
* Then go to AXIS2_HOME/bin directory and run either axis2server.bat or axis2server.sh depending on your platform.&lt;br /&gt;
Alternatively you can copy the the generated service archives in to a servlet container.&lt;br /&gt;
If you go to http://localhost:8080/axis2/, you should see MyService, MyServiceWithModule are deployed. &lt;br /&gt;
&lt;br /&gt;
Running the Clients&lt;br /&gt;
===================&lt;br /&gt;
Type the following ant commands from Axis2_HOME/samples/userguide to run the clients one by one.&lt;br /&gt;
 * &amp;quot;ant run.client.blocking&amp;quot;&lt;br /&gt;
   This invokes MyService through a request-response, blocking client.   &lt;br /&gt;
 * &amp;quot;ant run.client.blockingdual&amp;quot;&lt;br /&gt;
   This invokes MyService through a request-response, blocking client via dual transport channels.   &lt;br /&gt;
 * &amp;quot;ant run.client.nonblocking&amp;quot;&lt;br /&gt;
   This invokes MyService through a request-response, non-blocking client.  &lt;br /&gt;
 * &amp;quot;ant run.client.nonblockingdual&amp;quot;&lt;br /&gt;
   This invokes MyService through a request-response, non-blocking client via dual transport channels.   &lt;br /&gt;
 * &amp;quot;ant run.client.ping&amp;quot;&lt;br /&gt;
   This invokes MyService through a one-way client&lt;br /&gt;
 &lt;br /&gt;
You can find more information on the above clients in Axis2 users guide, RESTFul Web services support, &lt;br /&gt;
TCP Transport documents found in the Documents Distribution&amp;quot;s xdocs directory. Also, you may find it &lt;br /&gt;
useful to try out the above services and clients while going through these documents.&lt;br /&gt;
Note&lt;br /&gt;
==============&lt;br /&gt;
Sometimes, if you&amp;quot;re having trouble running the client successfully, &lt;br /&gt;
It may be necessary to clean the services repository before you generate the service, deploy it&lt;br /&gt;
and run the client. (i.e. delete services created from previous samples.)&lt;br /&gt;
Help&lt;br /&gt;
====&lt;br /&gt;
Please contact axis-user list (axis-user@ws.apache.org) if you have any trouble running the sample.&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== This sample demonstrates how to use WSDL2Java generated code with Castor ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
3Sample: Data Binding&lt;br /&gt;
====================&lt;br /&gt;
Introduction&lt;br /&gt;
============&lt;br /&gt;
This sample demonstrates how to use WSDL2Java generated code with Castor. &lt;br /&gt;
Running of this sample assumes that you are running this within the extracted release folder (Axis2_HOME/samples/databinding).&lt;br /&gt;
&lt;br /&gt;
Pre-Requisites&lt;br /&gt;
==============&lt;br /&gt;
 * Install Apache Ant 1.6.2 or later.&lt;br /&gt;
 * Please create a directory named lib under the directory that contains this file.&lt;br /&gt;
 * Download latest stax-utils jar from&lt;br /&gt;
   https://stax-utils.dev.java.net/servlets/ProjectDocumentList?folderID=1106 and drop that into the&lt;br /&gt;
   new lib directory.&lt;br /&gt;
 * Download version 1.0.4 of Castor jar from http://dist.codehaus.org/castor/1.0.4/castor-1.0.4.jar and drop that into the new&lt;br /&gt;
   lib directory.(The latest releases of castor are available at http://www.castor.org/download.html, but this example may not run   &lt;br /&gt;
   with versions later than 1.0.4)&lt;br /&gt;
You can achieve all three of the above steps by running &amp;quot;ant download.jars&amp;quot;, but it will take some &lt;br /&gt;
time to download those two jars, using ant.&lt;br /&gt;
&lt;br /&gt;
Deploying the Service&lt;br /&gt;
=====================&lt;br /&gt;
You need to create the stock service Web service and deploy it. Typing ant generate.service or &lt;br /&gt;
simply ant in the command prompt, will build the service against StockQuoteService.wsdl listed &lt;br /&gt;
inside Axis2_HOME/samples/databinding and put it under Axis2_HOME/repository/services.&lt;br /&gt;
You need to then startup the server to deploy the service. Go to Axis2_HOME/bin folder and execute either&lt;br /&gt;
axis2server.bat (in Windows) or axis2server.sh(in Linux), depending on your platform.&lt;br /&gt;
&lt;br /&gt;
Running the Client&lt;br /&gt;
==================&lt;br /&gt;
Typing the command &amp;quot;ant run.client&amp;quot; inside Axis2_HOME/samples/databinding runs the Axis2_HOME/samples/databinding/client/src/samples/databinding/StockClient.java class. You may use&lt;br /&gt;
the command scripts (as specified above) to do so. You need to supply 2 parameters to the command- url and symbol.&lt;br /&gt;
 * ant run.client -Durl=http://localhost:8080/axis2/services/StockQuoteService -Dsymbol=IBM&lt;br /&gt;
   Succeeds with a Price of 99.0. You will see &amp;quot;Price = 99.0&amp;quot;&lt;br /&gt;
When you call ant run.client with parameters, before running&lt;br /&gt;
client/src/samples/databinding/StockClient.java class, it does the following as well:&lt;br /&gt;
  * Generate the stubs (for the client) from the WSDL&lt;br /&gt;
  * Compile the client classes&lt;br /&gt;
  * Create a Jar of the client classes and copy it to build/client/StockService-test-client.jar&lt;br /&gt;
How It Works&lt;br /&gt;
==============&lt;br /&gt;
- Generate code giving -d none to get all the Axis2 APIs with OMElements.&lt;br /&gt;
- Create Castor objects for the schema given in the StockQuoteService.wsdl.&lt;br /&gt;
- Client API and the service uses those castor objects to get/set data.&lt;br /&gt;
- Get StAX events from the castor objects and construct OMElements from them. Those StAX events&lt;br /&gt;
  are fed into StAXOMBuilder which can create OM tree from it.&lt;br /&gt;
- Feed those OMElement in to generated code.&lt;br /&gt;
Note&lt;br /&gt;
==============&lt;br /&gt;
Sometimes, if you&amp;quot;re having trouble running the client successfully, &lt;br /&gt;
It may be necessary to clean the services repository before you generate the service, deploy it&lt;br /&gt;
and run the client. (i.e. delete services created from previous samples.)&lt;br /&gt;
Help&lt;br /&gt;
====&lt;br /&gt;
Please contact axis-user list (axis-user@ws.apache.org) if you have any trouble running the sample.&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== This sample demonstrate usage of service lifecycle and bit of session managment ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Sample: ServiceLifeCycle&lt;br /&gt;
=========================&lt;br /&gt;
Introduction:&lt;br /&gt;
============&lt;br /&gt;
This sample demonstrate usage of service lifecycle and bit of session managment. &lt;br /&gt;
The main idea is to show where and how to use service lifecycle interface and &lt;br /&gt;
session related methods. &lt;br /&gt;
&lt;br /&gt;
Prerequisites&lt;br /&gt;
=============&lt;br /&gt;
Apache Ant 1.6.2 or later&lt;br /&gt;
If you want to access the service in REST manner you have to deploy the service in &lt;br /&gt;
application server such as Apache Tomcat. Note that it will not work with axis2server.&lt;br /&gt;
&lt;br /&gt;
Deploying the Sevrice&lt;br /&gt;
===================== &lt;br /&gt;
Deploy into Sample repository:&lt;br /&gt;
    &lt;br /&gt;
 * Type ant generate.service or simply ant from Axis2_HOME/samples/servicelifecycle&lt;br /&gt;
Deploy into Tomcat :&lt;br /&gt;
     &lt;br /&gt;
 * To build and copy the service archive file into Tomcat, type ant copy.to.tomcat from &lt;br /&gt;
Axis2_HOME/samples/servicelifecycle which will copy the aar file into&lt;br /&gt;
tomcat/web-app/axis2/WEB-INF/services directory.&lt;br /&gt;
Running the Client&lt;br /&gt;
==================&lt;br /&gt;
Type ant run.client from Axis2_HOME/samples/servicelifecycle.&lt;br /&gt;
And then follow the instructions as mentioned in the console.&lt;br /&gt;
Advanced Guide&lt;br /&gt;
==============&lt;br /&gt;
For more details kindly see doc/servicelifecycleguide.html&lt;br /&gt;
Help&lt;br /&gt;
====&lt;br /&gt;
Please contact axis-user list (axis-user@ws.apache.org) if you have any trouble running the sample.&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>