You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by na...@apache.org on 2006/02/20 11:33:26 UTC

svn commit: r379075 - in /webservices/axis2/trunk/c: include/ modules/xml/soap/

Author: nandika
Date: Mon Feb 20 02:33:23 2006
New Revision: 379075

URL: http://svn.apache.org/viewcvs?rev=379075&view=rev
Log:
jira issue 72 fixed [ soap body and soap header should not have a set_soap_version method ]

Modified:
    webservices/axis2/trunk/c/include/axis2_soap_body.h
    webservices/axis2/trunk/c/include/axis2_soap_header.h
    webservices/axis2/trunk/c/modules/xml/soap/soap_body.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_fault.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_header.c

Modified: webservices/axis2/trunk/c/include/axis2_soap_body.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_body.h?rev=379075&r1=379074&r2=379075&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_body.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_body.h Mon Feb 20 02:33:23 2006
@@ -116,21 +116,6 @@
          */
         int (AXIS2_CALL *get_soap_version)(axis2_soap_body_t *body,
                                            axis2_env_t **env);
-        /**
-         * set soap version of this soap_body
-         * this only set a property in soap_body struct , does not alter 
-         * namespace uri, so user must make sure that the wrapped om node is of 
-         * the corresponding soap version 
-         * @param body soap_body
-         * @param env environment
-         * @param soap_version soap_version SHOULD be one of AXIS2_SOAP11 or
-         *                     AXIS2_SOAP12
-         * @return status code
-         */    
-    
-        axis2_status_t (AXIS2_CALL *set_soap_version)(axis2_soap_body_t *body,
-                                                      axis2_env_t **env,
-                                                      int soap_version);
                                                       
         /**
          *  associate a soap_builder with this soap_body
@@ -203,9 +188,6 @@
         
 #define AXIS2_SOAP_BODY_GET_SOAP_VERSION(body, env) \
         ((body)->ops->get_soap_version(body, env))
-        
-#define AXIS2_SOAP_BODY_SET_SOAP_VERSION(body, env, soap_version) \
-        ((body)->ops->set_soap_version(body, env, soap_version)) 
         
 #define AXIS2_SOAP_BODY_SET_BUILDER(body, env, builder) \
         ((body)->ops->set_builder(body, env, builder))               

Modified: webservices/axis2/trunk/c/include/axis2_soap_header.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_header.h?rev=379075&r1=379074&r2=379075&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_header.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_header.h Mon Feb 20 02:33:23 2006
@@ -147,7 +147,6 @@
         axis2_om_node_t* (AXIS2_CALL *get_base_node)
                                             (axis2_soap_header_t *header,
                                              axis2_env_t **env);
-        
         /**
          *  return the soap_version of this soap_header
          *  @param header soap_header
@@ -156,22 +155,11 @@
          */
         int  (AXIS2_CALL *get_soap_version) (axis2_soap_header_t *header,
                                              axis2_env_t **env);
-       /** 
-        * sets the soap version for this soap_header
-        * @param soap_version AXIS2_SOAP12 or AXIS2_SOAP11
-        */
-                                             
-        axis2_status_t (AXIS2_CALL *set_soap_version)
-                                            (axis2_soap_header_t *header,
-                                             axis2_env_t **env,
-                                             int soap_version); 
-                                             
+         
         axis2_status_t (AXIS2_CALL *set_header_block)
                                             (axis2_soap_header_t *header,
                                              axis2_env_t **env,
-                                             struct axis2_soap_header_block* header_block);                                                                                                                                                                                                                                                   
-        
-        axis2_status_t (AXIS2_CALL *set_builder)(axis2_soap_header_t *header,
+                                             struct axis2_soap_header_block* header_block);                                                                                                     axis2_status_t (AXIS2_CALL *set_builder)(axis2_soap_header_t *header,
                                                 axis2_env_t **env,
                                                 struct axis2_soap_builder* builder);
 
@@ -203,14 +191,6 @@
 axis2_soap_header_create_with_parent(axis2_env_t **env,
                                      struct axis2_soap_envelope *envelope);
                                      
-AXIS2_DECLARE(axis2_soap_header_t *)
-axis2_soap11_header_create_with_parent(axis2_env_t **env,
-                                     axis2_soap_envelope_t *envelope);
-                                     
-AXIS2_DECLARE(axis2_soap_header_t *)
-axis2_soap12_header_create_with_parent(axis2_env_t **env,
-                                     axis2_soap_envelope_t *envelope);                                                                          
-                            
 /******************** Macros **************************************************/
     
     
