Author: damitha
Date: Thu Feb 7 01:21:10 2008
New Revision: 619315
URL: http://svn.apache.org/viewvc?rev=619315&view=rev
Log:
updating documentation
Modified:
webservices/sandesha/trunk/c/INSTALL
webservices/sandesha/trunk/c/config/axis2.xml
webservices/sandesha/trunk/c/samples/rm_report/report.c
webservices/sandesha/trunk/c/src/client/client.c
webservices/sandesha/trunk/c/xdocs/docs/installationguide.html
webservices/sandesha/trunk/c/xdocs/docs/sandesha2c_manual.html
Modified: webservices/sandesha/trunk/c/INSTALL
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/INSTALL?rev=619315&r1=619314&r2=619315&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/INSTALL (original)
+++ webservices/sandesha/trunk/c/INSTALL Thu Feb 7 01:21:10 2008
@@ -39,7 +39,6 @@
+ - services (Contain sample service)
|
+ - include ( header files)
- + - bin (database scripts)
+ - bin/samples ( sample executables)
+ - lib (some libs to run Sandesha2/C clients)
Modified: webservices/sandesha/trunk/c/config/axis2.xml
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/config/axis2.xml?rev=619315&r1=619314&r2=619315&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/config/axis2.xml (original)
+++ webservices/sandesha/trunk/c/config/axis2.xml Thu Feb 7 01:21:10 2008
@@ -25,7 +25,7 @@
<!-- Transport Ins -->
<!-- ================================================= -->
<transportReceiver name="http" class="axis2_http_receiver">
- <parameter name="port" locked="false">6061</parameter>
+ <parameter name="port" locked="false">6060</parameter>
</transportReceiver>
<!-- ================================================= -->
Modified: webservices/sandesha/trunk/c/samples/rm_report/report.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_report/report.c?rev=619315&r1=619314&r2=619315&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_report/report.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_report/report.c Thu Feb 7 01:21:10
2008
@@ -34,23 +34,6 @@
#define SANDESHA2_MAX_COUNT 4
-/* on_complete callback function */
-axis2_status_t AXIS2_CALL
-rm_report_callback_on_complete(
- struct axis2_callback *callback,
- const axutil_env_t *env);
-
-/* on_error callback function */
-axis2_status_t AXIS2_CALL
-rm_report_callback_on_error(
- struct axis2_callback *callback,
- const axutil_env_t *env,
- int exception);
-
-void wait_on_callback(
- const axutil_env_t *env,
- axis2_callback_t *callback);
-
static void
usage(
axis2_char_t *prog_name);
@@ -76,15 +59,10 @@
int c;
/* Set up the environment */
- /*env = axutil_env_create_all("report_non_blocking_dual.log",
- AXIS2_LOG_LEVEL_DEBUG);*/
- /*env = axutil_env_create_all("report_non_blocking_dual.log",
- AXIS2_LOG_LEVEL_ERROR);*/
env = axutil_env_create_all("rm_report.log",
AXIS2_LOG_LEVEL_DEBUG);
/* Set end point reference of report service */
- /*address = "http://127.0.0.1:9090/axis2/services/RMSampleService";*/
address = "http://127.0.0.1:9090/axis2/services/RMSampleService";
while ((c = AXIS2_GETOPT(argc, argv, ":a:")) != -1)
{
@@ -143,12 +121,11 @@
if (!svc_client)
{
printf("Error creating service client\n");
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error
code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:%d::%s", env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
return -1;
}
-
/* Set service client options */
axis2_svc_client_set_options(svc_client, env, options);
@@ -277,87 +254,11 @@
AXIS2_FREE(env->allocator, seq_key);
if (svc_client)
{
- /*axis2_svc_client_free(svc_client, env);*/
+ axis2_svc_client_free(svc_client, env);
svc_client = NULL;
}
return 0;
-}
-
-axis2_status_t AXIS2_CALL
-rm_report_callback_on_complete(
- struct axis2_callback *callback,
- const axutil_env_t *env)
-{
- /** SOAP response has arrived here; get the soap envelope
- from the callback object and do whatever you want to do with it */
-
- axiom_soap_envelope_t *soap_envelope = NULL;
- axiom_node_t *ret_node = NULL;
- axis2_status_t status = AXIS2_SUCCESS;
-
- soap_envelope = axis2_callback_get_envelope(callback, env);
-
- if (!soap_envelope)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error
code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- printf("report stub invoke FAILED!\n");
- status = AXIS2_FAILURE;
- }
- else
- {
- ret_node = axiom_soap_envelope_get_base_node(soap_envelope, env);
-
- if(!ret_node)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "Stub invoke FAILED: Error code:%d :: %s",
- env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- printf("report stub invoke FAILED!\n");
- status = AXIS2_FAILURE;
- }
- else
- {
- axis2_char_t *om_str = NULL;
- om_str = axiom_node_to_string(ret_node, env);
- if (om_str)
- printf("\nReceived OM : %s\n", om_str);
- printf("\nreport client invoke SUCCESSFUL!\n");
- }
- }
- return status;
-}
-
-axis2_status_t AXIS2_CALL
-rm_report_callback_on_error(
- struct axis2_callback *callback,
- const axutil_env_t *env,
- int exception)
-{
- /** take necessary action on error */
- printf("\nEcho client invoke FAILED. Error code:%d ::%s", exception,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- return AXIS2_SUCCESS;
-}
-
-void wait_on_callback(
- const axutil_env_t *env,
- axis2_callback_t *callback)
-{
- /** Wait till callback is complete. Simply keep the parent thread running
- until our on_complete or on_error is invoked */
- while(1)
- {
- if (axis2_callback_get_complete(callback, env))
- {
- /* We are done with the callback */
- break;
- }
- }
- return;
}
static void
Modified: webservices/sandesha/trunk/c/src/client/client.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/client/client.c?rev=619315&r1=619314&r2=619315&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/client/client.c (original)
+++ webservices/sandesha/trunk/c/src/client/client.c Thu Feb 7 01:21:10 2008
@@ -1616,10 +1616,6 @@
sandesha2_seq_property_mgr_free(seq_prop_mgr, env);
if(next_msg_mgr)
sandesha2_next_msg_mgr_free(next_msg_mgr, env);
- if(seq_prop_mgr)
- sandesha2_seq_property_mgr_free(seq_prop_mgr, env);
- if(next_msg_mgr)
- sandesha2_next_msg_mgr_free(next_msg_mgr, env);
if(storage_mgr)
sandesha2_storage_mgr_free(storage_mgr, env);
return seq_report;
Modified: webservices/sandesha/trunk/c/xdocs/docs/installationguide.html
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/xdocs/docs/installationguide.html?rev=619315&r1=619314&r2=619315&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/xdocs/docs/installationguide.html (original)
+++ webservices/sandesha/trunk/c/xdocs/docs/installationguide.html Thu Feb 7
01:21:10 2008
@@ -44,33 +44,43 @@
<h2>1. Installing and Running on Linux</h2>
<p>This can be done using binary or source distributions. (<a
-href="http://ws.apache.org/sandesha/sandesha2/c/download.cgi">Download</a> the
two
-distributions)</p>
-
+href="http://ws.apache.org/sandesha/sandesha2/c/download.cgi">Download</a>
+the two distributions)</p>
<a id="linux_source"></a>
<h3>1.1. Installing Sandesha2/C Source Release on Linux</h3>
-<p>This version of Sandesha2/C depends on Axis2/C 1.1.0 <a
href="http://ws.apache.org/axis2/c/download.cgi">Download Axis2/C</a> from and
-install. </p>
+<p>This version of Sandesha2/C depends on Axis2/C 1.3.0 <a
+href="http://ws.apache.org/axis2/c/download.cgi">Download Axis2/C</a> from
+and install.</p>
<ol>
- <li> Download Sandesha2 source distribution</li>
- <li> Extract the source distribution and go to extracted directory</li>
- <li> Run configure with AXIS2 include path.
- <pre>./configure --prefix=<axis2c_deploy_path>
--enable-static=no --with-axis2=<axis2c_deploy_path></pre>
- </li>
- <li>Run make and make install</li>
+ <li>Download Sandesha2 source distribution</li>
+ <li>Extract the source distribution and go to extracted directory</li>
+ <li>Run configure with AXIS2 include path.
+ <pre>./configure --prefix=<axis2c_deploy_path> --enable-static=no
--with-axis2=<axis2c_deploy_path></pre>
+ </li>
+ <li>Run make and make install</li>
</ol>
-
-This will install the Sandesha2/C as a module in Axis2/C in
<axis2c_deploy_path>/modules folder. The module
-folder contains the Sandesha2/C libraries and the module.xml file.
+This will install the Sandesha2/C as a module in Axis2/C in
+<axis2c_deploy_path>/modules folder. The module folder contains the
+Sandesha2/C libraries and the module.xml file. <a id="linux_binary">It will
+also install the libsandesha2_client.so into <axis2c_deploy_path>lib
+folder. Sandesha2 include files are copied into
+<axis2c_deploy_path>include folder.</a>
+
+<p>To install the samples go into samples folder and do</p>
+<p> ./configure --prefix=<axis2c_deploy_path>
+--with-axis2=<axis2c_include_path></p>
-<a id="linux_binary"></a>
+<p>make</p>
+
+<p>make install</p>
<h3>1.2. Installing Sandesha2/C Binary Release on Linux</h3>
-<p>Sandesha2/C binary distribution for Linux has the following folder
structure. </p>
+<p>Sandesha2/C binary distribution for Linux has the following folder
+structure.</p>
<pre>
Sandesha2
|
@@ -84,50 +94,47 @@
+ - services (Contain sample service)
|
+ - include ( header files)
- + - bin (database scripts)
+ - bin/samples ( sample executables)
-</pre>
-<p>
- To deploy Sandesha2/C in Axis2/C running environment copy the
modules/sandesha2 into <axis2c_deploy_path>/modules folder.
- Do the necessary changes to the <axis2c_deploy_path>/axis2.xml to
run Sandesha2/C(Refer to the sample config/axis2.xml
- for help).
-</p>
+ + - lib (libsandesha2_client.so)</pre>
+
+<p>To deploy Sandesha2/C in Axis2/C running environment copy the
+modules/sandesha2 into <axis2c_deploy_path>/modules folder. Also copy
+the libsandesha2_client.so into <axis2c_deploy_path>/lib folder. Do the
+necessary changes to the <axis2c_deploy_path>/axis2.xml to run
+Sandesha2/C(Refer to the sample config/axis2.xml for help). To run samples
+copy the server sample services/RMSampleService into
+<axis2c_deploy_path>/services folder and start the server. Then you can
+run the client samples in bin/samples/sandesha2. To see the messages passing
+through the wire use a Tcp Monitor.</p>
<a id="win"></a>
<h2>2. Installing and Running on Microsoft Windows</h2>
<p>This too can be done using binary or source distributions. (<a
-href="http://ws.apache.org/sandesha/sandesha2/c/download.cgi">Download</a> the
two
-distributions.)</p>
-
+href="http://ws.apache.org/sandesha/sandesha2/c/download.cgi">Download</a>
+the two distributions.)</p>
<a id="win_source"></a>
<h3>2.1. Installing Sandesha2/C Source Release on Windows</h3>
<ol>
- <li> You need to have unziped Axis2/C 1.1.0 release binary to some
folder.</li>
- <li> Sandesha2/C can be used with one of following two database systems.
- <ul>
- <li>sqlite</li>
- <li>MySQL</li>
- </ul>
- So install one of above database systems on your machine.
- </li>
- <li> On your cmd.exe cd to <sandesha2 src>\build\win32 <br/>
- Edit configure.in file with your binary locations. <br/>
- To select MySQL have your configure.in entry WITH_MYSQL = 1. <br/>
- To Select Sqlite have your configure.in entry WITH_SQLITE = 1.
- </li>
- <li> To set necessary environment variables on command line run
vcvars32.bat file. </li>
- <li> Run nmake dist command on command line. This will build the
Sandesha2/C binary and samples to a directory sandesha2 in <sandesha2
src>\build\sandesha2. </li>
+ <li>You need to have unzipped Axis2/C 1.3.0 release binary to some
+ folder.</li>
+ <li>On your cmd.exe cd to <sandesha2 src>\build\win32 <br />
+ Edit configure.in file with your binary locations. <br />
+ </li>
+ <li>To set necessary environment variables on command line run vcvars32.bat
+ file.</li>
+ <li>Run nmake dist command on command line. This will build the Sandesha2/C
+ binary and samples to a directory sandesha2 in <sandesha2
+ src>\build\sandesha2.</li>
</ol>
-
<a id="bin_binaries"></a>
<h3>2. 2. Installing Sandesha2/C Binary Release on Windows</h3>
-<p>Sandesha2/C binary distribution will have following directory structure.
</p>
-<pre>
- Sandesha2
+<p>Sandesha2/C binary distribution will have following directory
+structure.</p>
+<pre> Sandesha2
|
+ - Sandesha2 (sandesha2 module dll and module.xml file)
|
@@ -138,58 +145,38 @@
+ - source files of samples in folders
|
+ - include ( header files)
-
+ + - lib (sandesha2_client.dll)
</pre>
- <ol>
- <li> Copy Sandesha2 directory ( containing sandesha2 dll and module.xml )
to <AXIS2C_HOME>\modules directory.</li>
- <li> Copy RMSampleService directory in samples\bin directory to
<AXIS2C_HOME>\services directory </li>
- <li> Copy axis2.xml file in Sandesha2 directory to <AXIS2C_HOME>
</li>
- </ol>
- <p>
- Now you should be able to run the samples.
- </p>
+<ol>
+ <li>Copy Sandesha2 directory ( containing sandesha2 dll and module.xml ) to
+ <AXIS2C_HOME>\modules directory.</li>
+ <li>Copy RMSampleService directory in samples\bin directory to
+ <AXIS2C_HOME>\services directory</li>
+ <li>Copy axis2.xml file in Sandesha2 directory to <AXIS2C_HOME></li>
+</ol>
+
+<p>Now you should be able to run the samples.</p>
<h3>Notes</h3>
<ol>
-<li>
- Sandesha2/C has two main storage mechanisms call in-memory and
persistent. The persistent storage could use
- either sqlite or MySQL as it's database manager. <br/>
- By default sandesha2 use the persistent storage with sqlite as the
database. <br/>
- It is assumed that sqlite3.h in /usr/include include directory. If you
have different include path for
- sqlite3.h then add the configure option --with-sqlite=<sqlite
include file path> to the configure options
- above. If is assumed that libsqlite3.so is in the /usr/lib folder <br/>
- To run samples in persistent/sqlite mode copy
sandesha2c/config/sqlite_schema.sh/.bat to a directory where you
- will create your sqlite database file and execute it to create the
database schema. sqlite3 is an embedded
- database which need no configuration. If you use Axis2/C Apache2
module instead of simple_axis2_server make
- sure that Apache2 user can access the sqlite database files
sandesha2_svr_db and sandesha2_client_db. <br/>
-
- if you want to use the in-memory storage instead, change the entry in
the sandesha2_constants.h
- file. <br/>
-<pre>#define SANDESHA2_DEFAULT_STORAGE_MGR "persistent"
-as
-#define SANDESHA2_DEFAULT_STORAGE_MGR "inmemory". </pre>
-
- <p>Or you can change the following entry in the module.xml file.</p>
- <p>
- <p><parameter name="StorageManager"
locked="false">inmemory<parameter></p>
- <p><parameter name="StorageManager"
locked="false">persistent<parameter></p>
- </p>
-
- <p>
- If you want to use persistent storage with MySQL then add the option
--with-mysql=<MySQL include file path>
- to the configure options above. It is assumed that libmysqlclient.so
is in /usr/lib folder. It is recommended
- to use MySQL database for any serious use. It is not included as as
the default database because of licensing issues.
- To run samples in persistent/mysql mode run
sandesha2c/config/mysql_schema.sh and sandesha2c/config/init_mysql.sh
- to create the database schema. The database parameters for MySQL
should be included in module.xml. The defaults for server, user and password
are localhost, g,g.
- </p>
-</li>
-<li>
- Sandesha2/C module is installed into
<axis2c_deploy_path>/modules/sandesha2c directory. The installed module
contain
- libsandesha2.so, module.xml. The sample clients are installed into
<axis2c_deploy_path>/bin/samples
- directory. Sample services are installed into
<axis2c_deploy_path>/services directory.
-
-</li>
+ <li>Sandesha2 internally uses an Sqlite3 embedded database. You need to
+ provide where to create this database in
+ <p>module.xml file as following.</p>
+ <p><parameter name="sandesha2_db"
+ locked="false"><path>/sandesha2_db</parameter></p>
+ <p>If you use Axis2/C Apache2 module instead of simple_axis2_server make
+ sure that Apache2 user can access the above database file.</p>
+ <p>If you do not provide the above database parameter, be aware that
+ Sandesha2/C will create the database file named sandesha2_db in the
+ current folder.</p>
+ <p></p>
+ </li>
+ <li>Sandesha2/C module is installed into
+ <axis2c_deploy_path>/modules/sandesha2c directory. The installed
+ module contain libsandesha2.so, module.xml. The sample clients are
+ installed into <axis2c_deploy_path>/bin/samples directory. Sample
+ services are installed into <axis2c_deploy_path>/services
+ directory.</li>
</ol>
-
</body>
</html>
Modified: webservices/sandesha/trunk/c/xdocs/docs/sandesha2c_manual.html
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/xdocs/docs/sandesha2c_manual.html?rev=619315&r1=619314&r2=619315&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/xdocs/docs/sandesha2c_manual.html (original)
+++ webservices/sandesha/trunk/c/xdocs/docs/sandesha2c_manual.html Thu Feb 7
01:21:10 2008
@@ -9,114 +9,51 @@
<body>
<h1>Engaging Sandesha2/C Module</h1>
-<p>
- Install sandesha2 module into <axis2 deploy folder>/modules folder.
Add the RMPhase
- information into axis2.xml as following. Search for 'RMPhase' in the
- following xml block to identify the RM specific entries.
-</p>
-<pre>
- <!-- ================================================= -->
+
+<p>Install sandesha2 module into <axis2 deploy folder>/modules folder.
+Add the RMPhase information into axis2.xml as following. Search for 'RMPhase'
+in the following xml block to identify the RM specific entries.</p>
+<pre> <!-- ================================================= -->
<!-- Phases -->
<!-- ================================================= -->
<phaseOrder type="inflow">
- <!-- System pre defined phases -->
- <phase name="TransportIn"/>
+ <!-- System pre defined phases -->
+ <phase name="Transport"/>
<phase name="PreDispatch"/>
- <phase name="Dispatch">
- <handler name="AddressingBasedDispatcher"
- class="axis2_engine">
- <order phase="Dispatch"/>
- </handler>
- <handler name="RequestURIBasedDispatcher"
- class="axis2_engine">
- <order phase="Dispatch"/>
- </handler>
- <handler name="SOAPActionBasedDispatcher"
- class="axis2_engine">
- <order phase="Dispatch"/>
- </handler>
- <handler name="SOAPMessageBodyBasedDispatcher"
- class="axis2_engine">
- <order phase="Dispatch"/>
- </handler>
- </phase>
- <phase name="PostDispatch">
- <handler name="DispatchPostConditionsEvaluator"
- class="axis2_engine">
- <order phase="PostDispatch"/>
- </handler>
- <handler name="InstanceDispatcher"
- class="axis2_engine">
- <order phase="PostDispatch"/>
- </handler>
- <handler name="SOAPProcessingModelChecker"
- class="axis2_engine">
- <order phase="PostDispatch"/>
- </handler>
- </phase>
- <!-- System pre defined phases -->
- <!-- After Postdispatch phase module author or or service author
can add any phase he want -->
+ <phase name="Dispatch"/>
+ <phase name="PostDispatch"/>
+ <!-- End system pre defined phases -->
+ <!-- After PostDispatch phase, module or service author can add any
phase as required -->
+ <!-- User defined phases could be added here -->
<!--phase name="userphase1"/-->
<phase name="RMPhase"/>
</phaseOrder>
<phaseOrder type="outflow">
- <!-- user can add his own phases to this area -->
- <phase name="RMPhase"/>
+ <!-- User defined phases could be added here -->
+ <phase name="RMPhase"/>
+ <!--phase name="RMPhase"/-->
<!--phase name="userphase1"/-->
<!--system predefined phase-->
- <!--these phase will run irrespective of the service-->
- <!--phase name="PolicyDetermination"/-->
- <!--phase name="MessageOut"/-->
+ <phase name="MessageOut"/>
</phaseOrder>
<phaseOrder type="INfaultflow">
- <!-- user can add his own phases to this area -->
+ <!-- User defined phases could be added here -->
<!--phase name="userphase1"/-->
- <phase name="RMPhase"/>
+ <phase name="RMPhase"/>
</phaseOrder>
<phaseOrder type="Outfaultflow">
- <!-- user can add his own phases to this area -->
+ <!-- User defined phases could be added here -->
<phase name="RMPhase"/>
- <phase name="MessageOut"/>
<!--phase name="userphase1"/-->
- <!--phase name="PolicyDetermination"/-->
+ <phase name="MessageOut"/>
</phaseOrder>
+
</pre>
-<p>
-In the services xml file for the service which require RM enabled
-add the entry
- <module ref="sandesha2"/>
-If you need all services in the engine RM enabled add the above entry into
-axis2.xml.
-</p>
-<p>
-You can use samples in the samples folder for testing.
-</p>
-<h2>Known Issues</h2>
+<p>In the services xml file for the service which require RM enabled add the
+entry <module ref="sandesha2"/> If you need all services in the engine
+RM enabled add the above entry into axis2.xml.</p>
-Please keep in mind the following when using Sandesha2/C with Axis2/C.
-<ol>
-<li>Comment the line no:295 in
src/core/transport/http/receiver/http_svr_thread.c
- <pre>axutil_free_thread_env(thread_env);</pre>
-</li>
-
-<li>Comment the line no:299 in
src/core/transport/http/receiver/http_svr_thread.c
- <pre>axutil_thread_pool_exit_thread(env->thread_pool, thd);</pre>
-</li>
-<li>Comment the following block starting form line no:259
src/core/transport/http/sender/http_sender.c
-<pre>
- property = axutil_property_create(env);
- axutil_property_set_scope(property, env, AXIS2_SCOPE_REQUEST);
- axutil_property_set_free_func(property, env,
axis2_http_client_free_void_arg);
- axutil_property_set_value(property, env, sender->client);
- axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_HTTP_CLIENT, property);
-</pre>
-</li>
-<li>If for some reason RM sequences seems not executing properly the reason
could
- be the database is corrupted for some reason. Try rerunning the the
database
- scripts to clean the database.
-</li>
-</ol>
-Some of the above changes may lead to memory leaks in Axis2/C.
+<p>You can use samples in the samples folder for testing.</p>
</body>
</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]