Author: nabeel
Date: Wed Jun 14 23:55:21 2006
New Revision: 414490

URL: http://svn.apache.org/viewvc?rev=414490&view=rev
Log:
Updated user guide and dev guide to refelect the changes to the code done from 
.91 to .92


Modified:
    webservices/axis2/trunk/c/xdocs/docs/developerguide.html
    webservices/axis2/trunk/c/xdocs/docs/userguide.html

Modified: webservices/axis2/trunk/c/xdocs/docs/developerguide.html
URL: 
http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xdocs/docs/developerguide.html?rev=414490&r1=414489&r2=414490&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xdocs/docs/developerguide.html (original)
+++ webservices/axis2/trunk/c/xdocs/docs/developerguide.html Wed Jun 14 
23:55:21 2006
@@ -57,8 +57,8 @@
 
 struct axis2_foo_ops
 {
-    void (AXIS2_CALL *bar)(axis2_foo_t *foo, axis2_env_t **env, void *data);
-    axis2_status_t (AXIS2_CALL *free)(axis2_foo_t *foo, axis2_env_t **env);
+    void (AXIS2_CALL *bar)(axis2_foo_t *foo, const axis2_env_t *env, void 
*data);
+    axis2_status_t (AXIS2_CALL *free)(axis2_foo_t *foo, const axis2_env_t 
*env);
 };
 
 struct axis2_foo
@@ -67,7 +67,7 @@
 }
 
 
-axis2_foo_t * axis2_foo_create(axis2_env_t **env);
+axis2_foo_t * axis2_foo_create(const axis2_env_t *env);
 
 /* Macros are provided to access functions defined in the ops (operations 
structure)*/
 
@@ -91,10 +91,10 @@
 /* Function Headers */
 
 void AXIS2_CALL axis2_foo_bar(void *data);
-axis2_status_t AXIS2_CALL axis2_foo_free(axis2_env_t **env, axis2_foo_t *foo);
+axis2_status_t AXIS2_CALL axis2_foo_free(const axis2_env_t *env, axis2_foo_t 
*foo);
 
 /* Function Implementation */
-axis2_foo_t * AXIS2_CALL axis2_foo_create(axis2_env_t **env)
+axis2_foo_t * AXIS2_CALL axis2_foo_create(const axis2_env_t *env)
 {
     axis2_foo_impl_t * foo_impl = NULL;
     /* create axis2_foo_t and initialize private data */
@@ -112,7 +112,7 @@
     /* do something */
 }
 
-axis2_status_t AXIS2_CALL axis2_foo_free(axis2_env_t **env, axis2_foo_t *foo)
+axis2_status_t AXIS2_CALL axis2_foo_free(const axis2_env_t *env, axis2_foo_t 
*foo)
 {
     /* do the dirty work of cleaning the allocated memory */
 }</pre>
@@ -137,7 +137,7 @@
 <strong>axis2_svc_skeleton.h</strong></p>
 <pre class="code">AXIS2_DECLARE_DATA struct axis2_svc_skeleton_ops
 {
-    int (AXIS2_CALL * free)(axis2_svc_skeleton_t *svc_skeli, axis2_env_t 
**env);
+    int (AXIS2_CALL * free)(axis2_svc_skeleton_t *svc_skeli, const axis2_env_t 
*env);
     ...
 };
 
@@ -161,11 +161,11 @@
 are cleaned in this. You may clean additional memory here if you have
 allocated any specific memory blocks in math_create function or elsewhere
 depending on your implementation specifics.</p>
-<pre class="code">int AXIS2_CALL math_free(axis2_svc_skeleton_t *svc_skeleton, 
axis2_env_t **env)
+<pre class="code">int AXIS2_CALL math_free(axis2_svc_skeleton_t *svc_skeleton, 
const axis2_env_t *env)
 {
     if(svc_skeleton-&gt;ops)
     {
-        AXIS2_FREE((*env)-&gt;allocator, svc_skeleton-&gt;ops);
+        AXIS2_FREE(env-&gt;allocator, svc_skeleton-&gt;ops);
         svc_skeleton-&gt;ops = NULL;
     }
     if(svc_skeleton-&gt;func_array)
@@ -175,7 +175,7 @@
     }
     if(svc_skeleton)
     {
-        AXIS2_FREE((*env)-&gt;allocator, svc_skeleton);
+        AXIS2_FREE(env-&gt;allocator, svc_skeleton);
         svc_skeleton = NULL;
     }
     return AXIS2_SUCCESS;
@@ -185,12 +185,12 @@
 math_free function to the free function of the operations struct. As you can
 see, now the SOAP engine has a function reference to perform garbage
 collection after each service request.</p>