@@ -236,9 +216,7 @@
 #define AXIS2_SOAP_HEADER_GET_BASE_NODE(header, env) \
         ((header)->ops->get_base_node(header, env)) 
         
-#define AXIS2_SOAP_HEADER_SET_SOAP_VERSION(header, env, version) \
-        ((header)->ops->set_soap_version(header, env, version))
-        
+       
 #define AXIS2_SOAP_HEADER_GET_SOAP_VERSION(header, env) \
         ((header)->ops->get_soap_version(header, env))
         

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_body.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_body.c?rev=379075&r1=379074&r2=379075&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_body.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_body.c Mon Feb 20 02:33:23 2006
@@ -134,7 +134,6 @@
     body_impl->soap_body.ops->get_base_node = axis2_soap_body_get_base_node;
     body_impl->soap_body.ops->set_base_node = axis2_soap_body_set_base_node;
     body_impl->soap_body.ops->get_soap_version = axis2_soap_body_get_soap_version;
-    body_impl->soap_body.ops->set_soap_version = axis2_soap_body_set_soap_version;
     body_impl->soap_body.ops->set_builder = axis2_soap_body_set_builder;
     body_impl->soap_body.ops->build = axis2_soap_body_build;
     body_impl->soap_body.ops->set_fault = axis2_soap_body_set_fault;
@@ -156,7 +155,7 @@
     axis2_om_namespace_t *om_ns = NULL;
     
     AXIS2_ENV_CHECK(env, NULL);
-    AXIS2_PARAM_CHECK((*env)->error, envelope, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, envelope, NULL);
     
     body = axis2_soap_body_create(env);
     if(!body)
@@ -190,6 +189,9 @@
         return NULL;
     }
     AXIS2_SOAP_ENVELOPE_SET_BODY(envelope, env, &(body_impl->soap_body));
+    body_impl->soap_version = 
+        AXIS2_SOAP_ENVELOPE_GET_SOAP_VERSION(envelope, env);
+    
     return &(body_impl->soap_body);           
 }
 

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c?rev=379075&r1=379074&r2=379075&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c Mon Feb 20 02:33:23 2006
@@ -471,7 +471,7 @@
             builder_impl->header_present = AXIS2_TRUE;
             soap_header = axis2_soap_header_create(env);
             AXIS2_SOAP_HEADER_SET_BASE_NODE(soap_header, env, om_element_node);
-            AXIS2_SOAP_HEADER_SET_SOAP_VERSION(soap_header, env, builder_impl->soap_version);
+/*            AXIS2_SOAP_HEADER_SET_SOAP_VERSION(soap_header, env, builder_impl->soap_version); */
             AXIS2_SOAP_ENVELOPE_SET_HEADER(builder_impl->soap_envelope, env, soap_header);
             AXIS2_SOAP_HEADER_SET_BUILDER(soap_header, env, builder);
             status = axis2_soap_builder_process_namespace_data(builder, env, 
@@ -495,7 +495,6 @@
             builder_impl->body_present = AXIS2_TRUE;                
             soap_body = axis2_soap_body_create(env);
             AXIS2_SOAP_BODY_SET_BASE_NODE(soap_body, env, om_element_node);
-            AXIS2_SOAP_BODY_SET_SOAP_VERSION(soap_body, env, builder_impl->soap_version);
             AXIS2_SOAP_BODY_SET_BUILDER(soap_body, env, builder);
             AXIS2_SOAP_ENVELOPE_SET_BODY(builder_impl->soap_envelope, env, soap_body);
             status = axis2_soap_builder_process_namespace_data(builder, env, 

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c?rev=379075&r1=379074&r2=379075&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c Mon Feb 20 02:33:23 2006
@@ -625,11 +625,10 @@
         env_impl = AXIS2_INTF_TO_IMPL(soap_env);
         
         AXIS2_SOAP_ENVELOPE_SET_SOAP_VERSION(soap_env, env, AXIS2_SOAP11);
-        soap_header = axis2_soap11_header_create_with_parent(env, soap_env);
+        soap_header = axis2_soap_header_create_with_parent(env, soap_env);
         soap_body   = axis2_soap_body_create_with_parent(env, soap_env);
         env_impl->body = soap_body;
         env_impl->header = soap_header;
-        AXIS2_SOAP_BODY_SET_SOAP_VERSION(soap_body, env, AXIS2_SOAP11);
         return soap_env;    
     }
     else if(soap_version == AXIS2_SOAP12)
@@ -643,12 +642,10 @@
         env_impl = AXIS2_INTF_TO_IMPL(soap_env);
         
         AXIS2_SOAP_ENVELOPE_SET_SOAP_VERSION(soap_env, env, AXIS2_SOAP12);
-        soap_header = axis2_soap12_header_create_with_parent(env, soap_env);
+        soap_header = axis2_soap_header_create_with_parent(env, soap_env);
         soap_body   = axis2_soap_body_create_with_parent(env, soap_env);
         env_impl->body = soap_body;
         env_impl->header = soap_header;
-        
-        AXIS2_SOAP_BODY_SET_SOAP_VERSION(soap_body, env, AXIS2_SOAP12);
         return soap_env;    
     }
     AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_SOAP_VERSION, AXIS2_FAILURE);
