]> SALOME platform Git repositories - tools/simanio.git/commitdiff
Salome HOME
Check-in operation without any modifications is possible
authorbri <bri@opencascade.com>
Mon, 10 Feb 2014 14:14:25 +0000 (18:14 +0400)
committerbri <bri@opencascade.com>
Mon, 10 Feb 2014 14:14:25 +0000 (18:14 +0400)
src/CheckIn.cpp
src/CheckIn.h
src/SimanIO_Link.cxx

index 56cea6be9468ade031b9abb4b12cb9e4ddd93988..8f865de5db597e89b9bfb4f137110f738642bd36 100644 (file)
@@ -32,6 +32,8 @@
         
             isValidArgs1  = false;
         
+            isValidArgs2  = false;
+        
                   qname =  axutil_qname_create (Environment::getEnv(),
                         "checkIn",
                         "http://salome.service.ws_server.splat.org",
@@ -39,7 +41,7 @@
                 
         }
 
-       org_splat_ws_server_service_salome::CheckIn::CheckIn(std::string arg_Args0,int64_t arg_Args1)
+       org_splat_ws_server_service_salome::CheckIn::CheckIn(std::string arg_Args0,int64_t arg_Args1,int64_t arg_Args2)
         {
              
                    qname = NULL;
@@ -50,6 +52,8 @@
             
             isValidArgs1  = true;
             
+            isValidArgs2  = true;
+            
                  qname =  axutil_qname_create (Environment::getEnv(),
                        "checkIn",
                        "http://salome.service.ws_server.splat.org",
@@ -59,6 +63,8 @@
             
                     property_Args1 = arg_Args1;
             
+                    property_Args2 = arg_Args2;
+            
         }
         org_splat_ws_server_service_salome::CheckIn::~CheckIn()
         {
                      element_qname = NULL;
                   }
                  
+
+                     
+                     /*
+                      * building args2 element
+                      */
+                     
+                     
+                     
+                                    /*
+                                     * because elements are ordered this works fine
+                                     */
+                                  
+                                   
+                                   if(current_node != NULL && is_early_node_valid)
+                                   {
+                                       current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
+                                       
+                                       
+                                        while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
+                                        {
+                                            current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
+                                        }
+                                        if(current_node != NULL)
+                                        {
+                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
+                                            mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
+                                        }
+                                       
+                                   }
+                                   is_early_node_valid = false;
+                                 
+                                 element_qname = axutil_qname_create(Environment::getEnv(), "args2", "http://salome.service.ws_server.splat.org", NULL);
+                                 
+
+                           if ( 
+                                (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
+                           {
+                              if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
+                              {
+                                is_early_node_valid = true;
+                              }
+                              
+                                 
+                                      text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
+                                      if(text_value != NULL)
+                                      {
+                                            status = setArgs2(axutil_strtol(text_value, (char**)NULL, 0));
+                                      }
+                                      
+                                      else
+                                      {
+                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element args2");
+                                          status = AXIS2_FAILURE;
+                                      }
+                                      
+                                 if(AXIS2_FAILURE ==  status)
+                                 {
+                                     WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for args2 ");
+                                     if(element_qname)
+                                     {
+                                         axutil_qname_free(element_qname, Environment::getEnv());
+                                     }
+                                     return AXIS2_FAILURE;
+                                 }
+                              }
+                           
+                  if(element_qname)
+                  {
+                     axutil_qname_free(element_qname, Environment::getEnv());
+                     element_qname = NULL;
+                  }
+                 
           return status;
        }
 
                     
                     axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
                     
+                    axis2_char_t text_value_3[ADB_DEFAULT_DIGIT_LIMIT];
+                    
                axis2_char_t *start_input_str = NULL;
                axis2_char_t *end_input_str = NULL;
                unsigned int start_input_str_len = 0;
                  } 
 
                  
+                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING)))
+                       {
+                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
+                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
+                           axutil_hash_set(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING, p_prefix);
+                           
+                           axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
+                                            "http://salome.service.ws_server.splat.org", p_prefix));
+                       }
+                      
+
+                   if (!isValidArgs2)
+                   {
+                      
+                           /* no need to complain for minoccurs=0 element */
+                            
+                          
+                   }
+                   else
+                   {
+                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
+                                 (4 + axutil_strlen(p_prefix) + 
+                                  axutil_strlen("args2"))); 
+                                 
+                                 /* axutil_strlen("<:>") + 1 = 4 */
+                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
+                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("args2")));
+                                  /* axutil_strlen("</:>") + 1 = 5 */
+                                  
+                     
+
+                   
+                   
+                     
+                     /*
+                      * parsing args2 element
+                      */
+
+                    
+                    
+                            sprintf(start_input_str, "<%s%sargs2>",
+                                 p_prefix?p_prefix:"",
+                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
+                            
+                        start_input_str_len = axutil_strlen(start_input_str);
+                        sprintf(end_input_str, "</%s%sargs2>",
+                                 p_prefix?p_prefix:"",
+                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
+                        end_input_str_len = axutil_strlen(end_input_str);
+                    
+                               sprintf (text_value_3, AXIS2_PRINTF_INT64_FORMAT_SPECIFIER, (int64_t) property_Args2);
+                             
+                           axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
+                           
+                           axutil_stream_write(stream, Environment::getEnv(), text_value_3, axutil_strlen(text_value_3));
+                           
+                           axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
+                           
+                     
+                     AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
+                     AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
+                 } 
+
+                 
                    if(namespaces)
                    {
                        axutil_hash_index_t *hi;
 
            
 
+            /**
+             * Getter for args2 by  Property Number 3
+             */
+            int64_t WSF_CALL
+            org_splat_ws_server_service_salome::CheckIn::getProperty3()
+            {
+                return getArgs2();
+            }
+
+            /**
+             * getter for args2.
+             */
+            int64_t WSF_CALL
+            org_splat_ws_server_service_salome::CheckIn::getArgs2()
+             {
+                return property_Args2;
+             }
+
+            /**
+             * setter for args2
+             */
+            bool WSF_CALL
+            org_splat_ws_server_service_salome::CheckIn::setArgs2(
+                    const int64_t  arg_Args2)
+             {
+                
+
+                if(isValidArgs2 &&
+                        arg_Args2 == property_Args2)
+                {
+                    
+                    return true;
+                }
+
+                
+
+                
+                resetArgs2();
+
+                
+                        property_Args2 = arg_Args2;
+                        isValidArgs2 = true;
+                    
+                return true;
+             }
+
+             
+
+           /**
+            * resetter for args2
+            */
+           bool WSF_CALL
+           org_splat_ws_server_service_salome::CheckIn::resetArgs2()
+           {
+               int i = 0;
+               int count = 0;
+
+
+               
+               isValidArgs2 = false; 
+               return true;
+           }
+
+           /**
+            * Check whether args2 is nill
+            */
+           bool WSF_CALL
+           org_splat_ws_server_service_salome::CheckIn::isArgs2Nil()
+           {
+               return !isValidArgs2;
+           }
+
+           /**
+            * Set args2 to nill (currently the same as reset)
+            */
+           bool WSF_CALL
+           org_splat_ws_server_service_salome::CheckIn::setArgs2Nil()
+           {
+               return resetArgs2();
+           }
+
+           
+
index 091f652b79ad9198dc328ee18b08ab270effab36..1f756c4ab1da2780af58cd150ddfbb7c1a768de2 100644 (file)
@@ -46,6 +46,10 @@ namespace org_splat_ws_server_service_salome
 
                 
                 bool isValidArgs1;
+            int64_t property_Args2;
+
+                
+                bool isValidArgs2;
             
 
         /*** Private methods ***/
@@ -55,6 +59,10 @@ namespace org_splat_ws_server_service_salome
         setArgs1Nil();
             
 
+        bool WSF_CALL
+        setArgs2Nil();
+            
+
 
 
         /******************************* public functions *********************************/
@@ -80,9 +88,10 @@ namespace org_splat_ws_server_service_salome
          * @param 
          * @param Args0 std::string
          * @param Args1 int64_t
+         * @param Args2 int64_t
          * @return newly created CheckIn object
          */
-        CheckIn(std::string arg_Args0,int64_t arg_Args1);
+        CheckIn(std::string arg_Args0,int64_t arg_Args1,int64_t arg_Args2);
         
         
         /********************************** Class get set methods **************************************/
@@ -135,6 +144,30 @@ namespace org_splat_ws_server_service_salome
         WSF_EXTERN bool WSF_CALL
         resetArgs1();
         
+        
+
+        /**
+         * Getter for args2. 
+         * @return int64_t*
+         */
+        WSF_EXTERN int64_t WSF_CALL
+        getArgs2();
+
+        /**
+         * Setter for args2.
+         * @param arg_Args2 int64_t*
+         * @return true on success, false otherwise
+         */
+        WSF_EXTERN bool WSF_CALL
+        setArgs2(const int64_t  arg_Args2);
+
+        /**
+         * Re setter for args2
+         * @return true on success, false
+         */
+        WSF_EXTERN bool WSF_CALL
+        resetArgs2();
+        
 
 
         /******************************* Checking and Setting NIL values *********************************/
@@ -173,6 +206,16 @@ namespace org_splat_ws_server_service_salome
 
         
 
+        /**
+         * Check whether args2 is Nill
+         * @return true if the element is Nil, false otherwise
+         */
+        bool WSF_CALL
+        isArgs2Nil();
+
+
+        
+
         /**************************** Serialize and De serialize functions ***************************/
         /*********** These functions are for use only inside the generated code *********************/
 
@@ -249,6 +292,17 @@ namespace org_splat_ws_server_service_salome
         getProperty2();
 
     
+        
+
+        /**
+         * Getter for args2 by property number (3)
+         * @return int64_t
+         */
+
+        int64_t WSF_CALL
+        getProperty3();
+
+    
 
 };
 
index fca55dd631feeda5df958137eeeaeeac7ce04bf5..25b489976ffce01f23237a1b152d28fdd8ba7092 100644 (file)
@@ -297,7 +297,8 @@ void SimanIO_Link::StoreConf(/*const*/ SimanIO_Configuration& theConf)
   CheckIn* aCheckInRequest = new CheckIn();
   CheckInResponse* aCheckInResponse = new CheckInResponse();
   aCheckInRequest->setArgs0(aPutFileResponse->get_return());
-  aCheckInRequest->setArgs1(atoll(myUser.c_str()));
+  aCheckInRequest->setArgs1(atoll(myScenario.c_str()));
+  aCheckInRequest->setArgs2(atoll(myUser.c_str()));
   aCheckInResponse = aStub->checkIn(aCheckInRequest);
   
   //Delete the directories