You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2006/03/31 13:03:32 UTC
svn commit: r390391 - in /webservices/axis2/trunk/c: samples/Makefile.am
xdocs/docs/installationguide.html xdocs/docs/userguide2.html
Author: sahan
Date: Fri Mar 31 03:03:30 2006
New Revision: 390391
URL: http://svn.apache.org/viewcvs?rev=390391&view=rev
Log:
Updating the docs ... correction for build
Modified:
webservices/axis2/trunk/c/samples/Makefile.am
webservices/axis2/trunk/c/xdocs/docs/installationguide.html
webservices/axis2/trunk/c/xdocs/docs/userguide2.html
Modified: webservices/axis2/trunk/c/samples/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/Makefile.am?rev=390391&r1=390390&r2=390391&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/Makefile.am (original)
+++ webservices/axis2/trunk/c/samples/Makefile.am Fri Mar 31 03:03:30 2006
@@ -1,5 +1,5 @@
samplesdir=$(prefix)/samples
-samples_DATA=AUTHORS autogen.sh ChangeLog configure.ac Makefile.am NEWS README configure Makefile.in
+samples_DATA=AUTHORS autogen.sh ChangeLog configure.ac Makefile.am NEWS README configure Makefile.in config.h.in INSTALL COPYING
SUBDIRS = server client
install-data-hook:
chmod 755 $(samplesdir)/configure $(samplesdir)/autogen.sh
Modified: webservices/axis2/trunk/c/xdocs/docs/installationguide.html
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/xdocs/docs/installationguide.html?rev=390391&r1=390390&r2=390391&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xdocs/docs/installationguide.html (original)
+++ webservices/axis2/trunk/c/xdocs/docs/installationguide.html Fri Mar 31 03:03:30 2006
@@ -3,10 +3,10 @@
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Axis2-C Installation Guide</title>
- <meta name="generator" content="amaya 8.5, see http://www.w3.org/Amaya/" />
+ <meta name="generator" content="amaya 9.4, see http://www.w3.org/Amaya/" />
</head>
<body xml:lang="en">
@@ -52,16 +52,24 @@
</li>
</ul>
</li>
+ <li><a href="#installing-apache2">Installing Apache2 Web Server integration module
+ (mod_axis2)</a>
+ <ul>
+ <li><a href="#building-apache2">Building mod_axis2 from source tree</a></li>
+ <li><a href="#deploying-apache2">Deploying in Apache2 Web Server</a></li>
+ </ul>
+ </li>
</ul>
-<a></a>
+
+<p><a></a></p>
<h2>Installing and running on Linux</h2>
<p>This can be done using binary or source distributions</p>
<p>To get both the binary and source distributions working, you need libxml2,
-which can be downloaded from <a href="http://xmlsoft.org/downloads.html"
-target="_blank">here</a>.</p>
+which can be downloaded from <a
+href="http://xmlsoft.org/downloads.html">here</a>.</p>
<p>(NOTE: most Linux systems has libxml2 by default.)</p>
<a></a>
@@ -163,8 +171,16 @@
<li>use './configure --help' for possible command line options.</li>
<li>NOTE: If you don't provide a --prefix configure option, it will by
defaul install into /usr/local/axis2c folder.</li>
- <li>If you need to get the samples working, you also need to give the
- configure option --enable-samples=yes</li>
+ <li>If you need to get the samples working, you also need to build the
+ samples.
+ <p>To build samples:</p>
+ <ul>
+ <li>cd samples</li>
+ <li>./configure --prefix=${AXIS2C_HOME}</li>
+ <li>make</li>
+ <li>make install</li>
+ </ul>
+ </li>
</ul>
</li>
<li>Go to where you installed axis2c.</li>
@@ -397,6 +413,83 @@
<li>Example: C:\axis2c\build\deploy\bin\samples> echo.exe</li>
</ul>
</li>
+</ul>
+<a id="installing-apache2"/>
+<h3> 3. Installing Apache2 Web Server integration module (mod_axis2).</h3>
+
+<h4>3.1 Building mod_axis2 from source tree</h4>
+
+<h4>3.1.1 On Linux Platform</h4>
+<ul>
+ <li>Provide the apache2 include files location as configure option
+ ./configure --with-apache2="<apache2 include files location>"
+ [other configure options] - Some apache2 distributions install APR
+ (Apache Portable Runtime) include files in a seperate location which is
+ requred to build mod_axis2. In that case use
+ <p>./configure --with-apache2="<apache2 include files location>"
+ --with-apr="<apr include files location>" [other configure
+ options]</p>
+ </li>
+ <li>Then build the source tree<br />
+ make<br />
+ make install<br />
+ - This will install mod_axis2.so into your
+ "<your_path_to_axis2c>/lib"</li>
+</ul>
+
+<h4>3.1.2 On Win32 platform</h4>
+<ul>
+ <li>Provide the apache2 location in configure.in file in
+ APACHE_INSTALL_DIR<br />
+ eg : APACHE_INSTALL_DIR = E:\Apache</li>
+ <li>After compiling the sources (as described in section 4.3) build the
+ mod_axis2.dll by issuing the command "nmake axis2_apache_module".</li>
+ <li>This will build the mod_axis2.dll and copy it to %AXIS2C_HOME%\lib
+ directory.<br />
+ eg: C:\axis2c\build\deploy\lib</li>
+</ul>
+
+<h4>3.2 Deploying in Apache2 Web Server</h4>
+
+<p><b>Note: To do the following tasks you might need super user privileges in
+your machine.</b></p>
+<ul>
+ <li>Copy the mod_axis2 (libmod_axis2.so.0.0.0 on Linux and mod_axis2.dll in
+ Windows) to "<apache2 modules directory>" (eg:
+ /usr/lib/apache2/modules in Linux or C:\Apache2\modules in Windows) as
+ mod_axis2.so
+ <p>eg: cp $AXIS2C_HOME/lib/libmod_axis2.so.0.0.0
+ /usr/lib/apache2/modules/mod_axis2.so<br />
+ copy C:\axis2c\build\deploy\lib\mod_axis2.dll
+ C:\Apache2\modules\mod_axis2.so</p>
+ </li>
+ <li>Edit the Apache2's configuration file (generally httpd.conf) and add
+ the following directive
+ <pre> LoadModule axis2_module <apache2 modules directory>/mod_axis2.so
+ <Location /axis2>
+ SetHandler axis2_module
+ RepoPath <axis2 repository path>
+ LogFile <axis2 log file path>
+ Axis2LogLevel LOG_LEVEL
+ </Location>
+ </pre>
+ <p>LOG_LEVEL can be one of following <br />
+ AXIS2_LOG_LEVEL_CRITICAL - Log critical errors only <br />
+ AXIS2_LOG_LEVEL_ERROR - Log errors critical errors <br />
+ AXIS2_LOG_LEVEL_WARNING - Log warnings and above <br />
+ AXIS2_LOG_LEVEL_INFO - Log info and above <br />
+ AXIS2_LOG_LEVEL_DEBUG - Log debug and above (default) <br />
+ AXIS2_LOG_LEVEL_TRACE - Log trace messages</p>
+ </li>
+ <li>Use forward slashes "/" for path seperators in <apache2 modules
+ directory>, <axis2 repository path> and <axis2 log file
+ path></li>
+ <li>Make sure that the apache2 user has correct permissions to above
+ paths<br />
+ - Read permission to the repository<br />
+ - Write permission to the log file</li>
+ <li>Restart apache2 and test whether mod_axis2 module is loaded by typing
+ the URL http://localhost/axis2/services</li>
</ul>
</body>
</html>
Modified: webservices/axis2/trunk/c/xdocs/docs/userguide2.html
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/xdocs/docs/userguide2.html?rev=390391&r1=390390&r2=390391&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xdocs/docs/userguide2.html (original)
+++ webservices/axis2/trunk/c/xdocs/docs/userguide2.html Fri Mar 31 03:03:30 2006
@@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Axis2 User's Guide</title>
- <meta name="generator" content="amaya 8.5, see http://www.w3.org/Amaya/">
+ <meta name="generator" content="amaya 9.4, see http://www.w3.org/Amaya/">
</head>
<body dir="ltr" lang="en-US">
@@ -27,20 +27,19 @@
going through some background information.</p>
<p>Web Services can be used to provide wide range of functionality to the
-users ranging from simple, less time consuming operations such as
-"getStockQuote", to time consuming business services. When we utilize
-these Web Services (that is invoke the Web Service using a client
-application), we cannot use some simple generic invocation paradigm that
-suites all the timing complexities involved in the service operations. For
-example, if we use a single transport channel (such as HTTP) to invoke a Web
-Service with an IN-OUT operation that take long time to complete, then most
-of the time we may end up with "connection time outs". On the other hand, if
-there are simultaneous service invocations that we need to perform from
-a single client application, then the use of a "blocking" client API will
-degrade the performance of the client application. Similarly there are
-various other consequences such as One-Way transports that come in to play
-when we need them. Let's try to analyze some common service invocation
-paradigms.</p>
+users ranging from simple, less time consuming operations such as
+"getStockQuote", to time consuming business services. When we utilize these
+Web Services (that is invoke the Web Service using a client application), we
+cannot use some simple generic invocation paradigm that suites all the timing
+complexities involved in the service operations. For example, if we use a
+single transport channel (such as HTTP) to invoke a Web Service with an
+IN-OUT operation that take long time to complete, then most of the time we
+may end up with "connection time outs". On the other hand, if there are
+simultaneous service invocations that we need to perform from a single
+client application, then the use of a "blocking" client API will degrade the
+performance of the client application. Similarly there are various other
+consequences such as One-Way transports that come in to play when we need
+them. Let's try to analyze some common service invocation paradigms.</p>
<p>Many web service engines provide the users with a Blocking and
Non-Blocking client APIs.</p>
@@ -60,9 +59,9 @@
</li>
</ul>
-<p>Both these mechanisms work in the API level. Let's name the
-asynchronous behavior that we can get using the <strong>Non-Blocking
-API</strong> as <b>API Level Asynchrony.</b></p>
+<p>Both these mechanisms work in the API level. Let's name the asynchronous
+behavior that we can get using the <strong>Non-Blocking API</strong> as
+<b>API Level Asynchrony.</b></p>
<p>Both these mechanisms use a single transport connection to send the
request and to receive the response. They do not have the capability of using
@@ -85,7 +84,7 @@
<td height="19" width="33%"><p><strong>API
(Blocking/Non-Blocking)</strong></p>
</td>
- <td width="33%"><p><strong> Dual Transports (Yes/No)</strong></p>
+ <td width="33%"><p><strong> Dual Transports (Yes/No)</strong></p>
</td>
<td width="33%"><p><strong>Description</strong></p>
</td>
@@ -144,543 +143,430 @@
"echo service" using the simplest blocking invocation. The complete client
code with some explanations within comments is shown below.</p>
-<p><font color="#008000">#include <axis2_call.h><br>
-</font> <font
-color="#008000">#include <axis2_om_stax_builder.h><br>
-</font> <font color="#008000">#include <axis2_om_document.h><br>
-</font> <font color="#008000">#include <axis2_om_node.h><br>
-</font> <font color="#008000">#include <axis2_om_element.h><br>
-</font> <font color="#008000">#include <axis2_om_text.h><br>
-</font> <font color="#008000">#include <axis2_stream.h><br>
-</font> <font color="#008000">#include <axis2_log_default.h><br>
-</font> <font color="#008000">#include <axis2_error_default.h><br>
-</font> <font color="#008000">#include <axis2_xml_reader.h><br>
-</font> <font color="#008000">#include <stdio.h><br>
-</font> <font color="#008000">#include <axis2_xml_writer.h><br>
-</font> <font color="#008000">#include <axis2_soap_builder.h><br>
-</font> <font color="#008000">#include <axis2_soap.h><br>
-</font> <font color="#008000">#include <axis2_soap_envelope.h><br>
-</font> <font color="#008000">#include <axis2_soap_body.h><br>
-</font> <font color="#008000">#include <axis2_soap_header.h><br>
-</font> <font color="#008000">#include <axis2_soap_message.h><br>
-</font> <font
-color="#008000">#include <axis2_soap_header_block.h><br>
-</font> <font color="#008000">#include <axis2_soap_fault.h><br>
+<p><font color="#008000">#include <axis2_call.h><br>
+</font> <font color="#008000">#include <axis2_om_stax_builder.h><br>
+</font> <font color="#008000">#include <axis2_om_document.h><br>
+</font> <font color="#008000">#include <axis2_om_node.h><br>
+</font> <font color="#008000">#include <axis2_om_element.h><br>
+</font> <font color="#008000">#include <axis2_om_text.h><br>
+</font> <font color="#008000">#include <axis2_stream.h><br>
+</font> <font color="#008000">#include <axis2_log_default.h><br>
+</font> <font color="#008000">#include <axis2_error_default.h><br>
+</font> <font color="#008000">#include <axis2_xml_reader.h><br>
+</font> <font color="#008000">#include <stdio.h><br>
+</font> <font color="#008000">#include <axis2_xml_writer.h><br>
+</font> <font color="#008000">#include <axis2_soap_builder.h><br>
+</font> <font color="#008000">#include <axis2_soap.h><br>
+</font> <font color="#008000">#include <axis2_soap_envelope.h><br>
+</font> <font color="#008000">#include <axis2_soap_body.h><br>
+</font> <font color="#008000">#include <axis2_soap_header.h><br>
+</font> <font color="#008000">#include <axis2_soap_message.h><br>
+</font> <font color="#008000">#include <axis2_soap_header_block.h><br>
+</font> <font color="#008000">#include <axis2_soap_fault.h><br>
+</font> <font color="#008000">#include <axis2_soap_fault_code.h><br>
+</font> <font color="#008000">#include <axis2_soap_fault_role.h><br>
</font> <font
-color="#008000">#include <axis2_soap_fault_code.h><br>
-</font> <font
-color="#008000">#include <axis2_soap_fault_role.h><br>
-</font> <font
-color="#008000">#include <platforms/axis2_platform_auto_sense.h><br>
+color="#008000">#include <platforms/axis2_platform_auto_sense.h><br>
</font> <br>
-<font color="#000000">axis2_om_node_t</font> *<br>
+<font color="#000000">axis2_om_node_t</font> *<br>
<font color="#000000">build_om_programatically</font>(<font
-color="#000000">axis2_env_t</font> **<font
-color="#000000">env</font>);<br>
+color="#000000">axis2_env_t</font> **<font color="#000000">env</font>);<br>
<br>
-<font color="#800000">int</font> <font color="#000000">main</font>(<font
-color="#800000">int</font> <font color="#000000">argc</font>, <font
-color="#800000">char</font>** <font color="#000000">argv</font>)<br>
+<font color="#800000">int</font> <font color="#000000">main</font>(<font
+color="#800000">int</font> <font color="#000000">argc</font>, <font
+color="#800000">char</font>** <font color="#000000">argv</font>)<br>
{<br>
- <font
-color="#000000">axis2_om_node_t</font> *<font
-color="#000000">node</font> = <font color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_status_t</font> <font
-color="#000000">status</font> = <font
+ <font color="#000000">axis2_om_node_t</font> *<font
+color="#000000">node</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_status_t</font> <font
+color="#000000">status</font> = <font
color="#000000">AXIS2_FAILURE</font>;<br>
- <font color="#000000">axis2_env_t</font> *<font
-color="#000000">env</font> = <font color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_error_t</font> *<font
-color="#000000">error</font> = <font
-color="#000000">NULL</font>;<br>
- <font color="#000000">axis2_log_t</font> *<font
-color="#000000">log</font> = <font color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_allocator_t</font> *<font
-color="#000000">allocator</font> = <font
-color="#000000">NULL</font>;<br>
- <font color="#000000">axis2_char_t</font> *<font
-color="#000000">address</font> = <font
-color="#000000">NULL</font>;<br>
- <font color="#000000">axis2_char_t</font> *<font
-color="#000000">wsa_action</font> = <font
-color="#000000">NULL</font>;<br>
- <font color="#000000">axis2_char_t</font> *<font
-color="#000000">client_home</font> = <font
-color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_om_node_t</font> *<font
-color="#000000">ret_node</font> = <font
-color="#000000">NULL</font>;<br>
- <font color="#000000">axis2_svc_t</font> *<font
-color="#000000">svc</font> = <font color="#000000">NULL</font>;<br>
- <font color="#000000">axis2_op_t</font> *<font
-color="#000000">op</font> = <font color="#000000">NULL</font>;<br>
- <font color="#000000">axis2_call_t</font> *<font
-color="#000000">call</font> = <font color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_msg_ctx_t</font> *<font
-color="#000000">msg_ctx</font> = <font
-color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_mep_client_t</font> *<font
-color="#000000">mep_client</font> = <font
-color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_msg_info_headers_t</font> *<font
-color="#000000">msg_info_headers</font> = <font
-color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_endpoint_ref_t</font>* <font
-color="#000000">endpoint_ref</font> = <font
-color="#000000">NULL</font>;<br>
- <font color="#000000">axis2_conf_t</font> *<font
-color="#000000">conf</font> = <font color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_msg_ctx_t</font> *<font
-color="#000000">response_ctx</font> = <font
-color="#000000">NULL</font>;<br>
- <br>
- <font
-color="#808080"><i>/* set up the environment with allocator and log*/</i></font><br>
- <font
-color="#000000">allocator</font> = <font
-color="#000000">axis2_allocator_init</font> (<font
+ <font color="#000000">axis2_env_t</font> *<font
+color="#000000">env</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_error_t</font> *<font
+color="#000000">error</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_log_t</font> *<font
+color="#000000">log</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_allocator_t</font> *<font
+color="#000000">allocator</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_char_t</font> *<font
+color="#000000">address</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_char_t</font> *<font
+color="#000000">wsa_action</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_char_t</font> *<font
+color="#000000">client_home</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_om_node_t</font> *<font
+color="#000000">ret_node</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_svc_t</font> *<font
+color="#000000">svc</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_op_t</font> *<font
+color="#000000">op</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_call_t</font> *<font
+color="#000000">call</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_msg_ctx_t</font> *<font
+color="#000000">msg_ctx</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_mep_client_t</font> *<font
+color="#000000">mep_client</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_msg_info_headers_t</font> *<font
+color="#000000">msg_info_headers</font> = <font
+color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_endpoint_ref_t</font>* <font
+color="#000000">endpoint_ref</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_conf_t</font> *<font
+color="#000000">conf</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_msg_ctx_t</font> *<font
+color="#000000">response_ctx</font> = <font color="#000000">NULL</font>;<br>
+ <br>
+ <font
+color="#808080"><i>/* set up the environment with allocator and log*/</i></font><br>
+ <font color="#000000">allocator</font> = <font
+color="#000000">axis2_allocator_init</font> (<font
color="#000000">NULL</font>);<br>
- <font color="#000000">error</font> = <font
+ <font color="#000000">error</font> = <font
color="#000000">axis2_error_create</font>(<font
color="#000000">allocator</font>);<br>
- <font color="#000000">log</font> = <font
+ <font color="#000000">log</font> = <font
color="#000000">axis2_log_create</font>(<font
-color="#000000">allocator</font>, <font
-color="#000000">NULL</font>, <font
+color="#000000">allocator</font>, <font color="#000000">NULL</font>, <font
color="#FF0000">"addr_echo.log"</font>);<br>
- <font color="#000000">env</font> = <font
+ <font color="#000000">env</font> = <font
color="#000000">axis2_env_create_with_error_log</font>(<font
-color="#000000">allocator</font>, <font
-color="#000000">error</font>, <font color="#000000">log</font>);<br>
- <font color="#000000">env</font>-><font
-color="#000000">log</font>-><font
-color="#000000">level</font> = <font
+color="#000000">allocator</font>, <font color="#000000">error</font>, <font
+color="#000000">log</font>);<br>
+ <font color="#000000">env</font>-><font
+color="#000000">log</font>-><font color="#000000">level</font> = <font
color="#000000">AXIS2_LOG_LEVEL_TRACE</font>;<br>
- <font color="#000000">axis2_error_init</font>();<br>
+ <font color="#000000">axis2_error_init</font>();<br>
<br>
- <font
-color="#808080"><i>/* Set up deploy folder. It is from the deploy folder, the configuration is picked up <br>
- * using the axis2.xml file.<br>
- * In this sample client_home points to the Axis2/C default deploy folder. The client_home can <br>
- * be different from this folder on your system. For example, you may have a different folder <br>
- *(say, my_client_folder) with its own axis2.xml file. my_client_folder/modules will have the <br>
- * modules that the client uses<br>
- */</i></font><br>
- <font
-color="#000000">client_home</font> = <font
+ <font
+color="#808080"><i>/* Set up deploy folder. It is from the deploy folder, the configuration is picked up <br>
+ * using the axis2.xml file.<br>
+ * In this sample client_home points to the Axis2/C default deploy folder. The client_home can <br>
+ * be different from this folder on your system. For example, you may have a different folder <br>
+ *(say, my_client_folder) with its own axis2.xml file. my_client_folder/modules will have the <br>
+ * modules that the client uses<br>
+ */</i></font><br>
+ <font color="#000000">client_home</font> = <font
color="#000000">AXIS2_GETENV</font>(<font
color="#FF0000">"AXIS2C_HOME"</font>);<br>
- <font color="#000000"><b>if</b></font> (!<font
+ <font color="#000000"><b>if</b></font> (!<font
color="#000000">client_home</font>)<br>
- <font
-color="#000000">client_home</font> = <font
+ <font color="#000000">client_home</font> = <font
color="#FF0000">"../../deploy"</font>;<br>
- <br>
- <font
-color="#808080"><i>/* Set end point reference of echo service */</i></font><br>
- <font
-color="#000000">address</font> = <font
+ <br>
+ <font
+color="#808080"><i>/* Set end point reference of echo service */</i></font><br>
+ <font color="#000000">address</font> = <font
color="#FF0000">"http://localhost:9090/axis2/services/echo"</font>;<br>
- <font
-color="#000000">wsa_action</font> = <font
+ <font color="#000000">wsa_action</font> = <font
color="#FF0000">"http://localhost:9090/axis2/services/echo/echoString"</font>;<br>
- <font color="#000000"><b>if</b></font> (<font
-color="#000000">argc</font> > <font
-color="#0000FF">1</font> )<br>
- <font
-color="#000000">address</font> = <font
+ <font color="#000000"><b>if</b></font> (<font
+color="#000000">argc</font> > <font color="#0000FF">1</font> )<br>
+ <font color="#000000">address</font> = <font
color="#000000">argv</font>[<font color="#0000FF">1</font>];<br>
- <font color="#000000"><b>if</b></font> (<font
+ <font color="#000000"><b>if</b></font> (<font
color="#000000">AXIS2_STRCMP</font>(<font
-color="#000000">address</font>, <font
-color="#FF0000">"-h"</font>) == <font color="#0000FF">0</font>)<br>
- {<br>
- <font
-color="#000000">printf</font>(<font
-color="#FF0000">"Usage : %s [endpoint_url]\n"</font>, <font
+color="#000000">address</font>, <font color="#FF0000">"-h"</font>) == <font
+color="#0000FF">0</font>)<br>
+ {<br>
+ <font color="#000000">printf</font>(<font
+color="#FF0000">"Usage : %s [endpoint_url]\n"</font>, <font
color="#000000">argv</font>[<font color="#0000FF">0</font>]);<br>
- <font
-color="#000000">printf</font>(<font
-color="#FF0000">"use -h for help\n"</font>);<br>
- <font
-color="#000000"><b>return</b></font> <font color="#0000FF">0</font>;<br>
- }<br>
+ <font color="#000000">printf</font>(<font
+color="#FF0000">"use -h for help\n"</font>);<br>
+ <font color="#000000"><b>return</b></font> <font
+color="#0000FF">0</font>;<br>
+ }<br>
<br>
- <font color="#000000">printf</font> (<font
-color="#FF0000">"Using endpoint : %s\n"</font>, <font
+ <font color="#000000">printf</font> (<font
+color="#FF0000">"Using endpoint : %s\n"</font>, <font
color="#000000">address</font>);<br>
<br>
- <font
-color="#808080"><i>/* build the SOAP request message content using OM API.*/</i></font><br>
- <font color="#000000">node</font> = <font
+ <font
+color="#808080"><i>/* build the SOAP request message content using OM API.*/</i></font><br>
+ <font color="#000000">node</font> = <font
color="#000000">build_om_programatically</font>(&<font
color="#000000">env</font>);<br>
<br>
- <font
-color="#808080"><i>/* create call struct */</i></font><br>
- <font color="#000000">call</font> = <font
+ <font color="#808080"><i>/* create call struct */</i></font><br>
+ <font color="#000000">call</font> = <font
color="#000000">axis2_call_create</font>(&<font
-color="#000000">env</font>, <font
-color="#000000">NULL</font>, <font
+color="#000000">env</font>, <font color="#000000">NULL</font>, <font
color="#000000">client_home</font>);<br>
- <font
-color="#000000">mep_client</font> = <font
+ <font color="#000000">mep_client</font> = <font
color="#000000">AXIS2_CALL_GET_BASE</font>(<font
-color="#000000">call</font>, &<font color="#000000">env</font>);<br>
+color="#000000">call</font>, &<font color="#000000">env</font>);<br>
<br>
- <font
-color="#808080"><i>/* Prepare the SOAP envelope, using the SOAP message content to be sent.<br>
- * Get a reference to the message context */</i></font><br>
- <font
-color="#000000">msg_ctx</font> = <font
+ <font
+color="#808080"><i>/* Prepare the SOAP envelope, using the SOAP message content to be sent.<br>
+ * Get a reference to the message context */</i></font><br>
+ <font color="#000000">msg_ctx</font> = <font
color="#000000">AXIS2_MEP_CLIENT_PREPARE_SOAP_ENVELOPE</font>(<font
-color="#000000">mep_client</font>, &<font
-color="#000000">env</font>, <font color="#000000">node</font>);<br>
+color="#000000">mep_client</font>, &<font
+color="#000000">env</font>, <font color="#000000">node</font>);<br>
<br>
- <font
-color="#808080"><i>/* Get the reference to message info headers structure from the message context. <br>
- This can be used to manipulate SOAP header content when using WS-Addressing. */</i></font><br>
- <font
-color="#000000">msg_info_headers</font> = <font
+ <font
+color="#808080"><i>/* Get the reference to message info headers structure from the message context. <br>
+ This can be used to manipulate SOAP header content when using WS-Addressing. */</i></font><br>
+ <font color="#000000">msg_info_headers</font> = <font
color="#000000">AXIS2_MSG_CTX_GET_MSG_INFO_HEADERS</font>(<font
-color="#000000">msg_ctx</font>, &<font
-color="#000000">env</font>);<br>
+color="#000000">msg_ctx</font>, &<font color="#000000">env</font>);<br>
<br>
- <font
-color="#808080"><i>/* create an axis2_endpoint_ref_t struct with ERP assigned */</i></font><br>
- <font
-color="#000000">endpoint_ref</font> = <font
+ <font
+color="#808080"><i>/* create an axis2_endpoint_ref_t struct with ERP assigned */</i></font><br>
+ <font color="#000000">endpoint_ref</font> = <font
color="#000000">axis2_endpoint_ref_create</font>(&<font
-color="#000000">env</font>, <font color="#000000">address</font>);<br>
+color="#000000">env</font>, <font color="#000000">address</font>);<br>
<br>
- <font
-color="#808080"><i>/* Set header parameters, required for WS-Addressing. <br>
- * Required only if you need to make use of WS-Addressing.<br>
- */</i></font><br>
- <font
-color="#000000">AXIS2_MSG_INFO_HEADERS_SET_TO</font>(<font
-color="#000000">msg_info_headers</font>, &<font
-color="#000000">env</font>, <font
-color="#000000">endpoint_ref</font>);<br>
- <font
-color="#000000">AXIS2_MSG_INFO_HEADERS_SET_ACTION</font>(<font
-color="#000000">msg_info_headers</font>, &<font
-color="#000000">env</font>, <font
-color="#000000">wsa_action</font>); <br>
- <br>
- <font color="#000000">AXIS2_CALL_SET_TO</font>(<font
-color="#000000">call</font>, &<font
-color="#000000">env</font>, <font
+ <font
+color="#808080"><i>/* Set header parameters, required for WS-Addressing. <br>
+ * Required only if you need to make use of WS-Addressing.<br>
+ */</i></font><br>
+ <font color="#000000">AXIS2_MSG_INFO_HEADERS_SET_TO</font>(<font
+color="#000000">msg_info_headers</font>, &<font
+color="#000000">env</font>, <font color="#000000">endpoint_ref</font>);<br>
+ <font color="#000000">AXIS2_MSG_INFO_HEADERS_SET_ACTION</font>(<font
+color="#000000">msg_info_headers</font>, &<font
+color="#000000">env</font>, <font color="#000000">wsa_action</font>); <br>
+ <br>
+ <font color="#000000">AXIS2_CALL_SET_TO</font>(<font
+color="#000000">call</font>, &<font color="#000000">env</font>, <font
color="#000000">endpoint_ref</font>);<br>
<br>
- <font
-color="#808080"><i>/* Get the configuration context */</i></font><br>
- <font color="#000000">conf</font> = <font
+ <font
+color="#808080"><i>/* Get the configuration context */</i></font><br>
+ <font color="#000000">conf</font> = <font
color="#000000">AXIS2_CONF_CTX_GET_CONF</font>(<br>
- <font
+ <font
color="#000000">AXIS2_SVC_CTX_GET_CONF_CTX</font>(<br>
- <font
+ <font
color="#000000">AXIS2_MEP_CLIENT_GET_SVC_CTX</font>(<font
-color="#000000">mep_client</font>, &<font
-color="#000000">env</font>), <br>
- &<font
-color="#000000">env</font>), <br>
- &<font
-color="#000000">env</font>);<br>
-<br>
- <font
-color="#808080"><i>/* Get the echo service context if it is already loaded to service context*/</i></font><br>
- <font color="#000000">svc</font> = <font
+color="#000000">mep_client</font>, &<font
+color="#000000">env</font>), <br>
+ &<font color="#000000">env</font>), <br>
+ &<font color="#000000">env</font>);<br>
+<br>
+ <font
+color="#808080"><i>/* Get the echo service context if it is already loaded to service context*/</i></font><br>
+ <font color="#000000">svc</font> = <font
color="#000000">AXIS2_CONF_GET_SVC</font>(<font
-color="#000000">conf</font>, &<font
-color="#000000">env</font>, <font color="#FF0000">"echo"</font>);<br>
- <font color="#000000"><b>if</b></font> (<font
+color="#000000">conf</font>, &<font color="#000000">env</font>, <font
+color="#FF0000">"echo"</font>);<br>
+ <font color="#000000"><b>if</b></font> (<font
color="#000000">svc</font>)<br>
- {<br>
- <font
-color="#000000">op</font> = <font
+ {<br>
+ <font color="#000000">op</font> = <font
color="#000000">AXIS2_SVC_GET_OP_WITH_NAME</font>(<font
-color="#000000">svc</font>, &<font
-color="#000000">env</font>, <font
+color="#000000">svc</font>, &<font color="#000000">env</font>, <font
color="#FF0000">"echoString"</font>);<br>
- <font
-color="#000000"><b>if</b></font> (<font color="#000000">op</font>)<br>
- {<br>
- <font
+ <font color="#000000"><b>if</b></font> (<font
+color="#000000">op</font>)<br>
+ {<br>
+ <font
color="#000000">AXIS2_OP_SET_MSG_EXCHANGE_PATTERN</font>(<font
-color="#000000">op</font>, &<font
-color="#000000">env</font>, <font
+color="#000000">op</font>, &<font color="#000000">env</font>, <font
color="#000000">AXIS2_MEP_URI_OUT_IN</font>);<br>
- }<br>
- }<br>
- <font color="#000000"><b>else</b></font><br>
- {<br>
- <font
-color="#808080"><i>/* echo service is not in the configuration context. We need to create the <br>
- * operation and add it to service context. Then add service context into <br>
- * configuration context.<br>
- */</i></font><br>
- <font
-color="#000000">axis2_qname_t</font> *<font
-color="#000000">op_qname</font> = <font
-color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_qname_t</font> *<font
-color="#000000">svc_qname</font> = <font
+ }<br>
+ }<br>
+ <font color="#000000"><b>else</b></font><br>
+ {<br>
+ <font
+color="#808080"><i>/* echo service is not in the configuration context. We need to create the <br>
+ * operation and add it to service context. Then add service context into <br>
+ * configuration context.<br>
+ */</i></font><br>
+ <font color="#000000">axis2_qname_t</font> *<font
+color="#000000">op_qname</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_qname_t</font> *<font
+color="#000000">svc_qname</font> = <font
color="#000000">axis2_qname_create</font>(&<font
-color="#000000">env</font>, <font
-color="#FF0000">"echo"</font>, <font
-color="#000000">NULL</font>, <font color="#000000">NULL</font>);<br>
- <font
-color="#000000">svc</font> = <font
+color="#000000">env</font>, <font color="#FF0000">"echo"</font>, <font
+color="#000000">NULL</font>, <font color="#000000">NULL</font>);<br>
+ <font color="#000000">svc</font> = <font
color="#000000">axis2_svc_create_with_qname</font>(&<font
-color="#000000">env</font>, <font color="#000000">svc_qname</font>);<br>
- <font
-color="#000000">op_qname</font> = <font
+color="#000000">env</font>, <font color="#000000">svc_qname</font>);<br>
+ <font color="#000000">op_qname</font> = <font
color="#000000">axis2_qname_create</font>(&<font
-color="#000000">env</font>, <font
-color="#FF0000">"echoString"</font>, <font
-color="#000000">NULL</font>, <font color="#000000">NULL</font>);<br>
- <font
-color="#000000">op</font> = <font
+color="#000000">env</font>, <font color="#FF0000">"echoString"</font>, <font
+color="#000000">NULL</font>, <font color="#000000">NULL</font>);<br>
+ <font color="#000000">op</font> = <font
color="#000000">axis2_op_create_with_qname</font>(&<font
-color="#000000">env</font>, <font color="#000000">op_qname</font>);<br>
- <font
-color="#000000">AXIS2_OP_SET_MSG_EXCHANGE_PATTERN</font>(<font
-color="#000000">op</font>, &<font
-color="#000000">env</font>, <font
+color="#000000">env</font>, <font color="#000000">op_qname</font>);<br>
+ <font color="#000000">AXIS2_OP_SET_MSG_EXCHANGE_PATTERN</font>(<font
+color="#000000">op</font>, &<font color="#000000">env</font>, <font
color="#000000">AXIS2_MEP_URI_OUT_IN</font>);<br>
- <font
-color="#000000">AXIS2_SVC_ADD_OP</font>(<font
-color="#000000">svc</font>, &<font
-color="#000000">env</font>, <font color="#000000">op</font>);<br>
- <font
-color="#000000">AXIS2_CONF_ADD_SVC</font>(<font
-color="#000000">conf</font>, &<font
-color="#000000">env</font>, <font color="#000000">svc</font>);<br>
- }<br>
+ <font color="#000000">AXIS2_SVC_ADD_OP</font>(<font
+color="#000000">svc</font>, &<font color="#000000">env</font>, <font
+color="#000000">op</font>);<br>
+ <font color="#000000">AXIS2_CONF_ADD_SVC</font>(<font
+color="#000000">conf</font>, &<font color="#000000">env</font>, <font
+color="#000000">svc</font>);<br>
+ }<br>
<br>
- <font color="#000000"><b>if</b></font> (!<font
+ <font color="#000000"><b>if</b></font> (!<font
color="#000000">op</font>)<br>
- {<br>
- <font
-color="#000000">printf</font>(<font
-color="#FF0000">"ERROR: operation not present in service\n"</font>);<br>
- <font
-color="#000000"><b>return</b></font> -<font color="#0000FF">1</font>;<br>
- }<br>
-<br>
- <font
-color="#808080"><i>/* Invoke the operation. Client blocks until the response message comes. <br>
- * Response message gets set in the response message context.<br>
- */</i></font><br>
- <font
-color="#000000">response_ctx</font> = <font
+ {<br>
+ <font color="#000000">printf</font>(<font
+color="#FF0000">"ERROR: operation not present in service\n"</font>);<br>
+ <font color="#000000"><b>return</b></font> -<font
+color="#0000FF">1</font>;<br>
+ }<br>
+<br>
+ <font
+color="#808080"><i>/* Invoke the operation. Client blocks until the response message comes. <br>
+ * Response message gets set in the response message context.<br>
+ */</i></font><br>
+ <font color="#000000">response_ctx</font> = <font
color="#000000">AXIS2_CALL_INVOKE_BLOCKING</font>(<font
-color="#000000">call</font>, &<font
-color="#000000">env</font>, <font color="#000000">op</font>, <font
-color="#000000">msg_ctx</font>);<br>
+color="#000000">call</font>, &<font color="#000000">env</font>, <font
+color="#000000">op</font>, <font color="#000000">msg_ctx</font>);<br>
<br>
- <font color="#000000"><b>if</b></font> (<font
+ <font color="#000000"><b>if</b></font> (<font
color="#000000">response_ctx</font>)<br>
- {<br>
- <font
-color="#808080"><i>/* Get the response SOAP message from response message context */</i></font><br>
- <font
-color="#000000">axis2_soap_envelope_t</font> *<font
-color="#000000">soap_envelope</font> = <font
+ {<br>
+ <font
+color="#808080"><i>/* Get the response SOAP message from response message context */</i></font><br>
+ <font color="#000000">axis2_soap_envelope_t</font> *<font
+color="#000000">soap_envelope</font> = <font
color="#000000">AXIS2_MSG_CTX_GET_SOAP_ENVELOPE</font>(<font
-color="#000000">response_ctx</font>, &<font
+color="#000000">response_ctx</font>, &<font
color="#000000">env</font>);<br>
- <font
-color="#000000">ret_node</font> = <font
+ <font color="#000000">ret_node</font> = <font
color="#000000">AXIS2_SOAP_ENVELOPE_GET_BASE_NODE</font>(<font
-color="#000000">soap_envelope</font>, &<font
+color="#000000">soap_envelope</font>, &<font
color="#000000">env</font>);<br>
- }<br>
- <br>
- <font color="#000000"><b>if</b></font>(<font
+ }<br>
+ <br>
+ <font color="#000000"><b>if</b></font>(<font
color="#000000">ret_node</font>)<br>
- {<br>
- <font
-color="#808080"><i>/* Get the response value from the SOAP message */</i></font><br>
- <font
-color="#000000">axis2_xml_writer_t</font> *<font
-color="#000000">writer</font> = <font
-color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_om_output_t</font> *<font
-color="#000000">om_output</font> = <font
-color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_char_t</font> *<font
-color="#000000">buffer</font> = <font
-color="#000000">NULL</font>;<br>
- <br>
- <font
-color="#000000">printf</font>(<font
-color="#FF0000">"\necho stub invoke SUCCESSFUL!\n"</font>);<br>
- <font
-color="#000000">writer</font> = <font
+ {<br>
+ <font
+color="#808080"><i>/* Get the response value from the SOAP message */</i></font><br>
+ <font color="#000000">axis2_xml_writer_t</font> *<font
+color="#000000">writer</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_om_output_t</font> *<font
+color="#000000">om_output</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_char_t</font> *<font
+color="#000000">buffer</font> = <font color="#000000">NULL</font>;<br>
+ <br>
+ <font color="#000000">printf</font>(<font
+color="#FF0000">"\necho stub invoke SUCCESSFUL!\n"</font>);<br>
+ <font color="#000000">writer</font> = <font
color="#000000">axis2_xml_writer_create_for_memory</font>(&<font
-color="#000000">env</font>, <font
-color="#000000">NULL</font>, <font
-color="#000000">AXIS2_TRUE</font>, <font color="#0000FF">0</font>);<br>
- <font
-color="#000000">om_output</font> = <font
-color="#000000">axis2_om_output_create</font> (&<font
-color="#000000">env</font>, <font color="#000000">writer</font>);<br>
-<br>
- <font
-color="#000000">AXIS2_OM_NODE_SERIALIZE</font> (<font
-color="#000000">ret_node</font>, &<font
-color="#000000">env</font>, <font color="#000000">om_output</font>);<br>
- <font
-color="#000000">buffer</font> = <font
+color="#000000">env</font>, <font color="#000000">NULL</font>, <font
+color="#000000">AXIS2_TRUE</font>, <font color="#0000FF">0</font>);<br>
+ <font color="#000000">om_output</font> = <font
+color="#000000">axis2_om_output_create</font> (&<font
+color="#000000">env</font>, <font color="#000000">writer</font>);<br>
+<br>
+ <font color="#000000">AXIS2_OM_NODE_SERIALIZE</font> (<font
+color="#000000">ret_node</font>, &<font color="#000000">env</font>, <font
+color="#000000">om_output</font>);<br>
+ <font color="#000000">buffer</font> = <font
color="#000000">AXIS2_XML_WRITER_GET_XML</font>(<font
-color="#000000">writer</font>, &<font
-color="#000000">env</font>);<br>
- <font
-color="#000000">printf</font> (<font
-color="#FF0000">"\nReceived OM node in XML : %s\n"</font>, <font
+color="#000000">writer</font>, &<font color="#000000">env</font>);<br>
+ <font color="#000000">printf</font> (<font
+color="#FF0000">"\nReceived OM node in XML : %s\n"</font>, <font
color="#000000">buffer</font>);<br>
- }<br>
- <font color="#000000"><b>else</b></font><br>
- {<br>
- <font
-color="#000000">AXIS2_LOG_ERROR</font>(<font
-color="#000000">env</font>-><font color="#000000">log</font>, <font
-color="#000000">AXIS2_LOG_SI</font>, <font
-color="#FF0000">"Stub invoke failed: Error code:"</font><br>
- <font
-color="#FF0000">" %d :: %s"</font>, <font
+ }<br>
+ <font color="#000000"><b>else</b></font><br>
+ {<br>
+ <font color="#000000">AXIS2_LOG_ERROR</font>(<font
+color="#000000">env</font>-><font color="#000000">log</font>, <font
+color="#000000">AXIS2_LOG_SI</font>, <font
+color="#FF0000">"Stub invoke failed: Error code:"</font><br>
+ <font
+color="#FF0000">" %d :: %s"</font>, <font
color="#000000">env</font>-><font color="#000000">error</font>-><font
color="#000000">error_number</font>,<br>
- <font
+ <font
color="#000000">AXIS2_ERROR_GET_MESSAGE</font>(<font
color="#000000">env</font>-><font color="#000000">error</font>));<br>
- <font
-color="#000000">printf</font>(<font
-color="#FF0000">"echo stub invoke failed!\n"</font>);<br>
- }<br>
- <br>
- <font color="#000000"><b>if</b></font> (<font
+ <font color="#000000">printf</font>(<font
+color="#FF0000">"echo stub invoke failed!\n"</font>);<br>
+ }<br>
+ <br>
+ <font color="#000000"><b>if</b></font> (<font
color="#000000">call</font>)<br>
- {<br>
- <font
-color="#000000">AXIS2_CALL_FREE</font>(<font
-color="#000000">call</font>, &<font color="#000000">env</font>);<br>
- }<br>
- <font color="#000000"><b>return</b></font> <font
+ {<br>
+ <font color="#000000">AXIS2_CALL_FREE</font>(<font
+color="#000000">call</font>, &<font color="#000000">env</font>);<br>
+ }<br>
+ <font color="#000000"><b>return</b></font> <font
color="#000000">status</font>;<br>
}<br>
<br>
<font
-color="#808080"><i>/* build SOAP request message content using OM */</i></font><br>
-<font color="#000000">axis2_om_node_t</font> *<br>
+color="#808080"><i>/* build SOAP request message content using OM */</i></font><br>
+<font color="#000000">axis2_om_node_t</font> *<br>
<font color="#000000">build_om_programatically</font>(<font
-color="#000000">axis2_env_t</font> **<font
-color="#000000">env</font>)<br>
+color="#000000">axis2_env_t</font> **<font color="#000000">env</font>)<br>
{<br>
- <font
-color="#000000">axis2_om_node_t</font> *<font
-color="#000000">echo_om_node</font> = <font
-color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_om_element_t</font>* <font
-color="#000000">echo_om_ele</font> = <font
-color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_om_node_t</font>* <font
-color="#000000">text_om_node</font> = <font
-color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_om_element_t</font> * <font
-color="#000000">text_om_ele</font> = <font
-color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_om_namespace_t</font> *<font
-color="#000000">ns1</font> = <font color="#000000">NULL</font>;<br>
- <br>
-<br>
- <font
-color="#000000">axis2_xml_writer_t</font> *<font
-color="#000000">xml_writer</font> = <font
-color="#000000">NULL</font>;<br>
- <font
-color="#000000">axis2_om_output_t</font> *<font
-color="#000000">om_output</font> = <font
-color="#000000">NULL</font>;<br>
- <font color="#000000">axis2_char_t</font> *<font
-color="#000000">buffer</font> = <font
-color="#000000">NULL</font>;<br>
-<br>
- <font color="#000000">ns1</font> = <font
-color="#000000">axis2_om_namespace_create</font> (<font
-color="#000000">env</font>, <font
-color="#FF0000">"http://localhost:9090/axis2/services/echo"</font>, <font
+ <font color="#000000">axis2_om_node_t</font> *<font
+color="#000000">echo_om_node</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_om_element_t</font>* <font
+color="#000000">echo_om_ele</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_om_node_t</font>* <font
+color="#000000">text_om_node</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_om_element_t</font> * <font
+color="#000000">text_om_ele</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_om_namespace_t</font> *<font
+color="#000000">ns1</font> = <font color="#000000">NULL</font>;<br>
+ <br>
+<br>
+ <font color="#000000">axis2_xml_writer_t</font> *<font
+color="#000000">xml_writer</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_om_output_t</font> *<font
+color="#000000">om_output</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axis2_char_t</font> *<font
+color="#000000">buffer</font> = <font color="#000000">NULL</font>;<br>
+<br>
+ <font color="#000000">ns1</font> = <font
+color="#000000">axis2_om_namespace_create</font> (<font
+color="#000000">env</font>, <font
+color="#FF0000">"http://localhost:9090/axis2/services/echo"</font>, <font
color="#FF0000">"ns1"</font>);<br>
<br>
- <font
-color="#000000">echo_om_ele</font> = <font
+ <font color="#000000">echo_om_ele</font> = <font
color="#000000">axis2_om_element_create</font>(<font
-color="#000000">env</font>, <font
-color="#000000">NULL</font>, <font
-color="#FF0000">"echoString"</font>, <font
-color="#000000">ns1</font>, &<font
+color="#000000">env</font>, <font color="#000000">NULL</font>, <font
+color="#FF0000">"echoString"</font>, <font
+color="#000000">ns1</font>, &<font
color="#000000">echo_om_node</font>);<br>
- <br>
- <font
-color="#000000">text_om_ele</font> = <font
+ <br>
+ <font color="#000000">text_om_ele</font> = <font
color="#000000">axis2_om_element_create</font>(<font
-color="#000000">env</font>, <font
-color="#000000">echo_om_node</font>, <font
-color="#FF0000">"text"</font>, <font
-color="#000000">NULL</font>, &<font
+color="#000000">env</font>, <font color="#000000">echo_om_node</font>, <font
+color="#FF0000">"text"</font>, <font color="#000000">NULL</font>, &<font
color="#000000">text_om_node</font>);<br>
<br>
- <font
-color="#000000">AXIS2_OM_ELEMENT_SET_TEXT</font>(<font
-color="#000000">text_om_ele</font>, <font
-color="#000000">env</font>, <font
-color="#FF0000">"echo5"</font>, <font
+ <font color="#000000">AXIS2_OM_ELEMENT_SET_TEXT</font>(<font
+color="#000000">text_om_ele</font>, <font color="#000000">env</font>, <font
+color="#FF0000">"echo5"</font>, <font
color="#000000">text_om_node</font>);<br>
- <br>
- <br>
- <font
-color="#000000">xml_writer</font> = <font
+ <br>
+ <br>
+ <font color="#000000">xml_writer</font> = <font
color="#000000">axis2_xml_writer_create_for_memory</font>(<font
-color="#000000">env</font>, <font
-color="#000000">NULL</font>, <font
-color="#000000">AXIS2_FALSE</font>, <font
+color="#000000">env</font>, <font color="#000000">NULL</font>, <font
+color="#000000">AXIS2_FALSE</font>, <font
color="#000000">AXIS2_FALSE</font>);<br>
- <font
-color="#000000">om_output</font> = <font
-color="#000000">axis2_om_output_create</font>( <font
-color="#000000">env</font>, <font color="#000000">xml_writer</font>);<br>
- <br>
- <font
-color="#000000">AXIS2_OM_NODE_SERIALIZE</font>(<font
-color="#000000">echo_om_node</font>, <font
-color="#000000">env</font>, <font color="#000000">om_output</font>);<br>
- <font color="#000000">buffer</font> = <font
+ <font color="#000000">om_output</font> = <font
+color="#000000">axis2_om_output_create</font>( <font
+color="#000000">env</font>, <font color="#000000">xml_writer</font>);<br>
+ <br>
+ <font color="#000000">AXIS2_OM_NODE_SERIALIZE</font>(<font
+color="#000000">echo_om_node</font>, <font color="#000000">env</font>, <font
+color="#000000">om_output</font>);<br>
+ <font color="#000000">buffer</font> = <font
color="#000000">AXIS2_XML_WRITER_GET_XML</font>(<font
-color="#000000">xml_writer</font>, <font
-color="#000000">env</font>); <br>
- <font color="#000000">printf</font>(<font
-color="#FF0000">"\nSending OM node in XML : %s \n"</font>, <font
-color="#000000">buffer</font>); <br>
+color="#000000">xml_writer</font>, <font
+color="#000000">env</font>); <br>
+ <font color="#000000">printf</font>(<font
+color="#FF0000">"\nSending OM node in XML : %s \n"</font>, <font
+color="#000000">buffer</font>); <br>
<br>
- <font color="#000000"><b>return</b></font> <font
+ <font color="#000000"><b>return</b></font> <font
color="#000000">echo_om_node</font>;<br>
}<br>
</p>
@@ -730,7 +616,7 @@
<br>
-<p>Echo NonBlocking Client</p>
+<h4>Echo NonBlocking Client</h4>
<p>In the Echo Blocking Client exmple above, once the
"axis2_echo_stub_echo(stub, &env, node);" is called, the client is
@@ -757,24 +643,56 @@
<p>You need to primarily replace the following portion of code in the Echo
Blocking Client</p>
-<pre> stub = <font color="#000000">axis2_stub_create_with_endpoint_uri_and_client_home</font>(&<font color="#000000">env</font>, <font color="#000000">address</font>,<br>
- <font color="#000000">client_home</font>);<br>
- <font color="#000000">AXIS2_STUB_SET_TRANSPORT_INFO</font>(<font color="#000000">stub</font>, &<font color="#000000">env</font>, <font color="#000000">AXIS2_TRANSPORT_HTTP</font>, <br>
- <font color="#000000">AXIS2_TRANSPORT_HTTP</font>, <font color="#000000">AXIS2_FALSE</font>);<br>
- <font color="#000000">AXIS2_STUB_SET_SOAP_VERSION</font>(<font color="#000000">stub</font>, &<font color="#000000">env</font>, <font color="#000000">AXIS2_SOAP_11</font>);<br>
- <font color="#808080"><i>/* create node and invoke echo */</i></font><br>
- <font color="#000000">ret_node</font> = <font color="#000000">axis2_echo_stub_echo</font>(<font color="#000000">stub</font>, &<font color="#000000">env</font>, <font color="#000000">node</font>);<br>
- </pre>
+
+<p> stub = <font
+color="#000000">axis2_stub_create_with_endpoint_uri_and_client_home</font>(&<font
+color="#000000">env</font>, <font color="#000000">address</font>,<br>
+ <font color="#000000">client_home</font>);<br>
+ <font color="#000000">AXIS2_STUB_SET_TRANSPORT_INFO</font>(<font
+color="#000000">stub</font>, &<font color="#000000">env</font>, <font
+color="#000000">AXIS2_TRANSPORT_HTTP</font>, <br>
+ <font color="#000000">AXIS2_TRANSPORT_HTTP</font>, <font
+color="#000000">AXIS2_FALSE</font>);<br>
+ <font color="#000000">AXIS2_STUB_SET_SOAP_VERSION</font>(<font
+color="#000000">stub</font>, &<font color="#000000">env</font>, <font
+color="#000000">AXIS2_SOAP_11</font>);<br>
+ <font color="#808080"><i>/* create node and invoke echo */</i></font><br>
+ <font color="#000000">ret_node</font> = <font
+color="#000000">axis2_echo_stub_echo</font>(<font
+color="#000000">stub</font>, &<font color="#000000">env</font>, <font
+color="#000000">node</font>);</p>
+
+<p></p>
<p>to the following (note that you need to create an instance of
axis2_callback_t.</p>
-<p> </p>
-<pre> <font color="#000000">callback = axis2_callback_create</font>(&<font color="#000000">env</font>);<br>
-<font color="#000000"> AXIS2_CALL_INVOKE_NON_BLOCKING</font>(<font color="#000000">call</font>, &<font color="#000000">env</font>, <font color="#000000">op</font>, <font color="#000000">msg_ctx</font>, <font color="#000000">callback</font>);<br>
- <font color="#000000"><b>while</b></font> (!<font color="#000000">AXIS2_CALLBACK_GET_COMPLETE</font>(<font color="#000000">callback</font>, &<font color="#000000">env</font>))<br> {<br> <font color="#000000">printf</font>(<font color="#FF0000">"sleep(2) till callback complete\n"</font>);<br> <font color="#000000"><b>if</b></font> (<font color="#000000">count</font>++ > <font color="#0000FF">10</font>)<br> <font color="#000000"><b>break</b></font>;<br>
- <font color="#000000">AXIS2_SLEEP</font>(<font color="#0000FF">2</font>); <br> }<br>
- <font color="#000000">soap_envelope</font> = <font color="#000000">AXIS2_CALLBACK_GET_ENVELOPE</font>(<font color="#000000">callback</font>, &<font color="#000000">env</font>);<br></pre>
+<p></p>
+
+<p></p>
+
+<p> <font color="#000000">callback
+ = axis2_callback_create</font>(&<font color="#000000">env</font>);<br>
+<font color="#000000"> AXIS2_CALL_INVOKE_NON_BLOCKING</font>(<font
+color="#000000">call</font>, &<font color="#000000">env</font>, <font
+color="#000000">op</font>, <font color="#000000">msg_ctx</font>, <font
+color="#000000">callback</font>);<br>
+ <font color="#000000"><b>while</b></font> (!<font
+color="#000000">AXIS2_CALLBACK_GET_COMPLETE</font>(<font
+color="#000000">callback</font>, &<font color="#000000">env</font>))<br>
+ {<br>
+ <font color="#000000">printf</font>(<font
+color="#FF0000">"sleep(2) till callback complete\n"</font>);<br>
+ <font color="#000000"><b>if</b></font> (<font
+color="#000000">count</font>++ > <font color="#0000FF">10</font>)<br>
+ <font color="#000000"><b>break</b></font>;<br>
+ <font color="#000000">AXIS2_SLEEP</font>(<font
+color="#0000FF">2</font>); <br>
+ }<br>
+ <font color="#000000">soap_envelope</font> = <font
+color="#000000">AXIS2_CALLBACK_GET_ENVELOPE</font>(<font
+color="#000000">callback</font>, &<font color="#000000">env</font>);<br>
+</p>
<p></p>