@@ -677,7 +674,6 @@
         AXIS2_SOAP_ENVELOPE_SET_SOAP_VERSION(soap_env, env, AXIS2_SOAP11);
         soap_body   = axis2_soap_body_create_with_parent(env, soap_env);
         env_impl->body = soap_body;
-        AXIS2_SOAP_BODY_SET_SOAP_VERSION(soap_body, env, AXIS2_SOAP11);
         return soap_env;    
     }
     else if(soap_version == AXIS2_SOAP12)
@@ -693,7 +689,6 @@
         AXIS2_SOAP_ENVELOPE_SET_SOAP_VERSION(soap_env, env, AXIS2_SOAP12);
         soap_body   = axis2_soap_body_create_with_parent(env, soap_env);
         env_impl->body = soap_body;
-        AXIS2_SOAP_BODY_SET_SOAP_VERSION(soap_body, env, AXIS2_SOAP12);
         return soap_env;    
     }
     AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_SOAP_VERSION, AXIS2_FAILURE);

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_fault.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_fault.c?rev=379075&r1=379074&r2=379075&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_fault.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_fault.c Mon Feb 20 02:33:23 2006
@@ -820,9 +820,9 @@
     
     axis2_om_node_t *text_node = NULL;
     axis2_om_element_t *text_ele = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, code_value, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, reason_text, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, code_value, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, reason_text, NULL);
 
     soap_fault = axis2_soap_fault_create_with_parent(env, parent);
     if(soap_fault)

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_header.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_header.c?rev=379075&r1=379074&r2=379075&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_header.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_header.c Mon Feb 20 02:33:23 2006
@@ -159,10 +159,10 @@
         axis2_soap_header_set_base_node;
     header_impl->soap_header.ops->get_base_node =
         axis2_soap_header_get_base_node;
-    header_impl->soap_header.ops->set_soap_version =
+/*    header_impl->soap_header.ops->set_soap_version =
         axis2_soap_header_set_soap_version;
     header_impl->soap_header.ops->get_soap_version =
-        axis2_soap_header_get_soap_version;
+        axis2_soap_header_get_soap_version; */
     header_impl->soap_header.ops->set_header_block = 
         axis2_soap_header_set_header_block;
     header_impl->soap_header.ops->set_builder =
@@ -406,34 +406,6 @@
     return AXIS2_SUCCESS;
 
 }                                         
-
-/******************** soap11 **************************************************/
-
-AXIS2_DECLARE(axis2_soap_header_t *)
-axis2_soap11_header_create_with_parent(axis2_env_t **env,
-                                     axis2_soap_envelope_t *envelope)
-{
-    axis2_soap_header_t *header = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
-    AXIS2_PARAM_CHECK((*env)->error, envelope, NULL);
-    header = axis2_soap_header_create_with_parent(env, envelope);
-    AXIS2_SOAP_HEADER_BLOCK_SET_SOAP_VERSION(header, env, AXIS2_SOAP11);
-    return header;
-}                                     
-
-/******************** soap12 **************************************************/
-                                     
-AXIS2_DECLARE(axis2_soap_header_t *)
-axis2_soap12_header_create_with_parent(axis2_env_t **env,
-                                     axis2_soap_envelope_t *envelope)
-{
-    axis2_soap_header_t *header = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
-    AXIS2_PARAM_CHECK((*env)->error, envelope, NULL);
-    header = axis2_soap_header_create_with_parent(env, envelope);
-    AXIS2_SOAP_HEADER_BLOCK_SET_SOAP_VERSION(header, env, AXIS2_SOAP11);
-    return header;
-}
 
 axis2_status_t AXIS2_CALL 
 axis2_soap_header_set_header_block(axis2_soap_header_t *header,