-<pre class="code">AXIS2_DECLARE(axis2_svc_skeleton_t *) 
axis2_math_create(axis2_env_t **env)
+<pre class="code">AXIS2_EXTERN axis2_svc_skeleton_t * AXIS2_CALL 
axis2_math_create(const axis2_env_t *env)
 {
     axis2_svc_skeleton_t *svc_skeleton = NULL;
-    svc_skeleton = AXIS2_MALLOC((*env)-&gt;allocator, 
sizeof(axis2_svc_skeleton_t));
+    svc_skeleton = AXIS2_MALLOC(env-&gt;allocator, 
sizeof(axis2_svc_skeleton_t));
 
-    svc_skeleton-&gt;ops = AXIS2_MALLOC((*env)-&gt;allocator, 
sizeof(axis2_svc_skeleton_ops_t));
+    svc_skeleton-&gt;ops = AXIS2_MALLOC(env-&gt;allocator, 
sizeof(axis2_svc_skeleton_ops_t));
 
 
     svc_skeleton-&gt;ops-&gt;free = math_free;

Modified: webservices/axis2/trunk/c/xdocs/docs/userguide.html
URL: 
http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xdocs/docs/userguide.html?rev=414490&r1=414489&r2=414490&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xdocs/docs/userguide.html (original)
+++ webservices/axis2/trunk/c/xdocs/docs/userguide.html Wed Jun 14 23:55:21 2006
@@ -179,23 +179,23 @@
 
 <p>They are:-</p>
 <pre class="code">int (AXIS2_CALL * init) (axis2_svc_skeleton_t *svc_skeleton,
-                         axis2_env_t **env);
+                         const axis2_env_t *env);
 
 axiom_node_t * (AXIS2_CALL* invoke)(axis2_svc_skeleton_t *svc_skeli, 
-                    axis2_env_t **env, axiom_node_t *node);
+                    const axis2_env_t *env, axiom_node_t *node);
 
 axiom_node_t *(AXIS2_CALL* on_fault)(axis2_svc_skeleton_t *svc_skeli,
-                    axis2_env_t **env, axiom_node_t *node);
+                    const axis2_env_t *env, axiom_node_t *node);
 
 int (AXIS2_CALL *free)(axis2_svc_skeleton_t *svc_skeli, 
-                       axis2_env_t **env);</pre>
+                       const axis2_env_t *env);</pre>
 
 <p>Lets implement the above functions for echo service.</p>
 
 <p><i>/* Initialize the service */</i><br />
 int AXIS2_CALL<br />
 echo_init(axis2_svc_skeleton_t *svc_skeleton,<br />
-                        axis2_env_t **env)<br />
+                        const axis2_env_t *env)<br />
 {<br />
     svc_skeleton-&gt;func_array = axis2_array_list_create(env, 0);<br />
     <i>/* Add the implemented operation names of the service to  <br />
@@ -212,7 +212,7 @@
  */</i><br />
 axiom_node_t* AXIS2_CALL<br />
 echo_invoke(axis2_svc_skeleton_t *svc_skeleton,<br />
-            axis2_env_t **env,<br />
+            const axis2_env_t *env,<br />
             axiom_node_t *node)<br />
 {<br />
     <i>/* Invoke the business logic.<br />
@@ -227,7 +227,7 @@
 <i>/* On fault, handle the fault */</i><br />
 axiom_node_t* AXIS2_CALL<br />
 echo_on_fault(axis2_svc_skeleton_t *svc_skeli, <br />
-              axis2_env_t **env, axiom_node_t *node)<br />
+              const axis2_env_t *env, axiom_node_t *node)<br />
 {<br />
    <i>/* Here we are just setting a simple error message inside an element <br
 />
@@ -247,7 +247,7 @@
 <i>/* Free the resources used */</i><br />
 int AXIS2_CALL<br />
 echo_free(axis2_svc_skeleton_t *svc_skeleton,<br />
-            axis2_env_t **env)<br />
+            const axis2_env_t *env)<br />
 {<br />
     <i>/* Free the function array */</i><br />
     <b>if</b>(svc_skeleton-&gt;func_array)<br />
@@ -259,14 +259,14 @@
     <i>/* Free the function array */</i><br />
     <b>if</b>(svc_skeleton-&gt;ops)<br />
     {<br />
-        AXIS2_FREE((*env)-&gt;allocator, svc_skeleton-&gt;ops);<br />
+        AXIS2_FREE(env-&gt;allocator, svc_skeleton-&gt;ops);<br />
         svc_skeleton-&gt;ops = NULL;<br />
     }<br />
     <br />
     <i>/* Free the service skeleton */</i><br />
     <b>if</b>(svc_skeleton)<br />
     {<br />
-        AXIS2_FREE((*env)-&gt;allocator, svc_skeleton);<br />
+        AXIS2_FREE(env-&gt;allocator, svc_skeleton);<br />
         svc_skeleton = NULL;<br />
     }<br />
 <br />
@@ -279,15 +279,15 @@
 
 <p><i>/*Create function */<br />
 </i> axis2_svc_skeleton_t *<br />
-axis2_echo_create(axis2_env_t **env)<br />
+axis2_echo_create(const axis2_env_t *env)<br />
 {<br />
     axis2_svc_skeleton_t *svc_skeleton = NULL;<br />
     <i>/* Allocate memory for the structs */</i><br />
-    svc_skeleton = AXIS2_MALLOC((*env)-&gt;allocator, <br />
+    svc_skeleton = AXIS2_MALLOC(env-&gt;allocator, <br />
         <b>sizeof</b>(axis2_svc_skeleton_t));<br />
 <br />
     svc_skeleton-&gt;ops = AXIS2_MALLOC(<br />
-        (*env)-&gt;allocator, <b>sizeof</b>(axis2_svc_skeleton_ops_t));<br />
+        env-&gt;allocator, <b>sizeof</b>(axis2_svc_skeleton_ops_t));<br />
 <br />
     <i>/* Assign function pointers */</i><br />
     svc_skeleton-&gt;ops-&gt;free = echo_free;<br />
@@ -309,7 +309,7 @@
 
 <p>AXIS2_EXPORT int <br />
 axis2_get_instance(axis2_svc_skeleton_t **inst,<br />
-                   axis2_env_t **env)<br />
+                   const axis2_env_t *env)<br />
 {<br />
     *inst = axis2_echo_create(env);<br />
     <b>if</b>(!(*inst))<br />
@@ -321,7 +321,7 @@
 <br />
 AXIS2_EXPORT int <br />
 axis2_remove_instance(axis2_svc_skeleton_t *inst,<br />
-                      axis2_env_t **env)<br />
+                      const axis2_env_t *env)<br />
 {<br />
     axis2_status_t status = AXIS2_FAILURE;<br />
     <b>if</b> (inst)<br />
@@ -346,7 +346,7 @@
 <h4>Step2 : Now we can write the echo service in a file echo.c</h4>
 
 <p><a id="Step3">axiom_node_t *<br />
-axis2_echo_echo (axis2_env_t **env, axiom_node_t *node)<br />
+axis2_echo_echo (const axis2_env_t *env, axiom_node_t *node)<br />
 {<br />
     axiom_node_t *text_parent_node = NULL;<br />
     axiom_node_t *text_node = NULL;<br />
@@ -362,7 +362,7 @@
      */</i><br />
     <b>if</b> (!node) <i>/* 'echoString' node */</i><br />
     {<br />
-        AXIS2_ERROR_SET((*env)-&gt;error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL, AXIS2_FAILURE);<br
+        AXIS2_ERROR_SET(env-&gt;error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL, AXIS2_FAILURE);<br
 />
         printf("Echo client ERROR: input parameter NULL\n");<br />
         <b>return</b> NULL;<br />
@@ -371,7 +371,7 @@
     text_parent_node = AXIOM_NODE_GET_FIRST_CHILD(node, env);<br />
     <b>if</b> (!text_parent_node) <i>/* 'text' node */</i><br />
     {<br />
-        AXIS2_ERROR_SET((*env)-&gt;error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);<br
+        AXIS2_ERROR_SET(env-&gt;error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);<br
 />
         printf("Echo client ERROR: invalid XML in request\n");<br />
         <b>return</b> NULL;<br />
@@ -380,7 +380,7 @@
     text_node = AXIOM_NODE_GET_FIRST_CHILD(text_parent_node, env);<br />
     <b>if</b> (!text_node) <i>/* actual text to echo */</i><br />
     {<br />
-        AXIS2_ERROR_SET((*env)-&gt;error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);<br
+        AXIS2_ERROR_SET(env-&gt;error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);<br
 />
         printf("Echo client ERROR: invalid XML in request\n");<br />
         <b>return</b> NULL;<br />
@@ -400,7 +400,7 @@
     }<br />
     <b>else</b><br />
     {<br />
-        AXIS2_ERROR_SET((*env)-&gt;error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);<br
+        AXIS2_ERROR_SET(env-&gt;error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);<br
 />
         printf("Echo client ERROR: invalid XML in request\n");<br />
         <b>return</b> NULL;<br />
@@ -411,7 +411,7 @@
 <br />
 <i>/* Builds the response content */</i><br />
 axiom_node_t *<br />
-build_om_programatically(axis2_env_t **env, axis2_char_t *text)<br />
+build_om_programatically(const axis2_env_t *env, axis2_char_t *text)<br />
 {<br />
     axiom_node_t *echo_om_node = NULL;<br />
     axiom_element_t* echo_om_ele = NULL;<br />
@@ -608,11 +608,11 @@
 blocking invocation. The client code you need to write is as follows.</p>
 <pre>    
     <span style="color: #24C113">/* Create EPR with given address */</span>
-    endpoint_ref = axis2_endpoint_ref_create(&amp;env, address);
+    endpoint_ref = axis2_endpoint_ref_create(env, address);
 
     <span style="color: #24C113">/* Setup options */</span>
-    options = axis2_options_create(&amp;env);
-    AXIS2_OPTIONS_SET_TO(options, &amp;env, endpoint_ref);
+    options = axis2_options_create(env);
+    AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref);
 
     <span style="color: #24C113">/* Set the deploy folder */</span>
     client_home = AXIS2_GETENV("AXIS2C_HOME");
@@ -620,7 +620,7 @@
         client_home = "../../deploy";
 
     <span style="color: #24C113">/* Create service client */</span>
-    svc_client = axis2_svc_client_create(&amp;env, client_home);
+    svc_client = axis2_svc_client_create(env, client_home);
     if (!svc_client)
     {
         printf("Error creating service client\n");
@@ -630,19 +630,19 @@
     }
 
     <span style="color: #24C113">/* Set service client options */</span>
-    AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, &amp;env, options);    
+    AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options);    
 
     <span style="color: #24C113">/* Build the SOAP request message payload 
using OM API.*/</span>
-    payload = build_om_payload_for_echo_svc(&amp;env);
+    payload = build_om_payload_for_echo_svc(env);
     
     <span style="color: #24C113">/* Send request */</span>
-    ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, &amp;env, payload);
+    ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload);
     
     <span style="color: #24C113">/* Print result */</span>
     if(ret_node)
     {
         axis2_char_t *om_str = NULL;
-        om_str = AXIOM_NODE_TO_STRING(ret_node, &amp;env);
+        om_str = AXIOM_NODE_TO_STRING(ret_node, env);
         if (om_str)
             printf("\nReceived OM : %s\n", om_str);
         printf("\necho client invoke SUCCESSFUL!\n");
@@ -689,7 +689,7 @@
 "Axis2CHome/samples/user_guide/clients" with the name echo_non_blocking.c.
 The changes that user may have to do with respect to the "echo_blocking"
 client to make it non-blocking would be as follows:</p>
-<pre style="margin-bottom: 
0.2in">AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING(svc_client, &amp;env, 
payload, callback);</pre>
+<pre style="margin-bottom: 
0.2in">AXIS2_SVC_CLIENT_SEND_RECEIVE_NON_BLOCKING(svc_client, env, payload, 
callback);</pre>
 
 <p>Unlike "send_receive", "send_receive_non_blocking" accepts a callback
 struct in addition to payload. Axis2/C client API provides a callback struct
@@ -697,18 +697,18 @@
 <pre>axis2_status_t (AXIS2_CALL *
 on_complete)(
     struct axis2_callback *callback,
-    axis2_env_t **env);
+    const axis2_env_t *env);
 
 axis2_status_t (AXIS2_CALL *
 on_error)(
     struct axis2_callback *callback,
-    axis2_env_t **env,
+    const axis2_env_t *env,
     int exception);
 
 axis2_bool_t (AXIS2_CALL *
 get_complete)(
     struct axis2_callback *callback,
-    axis2_env_t **env);</pre>
+    const axis2_env_t *env);</pre>
 
 <p>The user is expected to implement the "on_complete " and "on_error "
 functions and set them on the callback using the "set_on_complete" and
@@ -751,7 +751,7 @@
 same API can be used to invoke Web Services (IN-OUT operations) using two
 separate transport connections. All that you have to do is to set
 "use_separate_listener" to true in options:</p>
-<pre>AXIS2_OPTIONS_SET_USE_SEPERATE_LISTENER(options, &amp;env, 
AXIS2_TRUE);</pre>
+<pre>AXIS2_OPTIONS_SET_USE_SEPERATE_LISTENER(options, env, AXIS2_TRUE);</pre>
 
 <p>In addition to setting the use_separate_listener to true, to use dual
 transports one has to"engage" addressing module.</p>
@@ -778,7 +778,7 @@
 
 <p>The second method is to engage the module on service client using the
 service_client API.</p>
-<pre>AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, &amp;env, 
AXIS2_MODULE_ADDRESSING);</pre>
+<pre>AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, 
AXIS2_MODULE_ADDRESSING);</pre>
 
 <p>Once addressing is engaged, echo_non_blocking_dual client would work
 perfectly. Note that by default, Axis2/C comes with addressing enabled



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to