Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2012
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 169.77 KB | None | 0 0
  1.  
  2.  
  3.         /**
  4.          * AbstractRequestType.cpp
  5.          *
  6.          * This file was auto-generated from WSDL
  7.          * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
  8.          */
  9.  
  10.         #include "AbstractRequestType.h"
  11.         #include <Environment.h>
  12.         #include <WSFError.h>
  13.  
  14.  
  15.         using namespace wso2wsf;
  16.         using namespace std;
  17.        
  18.         using namespace ns_trading_service;
  19.  
  20.                 /*
  21.                  * This type was generated from the piece of schema that had
  22.                  * name = AbstractRequestType
  23.                  * Namespace URI = urn:ebay:apis:eBLBaseComponents
  24.                  * Namespace Prefix = ns1
  25.                  */
  26.            ns_trading_service::AbstractRequestType::AbstractRequestType()
  27.         {
  28.  
  29.        
  30.                 property_DetailLevel  = NULL;
  31.              
  32.             isValidDetailLevel  = false;
  33.        
  34.                     property_ErrorLanguage;
  35.                
  36.             isValidErrorLanguage  = false;
  37.        
  38.                     property_MessageID;
  39.                
  40.             isValidMessageID  = false;
  41.        
  42.                     property_Version;
  43.                
  44.             isValidVersion  = false;
  45.        
  46.                     property_EndUserIP;
  47.                
  48.             isValidEndUserIP  = false;
  49.        
  50.                 property_ErrorHandling  = NULL;
  51.              
  52.             isValidErrorHandling  = false;
  53.        
  54.                 property_InvocationID  = NULL;
  55.              
  56.             isValidInvocationID  = false;
  57.        
  58.                 property_OutputSelector  = NULL;
  59.              
  60.             isValidOutputSelector  = false;
  61.        
  62.                 property_WarningLevel  = NULL;
  63.              
  64.             isValidWarningLevel  = false;
  65.        
  66.                 property_BotBlock  = NULL;
  67.              
  68.             isValidBotBlock  = false;
  69.        
  70.                 property_ExtraElement  = NULL;
  71.              
  72.             isValidExtraElement  = false;
  73.        
  74.         }
  75.  
  76.        ns_trading_service::AbstractRequestType::AbstractRequestType(std::vector<ns_trading_service::DetailLevelCodeType*>* arg_DetailLevel,std::string arg_ErrorLanguage,std::string arg_MessageID,std::string arg_Version,std::string arg_EndUserIP,ns_trading_service::ErrorHandlingCodeType* arg_ErrorHandling,ns_trading_service::UUIDType* arg_InvocationID,std::vector<std::string*>* arg_OutputSelector,ns_trading_service::WarningLevelCodeType* arg_WarningLevel,ns_trading_service::BotBlockRequestType* arg_BotBlock,std::vector<wso2wsf::OMElement*>* arg_ExtraElement)
  77.         {
  78.              
  79.                property_DetailLevel  = NULL;
  80.              
  81.             isValidDetailLevel  = true;
  82.            
  83.                  property_ErrorLanguage;
  84.              
  85.             isValidErrorLanguage  = true;
  86.            
  87.                  property_MessageID;
  88.              
  89.             isValidMessageID  = true;
  90.            
  91.                  property_Version;
  92.              
  93.             isValidVersion  = true;
  94.            
  95.                  property_EndUserIP;
  96.              
  97.             isValidEndUserIP  = true;
  98.            
  99.                property_ErrorHandling  = NULL;
  100.              
  101.             isValidErrorHandling  = true;
  102.            
  103.                property_InvocationID  = NULL;
  104.              
  105.             isValidInvocationID  = true;
  106.            
  107.                property_OutputSelector  = NULL;
  108.              
  109.             isValidOutputSelector  = true;
  110.            
  111.                property_WarningLevel  = NULL;
  112.              
  113.             isValidWarningLevel  = true;
  114.            
  115.                property_BotBlock  = NULL;
  116.              
  117.             isValidBotBlock  = true;
  118.            
  119.                property_ExtraElement  = NULL;
  120.              
  121.             isValidExtraElement  = true;
  122.            
  123.                     property_DetailLevel = arg_DetailLevel;
  124.            
  125.                     property_ErrorLanguage = arg_ErrorLanguage;
  126.            
  127.                     property_MessageID = arg_MessageID;
  128.            
  129.                     property_Version = arg_Version;
  130.            
  131.                     property_EndUserIP = arg_EndUserIP;
  132.            
  133.                     property_ErrorHandling = arg_ErrorHandling;
  134.            
  135.                     property_InvocationID = arg_InvocationID;
  136.            
  137.                     property_OutputSelector = arg_OutputSelector;
  138.            
  139.                     property_WarningLevel = arg_WarningLevel;
  140.            
  141.                     property_BotBlock = arg_BotBlock;
  142.            
  143.                     property_ExtraElement = arg_ExtraElement;
  144.            
  145.         }
  146.         ns_trading_service::AbstractRequestType::~AbstractRequestType()
  147.         {
  148.  
  149.         }
  150.  
  151.        
  152.  
  153.         bool WSF_CALL
  154.         ns_trading_service::AbstractRequestType::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
  155.         {
  156.           axiom_node_t *parent = *dp_parent;
  157.          
  158.           bool status = AXIS2_SUCCESS;
  159.            
  160.          const axis2_char_t* text_value = NULL;
  161.          axutil_qname_t *mqname = NULL;
  162.          
  163.                int i = 0;
  164.            
  165.                int sequence_broken = 0;
  166.                axiom_node_t *tmp_node = NULL;
  167.            
  168.             axutil_qname_t *element_qname = NULL;
  169.            
  170.                axiom_node_t *first_node = NULL;
  171.                bool is_early_node_valid = true;
  172.                axiom_node_t *current_node = NULL;
  173.                axiom_element_t *current_element = NULL;
  174.            
  175.              
  176.               while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
  177.               {
  178.                   parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
  179.               }
  180.               if (NULL == parent)
  181.               {  
  182.                 return AXIS2_FAILURE;
  183.               }
  184.              
  185.                      
  186.                       first_node = axiom_node_get_first_child(parent, Environment::getEnv());
  187.                      
  188.                    
  189.                        {
  190.                     /*
  191.                      * building DetailLevel array
  192.                      */
  193.                        std::vector<ns_trading_service::DetailLevelCodeType*>* arr_list =new std::vector<ns_trading_service::DetailLevelCodeType*>();
  194.                    
  195.  
  196.                      
  197.                      /*
  198.                       * building DetailLevel element
  199.                       */
  200.                      
  201.                      
  202.                      
  203.                                     element_qname = axutil_qname_create(Environment::getEnv(), "DetailLevel", "urn:ebay:apis:eBLBaseComponents", NULL);
  204.                                  
  205.                                
  206.                                for (i = 0, sequence_broken = 0, current_node = first_node; !sequence_broken && current_node != NULL;)
  207.                                              
  208.                                {
  209.                                   if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  210.                                   {
  211.                                      current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
  212.                                      is_early_node_valid = false;
  213.                                      continue;
  214.                                   }
  215.                                  
  216.                                   current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  217.                                   mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
  218.  
  219.                                   if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))
  220.                                   {
  221.                                  
  222.                                       is_early_node_valid = true;
  223.                                      
  224.                                      ns_trading_service::DetailLevelCodeType* element = new ns_trading_service::DetailLevelCodeType();
  225.                                          
  226.                                           status =  element->deserialize(&current_node, &is_early_node_valid, false);
  227.                                          
  228.                                           if(AXIS2_FAILURE ==  status)
  229.                                           {
  230.                       WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element DetailLevel ");
  231.                                           }
  232.                                           else
  233.                                           {
  234.                                             arr_list->push_back(element);
  235.                                            
  236.                                           }
  237.                                        
  238.                                      if(AXIS2_FAILURE ==  status)
  239.                                      {
  240.                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for DetailLevel ");
  241.                                          if(element_qname)
  242.                                          {
  243.                                             axutil_qname_free(element_qname, Environment::getEnv());
  244.                                          }
  245.                                          if(arr_list)
  246.                                          {
  247.                                             delete arr_list;
  248.                                          }
  249.                                          return false;
  250.                                      }
  251.  
  252.                                      i++;
  253.                                     current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  254.                                   }
  255.                                   else
  256.                                   {
  257.                                       is_early_node_valid = false;
  258.                                       sequence_broken = 1;
  259.                                   }
  260.                                  
  261.                                }
  262.  
  263.                                
  264.                                    if (i < 0)
  265.                                    {
  266.                                      /* found element out of order */
  267.                                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"DetailLevel (@minOccurs = '0') only have %d elements", i);
  268.                                      if(element_qname)
  269.                                      {
  270.                                         axutil_qname_free(element_qname, Environment::getEnv());
  271.                                      }
  272.                                      if(arr_list)
  273.                                      {
  274.                                         delete arr_list;
  275.                                      }
  276.                                      return false;
  277.                                    }
  278.                                
  279.  
  280.                                if(0 == arr_list->size())
  281.                                {
  282.                                     delete arr_list;
  283.                                }
  284.                                else
  285.                                {
  286.                                     status = setDetailLevel(arr_list);
  287.                                }
  288.  
  289.                              
  290.                             }
  291.                        
  292.                   if(element_qname)
  293.                   {
  294.                      axutil_qname_free(element_qname, Environment::getEnv());
  295.                      element_qname = NULL;
  296.                   }
  297.                  
  298.  
  299.                      
  300.                      /*
  301.                       * building ErrorLanguage element
  302.                       */
  303.                      
  304.                      
  305.                      
  306.                                     /*
  307.                                      * because elements are ordered this works fine
  308.                                      */
  309.                                  
  310.                                    
  311.                                    if(current_node != NULL && is_early_node_valid)
  312.                                    {
  313.                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  314.                                        
  315.                                        
  316.                                         while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  317.                                         {
  318.                                             current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  319.                                         }
  320.                                         if(current_node != NULL)
  321.                                         {
  322.                                             current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  323.                                             mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
  324.                                         }
  325.                                        
  326.                                    }
  327.                                    is_early_node_valid = false;
  328.                                  
  329.                                  element_qname = axutil_qname_create(Environment::getEnv(), "ErrorLanguage", "urn:ebay:apis:eBLBaseComponents", NULL);
  330.                                  
  331.  
  332.                            if (
  333.                                 (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
  334.                            {
  335.                               if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
  336.                               {
  337.                                 is_early_node_valid = true;
  338.                               }
  339.                              
  340.                                  
  341.                                       text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
  342.                                       if(text_value != NULL)
  343.                                       {
  344.                                             status = setErrorLanguage(text_value);
  345.                                       }
  346.                                      
  347.                                       else
  348.                                       {
  349.                                             /*
  350.                                              * axis2_qname_t *qname = NULL;
  351.                                              * axiom_attribute_t *the_attri = NULL;
  352.                                              *
  353.                                              * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
  354.                                              * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
  355.                                              */
  356.                                             /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
  357.  
  358.                                             axiom_attribute_t *the_attri = NULL;
  359.                                             axis2_char_t *attrib_text = NULL;
  360.                                             axutil_hash_t *attribute_hash = NULL;
  361.  
  362.                                             attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
  363.  
  364.                                             attrib_text = NULL;
  365.                                             if(attribute_hash)
  366.                                             {
  367.                                                  axutil_hash_index_t *hi;
  368.                                                  void *val;
  369.                                                  const void *key;
  370.                                        
  371.                                                  for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
  372.                                                  {
  373.                                                      axutil_hash_this(hi, &key, NULL, &val);
  374.                                                      
  375.                                                      if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
  376.                                                      {
  377.                                                          the_attri = (axiom_attribute_t*)val;
  378.                                                          break;
  379.                                                      }
  380.                                                  }
  381.                                             }
  382.  
  383.                                             if(the_attri)
  384.                                             {
  385.                                                 attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
  386.                                             }
  387.                                             else
  388.                                             {
  389.                                                 /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
  390.                                                 attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
  391.                                             }
  392.  
  393.                                             if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
  394.                                             {
  395.                                                 WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element ErrorLanguage");
  396.                                                 status = AXIS2_FAILURE;
  397.                                             }
  398.                                             else
  399.                                             {
  400.                                                 /* after all, we found this is a empty string */
  401.                                                 status = setErrorLanguage("");
  402.                                             }
  403.                                       }
  404.                                      
  405.                                  if(AXIS2_FAILURE ==  status)
  406.                                  {
  407.                                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for ErrorLanguage ");
  408.                                      if(element_qname)
  409.                                      {
  410.                                          axutil_qname_free(element_qname, Environment::getEnv());
  411.                                      }
  412.                                      return AXIS2_FAILURE;
  413.                                  }
  414.                               }
  415.                            
  416.                   if(element_qname)
  417.                   {
  418.                      axutil_qname_free(element_qname, Environment::getEnv());
  419.                      element_qname = NULL;
  420.                   }
  421.                  
  422.  
  423.                      
  424.                      /*
  425.                       * building MessageID element
  426.                       */
  427.                      
  428.                      
  429.                      
  430.                                     /*
  431.                                      * because elements are ordered this works fine
  432.                                      */
  433.                                  
  434.                                    
  435.                                    if(current_node != NULL && is_early_node_valid)
  436.                                    {
  437.                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  438.                                        
  439.                                        
  440.                                         while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  441.                                         {
  442.                                             current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  443.                                         }
  444.                                         if(current_node != NULL)
  445.                                         {
  446.                                             current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  447.                                             mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
  448.                                         }
  449.                                        
  450.                                    }
  451.                                    is_early_node_valid = false;
  452.                                  
  453.                                  element_qname = axutil_qname_create(Environment::getEnv(), "MessageID", "urn:ebay:apis:eBLBaseComponents", NULL);
  454.                                  
  455.  
  456.                            if (
  457.                                 (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
  458.                            {
  459.                               if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
  460.                               {
  461.                                 is_early_node_valid = true;
  462.                               }
  463.                              
  464.                                  
  465.                                       text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
  466.                                       if(text_value != NULL)
  467.                                       {
  468.                                             status = setMessageID(text_value);
  469.                                       }
  470.                                      
  471.                                       else
  472.                                       {
  473.                                             /*
  474.                                              * axis2_qname_t *qname = NULL;
  475.                                              * axiom_attribute_t *the_attri = NULL;
  476.                                              *
  477.                                              * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
  478.                                              * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
  479.                                              */
  480.                                             /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
  481.  
  482.                                             axiom_attribute_t *the_attri = NULL;
  483.                                             axis2_char_t *attrib_text = NULL;
  484.                                             axutil_hash_t *attribute_hash = NULL;
  485.  
  486.                                             attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
  487.  
  488.                                             attrib_text = NULL;
  489.                                             if(attribute_hash)
  490.                                             {
  491.                                                  axutil_hash_index_t *hi;
  492.                                                  void *val;
  493.                                                  const void *key;
  494.                                        
  495.                                                  for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
  496.                                                  {
  497.                                                      axutil_hash_this(hi, &key, NULL, &val);
  498.                                                      
  499.                                                      if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
  500.                                                      {
  501.                                                          the_attri = (axiom_attribute_t*)val;
  502.                                                          break;
  503.                                                      }
  504.                                                  }
  505.                                             }
  506.  
  507.                                             if(the_attri)
  508.                                             {
  509.                                                 attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
  510.                                             }
  511.                                             else
  512.                                             {
  513.                                                 /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
  514.                                                 attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
  515.                                             }
  516.  
  517.                                             if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
  518.                                             {
  519.                                                 WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element MessageID");
  520.                                                 status = AXIS2_FAILURE;
  521.                                             }
  522.                                             else
  523.                                             {
  524.                                                 /* after all, we found this is a empty string */
  525.                                                 status = setMessageID("");
  526.                                             }
  527.                                       }
  528.                                      
  529.                                  if(AXIS2_FAILURE ==  status)
  530.                                  {
  531.                                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for MessageID ");
  532.                                      if(element_qname)
  533.                                      {
  534.                                          axutil_qname_free(element_qname, Environment::getEnv());
  535.                                      }
  536.                                      return AXIS2_FAILURE;
  537.                                  }
  538.                               }
  539.                            
  540.                   if(element_qname)
  541.                   {
  542.                      axutil_qname_free(element_qname, Environment::getEnv());
  543.                      element_qname = NULL;
  544.                   }
  545.                  
  546.  
  547.                      
  548.                      /*
  549.                       * building Version element
  550.                       */
  551.                      
  552.                      
  553.                      
  554.                                     /*
  555.                                      * because elements are ordered this works fine
  556.                                      */
  557.                                  
  558.                                    
  559.                                    if(current_node != NULL && is_early_node_valid)
  560.                                    {
  561.                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  562.                                        
  563.                                        
  564.                                         while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  565.                                         {
  566.                                             current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  567.                                         }
  568.                                         if(current_node != NULL)
  569.                                         {
  570.                                             current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  571.                                             mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
  572.                                         }
  573.                                        
  574.                                    }
  575.                                    is_early_node_valid = false;
  576.                                  
  577.                                  element_qname = axutil_qname_create(Environment::getEnv(), "Version", "urn:ebay:apis:eBLBaseComponents", NULL);
  578.                                  
  579.  
  580.                            if (
  581.                                 (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
  582.                            {
  583.                               if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
  584.                               {
  585.                                 is_early_node_valid = true;
  586.                               }
  587.                              
  588.                                  
  589.                                       text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
  590.                                       if(text_value != NULL)
  591.                                       {
  592.                                             status = setVersion(text_value);
  593.                                       }
  594.                                      
  595.                                       else
  596.                                       {
  597.                                             /*
  598.                                              * axis2_qname_t *qname = NULL;
  599.                                              * axiom_attribute_t *the_attri = NULL;
  600.                                              *
  601.                                              * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
  602.                                              * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
  603.                                              */
  604.                                             /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
  605.  
  606.                                             axiom_attribute_t *the_attri = NULL;
  607.                                             axis2_char_t *attrib_text = NULL;
  608.                                             axutil_hash_t *attribute_hash = NULL;
  609.  
  610.                                             attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
  611.  
  612.                                             attrib_text = NULL;
  613.                                             if(attribute_hash)
  614.                                             {
  615.                                                  axutil_hash_index_t *hi;
  616.                                                  void *val;
  617.                                                  const void *key;
  618.                                        
  619.                                                  for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
  620.                                                  {
  621.                                                      axutil_hash_this(hi, &key, NULL, &val);
  622.                                                      
  623.                                                      if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
  624.                                                      {
  625.                                                          the_attri = (axiom_attribute_t*)val;
  626.                                                          break;
  627.                                                      }
  628.                                                  }
  629.                                             }
  630.  
  631.                                             if(the_attri)
  632.                                             {
  633.                                                 attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
  634.                                             }
  635.                                             else
  636.                                             {
  637.                                                 /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
  638.                                                 attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
  639.                                             }
  640.  
  641.                                             if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
  642.                                             {
  643.                                                 WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element Version");
  644.                                                 status = AXIS2_FAILURE;
  645.                                             }
  646.                                             else
  647.                                             {
  648.                                                 /* after all, we found this is a empty string */
  649.                                                 status = setVersion("");
  650.                                             }
  651.                                       }
  652.                                      
  653.                                  if(AXIS2_FAILURE ==  status)
  654.                                  {
  655.                                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for Version ");
  656.                                      if(element_qname)
  657.                                      {
  658.                                          axutil_qname_free(element_qname, Environment::getEnv());
  659.                                      }
  660.                                      return AXIS2_FAILURE;
  661.                                  }
  662.                               }
  663.                            
  664.                   if(element_qname)
  665.                   {
  666.                      axutil_qname_free(element_qname, Environment::getEnv());
  667.                      element_qname = NULL;
  668.                   }
  669.                  
  670.  
  671.                      
  672.                      /*
  673.                       * building EndUserIP element
  674.                       */
  675.                      
  676.                      
  677.                      
  678.                                     /*
  679.                                      * because elements are ordered this works fine
  680.                                      */
  681.                                  
  682.                                    
  683.                                    if(current_node != NULL && is_early_node_valid)
  684.                                    {
  685.                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  686.                                        
  687.                                        
  688.                                         while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  689.                                         {
  690.                                             current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  691.                                         }
  692.                                         if(current_node != NULL)
  693.                                         {
  694.                                             current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  695.                                             mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
  696.                                         }
  697.                                        
  698.                                    }
  699.                                    is_early_node_valid = false;
  700.                                  
  701.                                  element_qname = axutil_qname_create(Environment::getEnv(), "EndUserIP", "urn:ebay:apis:eBLBaseComponents", NULL);
  702.                                  
  703.  
  704.                            if (
  705.                                 (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
  706.                            {
  707.                               if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
  708.                               {
  709.                                 is_early_node_valid = true;
  710.                               }
  711.                              
  712.                                  
  713.                                       text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
  714.                                       if(text_value != NULL)
  715.                                       {
  716.                                             status = setEndUserIP(text_value);
  717.                                       }
  718.                                      
  719.                                       else
  720.                                       {
  721.                                             /*
  722.                                              * axis2_qname_t *qname = NULL;
  723.                                              * axiom_attribute_t *the_attri = NULL;
  724.                                              *
  725.                                              * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
  726.                                              * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
  727.                                              */
  728.                                             /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
  729.  
  730.                                             axiom_attribute_t *the_attri = NULL;
  731.                                             axis2_char_t *attrib_text = NULL;
  732.                                             axutil_hash_t *attribute_hash = NULL;
  733.  
  734.                                             attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
  735.  
  736.                                             attrib_text = NULL;
  737.                                             if(attribute_hash)
  738.                                             {
  739.                                                  axutil_hash_index_t *hi;
  740.                                                  void *val;
  741.                                                  const void *key;
  742.                                        
  743.                                                  for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
  744.                                                  {
  745.                                                      axutil_hash_this(hi, &key, NULL, &val);
  746.                                                      
  747.                                                      if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
  748.                                                      {
  749.                                                          the_attri = (axiom_attribute_t*)val;
  750.                                                          break;
  751.                                                      }
  752.                                                  }
  753.                                             }
  754.  
  755.                                             if(the_attri)
  756.                                             {
  757.                                                 attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
  758.                                             }
  759.                                             else
  760.                                             {
  761.                                                 /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
  762.                                                 attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
  763.                                             }
  764.  
  765.                                             if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
  766.                                             {
  767.                                                 WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element EndUserIP");
  768.                                                 status = AXIS2_FAILURE;
  769.                                             }
  770.                                             else
  771.                                             {
  772.                                                 /* after all, we found this is a empty string */
  773.                                                 status = setEndUserIP("");
  774.                                             }
  775.                                       }
  776.                                      
  777.                                  if(AXIS2_FAILURE ==  status)
  778.                                  {
  779.                                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for EndUserIP ");
  780.                                      if(element_qname)
  781.                                      {
  782.                                          axutil_qname_free(element_qname, Environment::getEnv());
  783.                                      }
  784.                                      return AXIS2_FAILURE;
  785.                                  }
  786.                               }
  787.                            
  788.                   if(element_qname)
  789.                   {
  790.                      axutil_qname_free(element_qname, Environment::getEnv());
  791.                      element_qname = NULL;
  792.                   }
  793.                  
  794.  
  795.                      
  796.                      /*
  797.                       * building ErrorHandling element
  798.                       */
  799.                      
  800.                      
  801.                      
  802.                                     /*
  803.                                      * because elements are ordered this works fine
  804.                                      */
  805.                                  
  806.                                    
  807.                                    if(current_node != NULL && is_early_node_valid)
  808.                                    {
  809.                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  810.                                        
  811.                                        
  812.                                         while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  813.                                         {
  814.                                             current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  815.                                         }
  816.                                         if(current_node != NULL)
  817.                                         {
  818.                                             current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  819.                                             mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
  820.                                         }
  821.                                        
  822.                                    }
  823.                                    is_early_node_valid = false;
  824.                                  
  825.                                  element_qname = axutil_qname_create(Environment::getEnv(), "ErrorHandling", "urn:ebay:apis:eBLBaseComponents", NULL);
  826.                                  
  827.  
  828.                            if (isParticle() ||  
  829.                                 (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
  830.                            {
  831.                               if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
  832.                               {
  833.                                 is_early_node_valid = true;
  834.                               }
  835.                              
  836.                                  ns_trading_service::ErrorHandlingCodeType* element = new ns_trading_service::ErrorHandlingCodeType();
  837.  
  838.                                       status =  element->deserialize(&current_node, &is_early_node_valid, false);
  839.                                       if(AXIS2_FAILURE == status)
  840.                                       {
  841.                                           WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element ErrorHandling");
  842.                                       }
  843.                                       else
  844.                                       {
  845.                                           status = setErrorHandling(element);
  846.                                       }
  847.                                    
  848.                                  if(AXIS2_FAILURE ==  status)
  849.                                  {
  850.                                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for ErrorHandling ");
  851.                                      if(element_qname)
  852.                                      {
  853.                                          axutil_qname_free(element_qname, Environment::getEnv());
  854.                                      }
  855.                                      return AXIS2_FAILURE;
  856.                                  }
  857.                               }
  858.                            
  859.                   if(element_qname)
  860.                   {
  861.                      axutil_qname_free(element_qname, Environment::getEnv());
  862.                      element_qname = NULL;
  863.                   }
  864.                  
  865.  
  866.                      
  867.                      /*
  868.                       * building InvocationID element
  869.                       */
  870.                      
  871.                      
  872.                      
  873.                                     /*
  874.                                      * because elements are ordered this works fine
  875.                                      */
  876.                                  
  877.                                    
  878.                                    if(current_node != NULL && is_early_node_valid)
  879.                                    {
  880.                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  881.                                        
  882.                                        
  883.                                         while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  884.                                         {
  885.                                             current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  886.                                         }
  887.                                         if(current_node != NULL)
  888.                                         {
  889.                                             current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  890.                                             mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
  891.                                         }
  892.                                        
  893.                                    }
  894.                                    is_early_node_valid = false;
  895.                                  
  896.                                  element_qname = axutil_qname_create(Environment::getEnv(), "InvocationID", "urn:ebay:apis:eBLBaseComponents", NULL);
  897.                                  
  898.  
  899.                            if (isParticle() ||  
  900.                                 (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
  901.                            {
  902.                               if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
  903.                               {
  904.                                 is_early_node_valid = true;
  905.                               }
  906.                              
  907.                                  ns_trading_service::UUIDType* element = new ns_trading_service::UUIDType();
  908.  
  909.                                       status =  element->deserialize(&current_node, &is_early_node_valid, false);
  910.                                       if(AXIS2_FAILURE == status)
  911.                                       {
  912.                                           WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element InvocationID");
  913.                                       }
  914.                                       else
  915.                                       {
  916.                                           status = setInvocationID(element);
  917.                                       }
  918.                                    
  919.                                  if(AXIS2_FAILURE ==  status)
  920.                                  {
  921.                                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for InvocationID ");
  922.                                      if(element_qname)
  923.                                      {
  924.                                          axutil_qname_free(element_qname, Environment::getEnv());
  925.                                      }
  926.                                      return AXIS2_FAILURE;
  927.                                  }
  928.                               }
  929.                            
  930.                   if(element_qname)
  931.                   {
  932.                      axutil_qname_free(element_qname, Environment::getEnv());
  933.                      element_qname = NULL;
  934.                   }
  935.                  
  936.                        {
  937.                     /*
  938.                      * building OutputSelector array
  939.                      */
  940.                        std::vector<std::string*>* arr_list =new std::vector<std::string*>();
  941.                    
  942.  
  943.                      
  944.                      /*
  945.                       * building OutputSelector element
  946.                       */
  947.                      
  948.                      
  949.                      
  950.                                     element_qname = axutil_qname_create(Environment::getEnv(), "OutputSelector", "urn:ebay:apis:eBLBaseComponents", NULL);
  951.                                  
  952.                                
  953.                                for (i = 0, sequence_broken = 0, current_node = (is_early_node_valid?axiom_node_get_next_sibling(current_node, Environment::getEnv()):current_node); !sequence_broken && current_node != NULL;)
  954.                                              
  955.                                {
  956.                                   if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  957.                                   {
  958.                                      current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
  959.                                      is_early_node_valid = false;
  960.                                      continue;
  961.                                   }
  962.                                  
  963.                                   current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  964.                                   mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
  965.  
  966.                                   if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))
  967.                                   {
  968.                                  
  969.                                       is_early_node_valid = true;
  970.                                      
  971.                                      
  972.                                           text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
  973.                                           if(text_value != NULL)
  974.                                           {
  975.                                               arr_list->push_back(new string(text_value));
  976.                                           }
  977.                                          
  978.                                           else
  979.                                           {
  980.                                               /*
  981.                                                * axis2_qname_t *qname = NULL;
  982.                                                * axiom_attribute_t *the_attri = NULL;
  983.                                                *
  984.                                                * qname = axutil_qname_create(Environment::getEnv(), "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
  985.                                                * the_attri = axiom_element_get_attribute(current_element, Environment::getEnv(), qname);
  986.                                                */
  987.                                            
  988.                                               /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
  989.                                              
  990.                                               axiom_attribute_t *the_attri = NULL;
  991.                                               axis2_char_t *attrib_text = NULL;
  992.                                               axutil_hash_t *attribute_hash = NULL;
  993.                                              
  994.                                               attribute_hash = axiom_element_get_all_attributes(current_element, Environment::getEnv());
  995.                                              
  996.                                               attrib_text = NULL;
  997.                                               if(attribute_hash)
  998.                                               {
  999.                                                    axutil_hash_index_t *hi;
  1000.                                                    void *val;
  1001.                                                    const void *key;
  1002.                                              
  1003.                                                    for (hi = axutil_hash_first(attribute_hash, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
  1004.                                                    {
  1005.                                                        axutil_hash_this(hi, &key, NULL, &val);
  1006.                                                        
  1007.                                                        if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
  1008.                                                        {
  1009.                                                            the_attri = (axiom_attribute_t*)val;
  1010.                                                            break;
  1011.                                                        }
  1012.                                                    }
  1013.                                               }
  1014.                                              
  1015.                                               if(the_attri)
  1016.                                               {
  1017.                                                   attrib_text = axiom_attribute_get_value(the_attri, Environment::getEnv());
  1018.                                               }
  1019.                                               else
  1020.                                               {
  1021.                                                   /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
  1022.                                                   attrib_text = axiom_element_get_attribute_value_by_name(current_element, Environment::getEnv(), "nil");
  1023.                                               }
  1024.                                              
  1025.                                               if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
  1026.                                               {
  1027.                           WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI,"NULL value is set to a non nillable element OutputSelector");
  1028.                                                   status = AXIS2_FAILURE;
  1029.                                               }
  1030.                                               else
  1031.                                               {
  1032.                                                   /* after all, we found this is a empty string */
  1033.                                                   arr_list->push_back(new string(""));
  1034.                                               }
  1035.                                           }
  1036.                                          
  1037.                                      if(AXIS2_FAILURE ==  status)
  1038.                                      {
  1039.                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for OutputSelector ");
  1040.                                          if(element_qname)
  1041.                                          {
  1042.                                             axutil_qname_free(element_qname, Environment::getEnv());
  1043.                                          }
  1044.                                          if(arr_list)
  1045.                                          {
  1046.                                             delete arr_list;
  1047.                                          }
  1048.                                          return false;
  1049.                                      }
  1050.  
  1051.                                      i++;
  1052.                                     current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  1053.                                   }
  1054.                                   else
  1055.                                   {
  1056.                                       is_early_node_valid = false;
  1057.                                       sequence_broken = 1;
  1058.                                   }
  1059.                                  
  1060.                                }
  1061.  
  1062.                                
  1063.                                    if (i < 0)
  1064.                                    {
  1065.                                      /* found element out of order */
  1066.                                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"OutputSelector (@minOccurs = '0') only have %d elements", i);
  1067.                                      if(element_qname)
  1068.                                      {
  1069.                                         axutil_qname_free(element_qname, Environment::getEnv());
  1070.                                      }
  1071.                                      if(arr_list)
  1072.                                      {
  1073.                                         delete arr_list;
  1074.                                      }
  1075.                                      return false;
  1076.                                    }
  1077.                                
  1078.  
  1079.                                if(0 == arr_list->size())
  1080.                                {
  1081.                                     delete arr_list;
  1082.                                }
  1083.                                else
  1084.                                {
  1085.                                     status = setOutputSelector(arr_list);
  1086.                                }
  1087.  
  1088.                              
  1089.                             }
  1090.                        
  1091.                   if(element_qname)
  1092.                   {
  1093.                      axutil_qname_free(element_qname, Environment::getEnv());
  1094.                      element_qname = NULL;
  1095.                   }
  1096.                  
  1097.  
  1098.                      
  1099.                      /*
  1100.                       * building WarningLevel element
  1101.                       */
  1102.                      
  1103.                      
  1104.                      
  1105.                                     /*
  1106.                                      * because elements are ordered this works fine
  1107.                                      */
  1108.                                  
  1109.                                    
  1110.                                    if(current_node != NULL && is_early_node_valid)
  1111.                                    {
  1112.                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  1113.                                        
  1114.                                        
  1115.                                         while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  1116.                                         {
  1117.                                             current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  1118.                                         }
  1119.                                         if(current_node != NULL)
  1120.                                         {
  1121.                                             current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  1122.                                             mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
  1123.                                         }
  1124.                                        
  1125.                                    }
  1126.                                    is_early_node_valid = false;
  1127.                                  
  1128.                                  element_qname = axutil_qname_create(Environment::getEnv(), "WarningLevel", "urn:ebay:apis:eBLBaseComponents", NULL);
  1129.                                  
  1130.  
  1131.                            if (isParticle() ||  
  1132.                                 (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
  1133.                            {
  1134.                               if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
  1135.                               {
  1136.                                 is_early_node_valid = true;
  1137.                               }
  1138.                              
  1139.                                  ns_trading_service::WarningLevelCodeType* element = new ns_trading_service::WarningLevelCodeType();
  1140.  
  1141.                                       status =  element->deserialize(&current_node, &is_early_node_valid, false);
  1142.                                       if(AXIS2_FAILURE == status)
  1143.                                       {
  1144.                                           WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element WarningLevel");
  1145.                                       }
  1146.                                       else
  1147.                                       {
  1148.                                           status = setWarningLevel(element);
  1149.                                       }
  1150.                                    
  1151.                                  if(AXIS2_FAILURE ==  status)
  1152.                                  {
  1153.                                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for WarningLevel ");
  1154.                                      if(element_qname)
  1155.                                      {
  1156.                                          axutil_qname_free(element_qname, Environment::getEnv());
  1157.                                      }
  1158.                                      return AXIS2_FAILURE;
  1159.                                  }
  1160.                               }
  1161.                            
  1162.                   if(element_qname)
  1163.                   {
  1164.                      axutil_qname_free(element_qname, Environment::getEnv());
  1165.                      element_qname = NULL;
  1166.                   }
  1167.                  
  1168.  
  1169.                      
  1170.                      /*
  1171.                       * building BotBlock element
  1172.                       */
  1173.                      
  1174.                      
  1175.                      
  1176.                                     /*
  1177.                                      * because elements are ordered this works fine
  1178.                                      */
  1179.                                  
  1180.                                    
  1181.                                    if(current_node != NULL && is_early_node_valid)
  1182.                                    {
  1183.                                        current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  1184.                                        
  1185.                                        
  1186.                                         while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  1187.                                         {
  1188.                                             current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  1189.                                         }
  1190.                                         if(current_node != NULL)
  1191.                                         {
  1192.                                             current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  1193.                                             mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
  1194.                                         }
  1195.                                        
  1196.                                    }
  1197.                                    is_early_node_valid = false;
  1198.                                  
  1199.                                  element_qname = axutil_qname_create(Environment::getEnv(), "BotBlock", "urn:ebay:apis:eBLBaseComponents", NULL);
  1200.                                  
  1201.  
  1202.                            if (isParticle() ||  
  1203.                                 (current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
  1204.                            {
  1205.                               if( current_node   && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
  1206.                               {
  1207.                                 is_early_node_valid = true;
  1208.                               }
  1209.                              
  1210.                                  ns_trading_service::BotBlockRequestType* element = new ns_trading_service::BotBlockRequestType();
  1211.  
  1212.                                       status =  element->deserialize(&current_node, &is_early_node_valid, false);
  1213.                                       if(AXIS2_FAILURE == status)
  1214.                                       {
  1215.                                           WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element BotBlock");
  1216.                                       }
  1217.                                       else
  1218.                                       {
  1219.                                           status = setBotBlock(element);
  1220.                                       }
  1221.                                    
  1222.                                  if(AXIS2_FAILURE ==  status)
  1223.                                  {
  1224.                                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for BotBlock ");
  1225.                                      if(element_qname)
  1226.                                      {
  1227.                                          axutil_qname_free(element_qname, Environment::getEnv());
  1228.                                      }
  1229.                                      return AXIS2_FAILURE;
  1230.                                  }
  1231.                               }
  1232.                            
  1233.                   if(element_qname)
  1234.                   {
  1235.                      axutil_qname_free(element_qname, Environment::getEnv());
  1236.                      element_qname = NULL;
  1237.                   }
  1238.                  
  1239.                        {
  1240.                     /*
  1241.                      * building ExtraElement array
  1242.                      */
  1243.                        std::vector<wso2wsf::OMElement*>* arr_list =new std::vector<wso2wsf::OMElement*>();
  1244.                    
  1245.  
  1246.                      
  1247.                      /*
  1248.                       * building extraElement element
  1249.                       */
  1250.                      
  1251.                      
  1252.                      
  1253.                             /* 'any' arrays are not handling correctly when there are other elements mixed with the 'any' element. */
  1254.                            
  1255.                                
  1256.                                for (i = 0, sequence_broken = 0, current_node = (is_early_node_valid?axiom_node_get_next_sibling(current_node, Environment::getEnv()):current_node); !sequence_broken && current_node != NULL;)
  1257.                                              
  1258.                                {
  1259.                                   if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  1260.                                   {
  1261.                                      current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
  1262.                                      is_early_node_valid = false;
  1263.                                      continue;
  1264.                                   }
  1265.                                  
  1266.                                       is_early_node_valid = true;
  1267.                                      
  1268.                                      
  1269.                                           text_value = NULL; /* just to avoid warning */
  1270.                                          
  1271.                                             {
  1272.                                               axiom_node_t *current_property_node = current_node;
  1273.                                               current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  1274.                                               axiom_node_detach(current_property_node, Environment::getEnv());
  1275.                                               arr_list->push_back(new OMElement(NULL, current_property_node));
  1276.                                             }
  1277.                                            
  1278.                                      if(AXIS2_FAILURE ==  status)
  1279.                                      {
  1280.                                          WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for extraElement ");
  1281.                                          if(element_qname)
  1282.                                          {
  1283.                                             axutil_qname_free(element_qname, Environment::getEnv());
  1284.                                          }
  1285.                                          if(arr_list)
  1286.                                          {
  1287.                                             delete arr_list;
  1288.                                          }
  1289.                                          return false;
  1290.                                      }
  1291.  
  1292.                                      i++;
  1293.                                    
  1294.                                }
  1295.  
  1296.                                
  1297.  
  1298.                                if(0 == arr_list->size())
  1299.                                {
  1300.                                     delete arr_list;
  1301.                                }
  1302.                                else
  1303.                                {
  1304.                                     status = setExtraElement(arr_list);
  1305.                                }
  1306.  
  1307.                              
  1308.                             }
  1309.                        
  1310.                   if(element_qname)
  1311.                   {
  1312.                      axutil_qname_free(element_qname, Environment::getEnv());
  1313.                      element_qname = NULL;
  1314.                   }
  1315.                  
  1316.           return status;
  1317.        }
  1318.  
  1319.           bool WSF_CALL
  1320.           ns_trading_service::AbstractRequestType::isParticle()
  1321.           {
  1322.            
  1323.                  return false;
  1324.              
  1325.           }
  1326.  
  1327.  
  1328.           void WSF_CALL
  1329.           ns_trading_service::AbstractRequestType::declareParentNamespaces(
  1330.                     axiom_element_t *parent_element,
  1331.                     axutil_hash_t *namespaces, int *next_ns_index)
  1332.           {
  1333.            
  1334.                   /* Here this is an empty function, Nothing to declare */
  1335.                  
  1336.           }
  1337.  
  1338.        
  1339.        
  1340.         axiom_node_t* WSF_CALL
  1341.     ns_trading_service::AbstractRequestType::serialize(axiom_node_t *parent,
  1342.             axiom_element_t *parent_element,
  1343.             int parent_tag_closed,
  1344.             axutil_hash_t *namespaces,
  1345.             int *next_ns_index)
  1346.         {
  1347.            
  1348.            
  1349.              axis2_char_t *string_to_stream;
  1350.            
  1351.          
  1352.          axiom_node_t *current_node = NULL;
  1353.          int tag_closed = 0;
  1354.  
  1355.          
  1356.          
  1357.                 axiom_namespace_t *ns1 = NULL;
  1358.  
  1359.                 axis2_char_t *qname_uri = NULL;
  1360.                 axis2_char_t *qname_prefix = NULL;
  1361.                 axis2_char_t *p_prefix = NULL;
  1362.            
  1363.                int i = 0;
  1364.                int count = 0;
  1365.                void *element = NULL;
  1366.              
  1367.                     axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
  1368.                    
  1369.                     axis2_char_t *text_value_2;
  1370.                     axis2_char_t *text_value_2_temp;
  1371.                    
  1372.                     axis2_char_t *text_value_3;
  1373.                     axis2_char_t *text_value_3_temp;
  1374.                    
  1375.                     axis2_char_t *text_value_4;
  1376.                     axis2_char_t *text_value_4_temp;
  1377.                    
  1378.                     axis2_char_t *text_value_5;
  1379.                     axis2_char_t *text_value_5_temp;
  1380.                    
  1381.                     axis2_char_t text_value_6[ADB_DEFAULT_DIGIT_LIMIT];
  1382.                    
  1383.                     axis2_char_t text_value_7[ADB_DEFAULT_DIGIT_LIMIT];
  1384.                    
  1385.                     axis2_char_t *text_value_8;
  1386.                     axis2_char_t *text_value_8_temp;
  1387.                    
  1388.                     axis2_char_t text_value_9[ADB_DEFAULT_DIGIT_LIMIT];
  1389.                    
  1390.                     axis2_char_t text_value_10[ADB_DEFAULT_DIGIT_LIMIT];
  1391.                    
  1392.                     axis2_char_t *text_value_11;
  1393.                     axis2_char_t *text_value_11_temp;
  1394.                    
  1395.                axis2_char_t *start_input_str = NULL;
  1396.                axis2_char_t *end_input_str = NULL;
  1397.                unsigned int start_input_str_len = 0;
  1398.                unsigned int end_input_str_len = 0;
  1399.            
  1400.            
  1401.                axiom_data_source_t *data_source = NULL;
  1402.                axutil_stream_t *stream = NULL;
  1403.  
  1404.            
  1405.                     current_node = parent;
  1406.                     data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  1407.                     if (!data_source)
  1408.                         return NULL;
  1409.                     stream = axiom_data_source_get_stream(data_source, Environment::getEnv()); /* assume parent is of type data source */
  1410.                     if (!stream)
  1411.                         return NULL;
  1412.                  
  1413.             if(!parent_tag_closed)
  1414.             {
  1415.            
  1416.               string_to_stream = ">";
  1417.               axutil_stream_write(stream, Environment::getEnv(), string_to_stream, axutil_strlen(string_to_stream));
  1418.               tag_closed = 1;
  1419.            
  1420.             }
  1421.            
  1422.                        if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING)))
  1423.                        {
  1424.                            p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
  1425.                            sprintf(p_prefix, "n%d", (*next_ns_index)++);
  1426.                            axutil_hash_set(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING, p_prefix);
  1427.                            
  1428.                            axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
  1429.                                             "urn:ebay:apis:eBLBaseComponents", p_prefix));
  1430.                        }
  1431.                      
  1432.  
  1433.                    if (!isValidDetailLevel)
  1434.                    {
  1435.                      
  1436.                            /* no need to complain for minoccurs=0 element */
  1437.                            
  1438.                          
  1439.                    }
  1440.                    else
  1441.                    {
  1442.                      start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1443.                                  (4 + axutil_strlen(p_prefix) +
  1444.                                   axutil_strlen("DetailLevel")));
  1445.                                  
  1446.                                  /* axutil_strlen("<:>") + 1 = 4 */
  1447.                      end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1448.                                  (5 + axutil_strlen(p_prefix) + axutil_strlen("DetailLevel")));
  1449.                                   /* axutil_strlen("</:>") + 1 = 5 */
  1450.                                  
  1451.                      
  1452.  
  1453.                    
  1454.                    
  1455.                      /*
  1456.                       * Parsing DetailLevel array
  1457.                       */
  1458.                      if (property_DetailLevel != NULL)
  1459.                      {
  1460.                        
  1461.  
  1462.                             sprintf(start_input_str, "<%s%sDetailLevel",
  1463.                                  p_prefix?p_prefix:"",
  1464.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1465.                            
  1466.                          start_input_str_len = axutil_strlen(start_input_str);
  1467.  
  1468.                          sprintf(end_input_str, "</%s%sDetailLevel>",
  1469.                                  p_prefix?p_prefix:"",
  1470.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1471.                          end_input_str_len = axutil_strlen(end_input_str);
  1472.  
  1473.                          count = property_DetailLevel->size();
  1474.                          for(i = 0; i < count; i++)
  1475.                          {
  1476.                             ns_trading_service::DetailLevelCodeType* element = (*property_DetailLevel)[i];
  1477.  
  1478.                             if(NULL == element)
  1479.                             {
  1480.                                 continue;
  1481.                             }
  1482.  
  1483.                    
  1484.                      
  1485.                      /*
  1486.                       * parsing DetailLevel element
  1487.                       */
  1488.  
  1489.                    
  1490.                      
  1491.                             if(!element->isParticle())
  1492.                             {
  1493.                                 axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
  1494.                             }
  1495.                             element->serialize(current_node, parent_element,
  1496.                                                                                  element->isParticle() || false, namespaces, next_ns_index);
  1497.                            
  1498.                             if(!element->isParticle())
  1499.                             {
  1500.                                 axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
  1501.                             }
  1502.                            
  1503.                          }
  1504.                      }
  1505.                    
  1506.                      
  1507.                      AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  1508.                      AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  1509.                  }
  1510.  
  1511.                  
  1512.                        if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING)))
  1513.                        {
  1514.                            p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
  1515.                            sprintf(p_prefix, "n%d", (*next_ns_index)++);
  1516.                            axutil_hash_set(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING, p_prefix);
  1517.                            
  1518.                            axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
  1519.                                             "urn:ebay:apis:eBLBaseComponents", p_prefix));
  1520.                        }
  1521.                      
  1522.  
  1523.                    if (!isValidErrorLanguage)
  1524.                    {
  1525.                      
  1526.                            /* no need to complain for minoccurs=0 element */
  1527.                            
  1528.                          
  1529.                    }
  1530.                    else
  1531.                    {
  1532.                      start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1533.                                  (4 + axutil_strlen(p_prefix) +
  1534.                                   axutil_strlen("ErrorLanguage")));
  1535.                                  
  1536.                                  /* axutil_strlen("<:>") + 1 = 4 */
  1537.                      end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1538.                                  (5 + axutil_strlen(p_prefix) + axutil_strlen("ErrorLanguage")));
  1539.                                   /* axutil_strlen("</:>") + 1 = 5 */
  1540.                                  
  1541.                      
  1542.  
  1543.                    
  1544.                    
  1545.                      
  1546.                      /*
  1547.                       * parsing ErrorLanguage element
  1548.                       */
  1549.  
  1550.                    
  1551.                    
  1552.                             sprintf(start_input_str, "<%s%sErrorLanguage>",
  1553.                                  p_prefix?p_prefix:"",
  1554.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1555.                            
  1556.                         start_input_str_len = axutil_strlen(start_input_str);
  1557.                         sprintf(end_input_str, "</%s%sErrorLanguage>",
  1558.                                  p_prefix?p_prefix:"",
  1559.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1560.                         end_input_str_len = axutil_strlen(end_input_str);
  1561.                    
  1562.                            text_value_2 = (axis2_char_t*)property_ErrorLanguage.c_str();
  1563.                            
  1564.                            axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
  1565.                            
  1566.                            
  1567.                            text_value_2_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_2, true);
  1568.                            if (text_value_2_temp)
  1569.                            {
  1570.                                axutil_stream_write(stream, Environment::getEnv(), text_value_2_temp, axutil_strlen(text_value_2_temp));
  1571.                                AXIS2_FREE(Environment::getEnv()->allocator, text_value_2_temp);
  1572.                            }
  1573.                            else
  1574.                            {
  1575.                                axutil_stream_write(stream, Environment::getEnv(), text_value_2, axutil_strlen(text_value_2));
  1576.                            }
  1577.                            
  1578.                            axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
  1579.                            
  1580.                      
  1581.                      AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  1582.                      AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  1583.                  }
  1584.  
  1585.                  
  1586.                        if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING)))
  1587.                        {
  1588.                            p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
  1589.                            sprintf(p_prefix, "n%d", (*next_ns_index)++);
  1590.                            axutil_hash_set(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING, p_prefix);
  1591.                            
  1592.                            axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
  1593.                                             "urn:ebay:apis:eBLBaseComponents", p_prefix));
  1594.                        }
  1595.                      
  1596.  
  1597.                    if (!isValidMessageID)
  1598.                    {
  1599.                      
  1600.                            /* no need to complain for minoccurs=0 element */
  1601.                            
  1602.                          
  1603.                    }
  1604.                    else
  1605.                    {
  1606.                      start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1607.                                  (4 + axutil_strlen(p_prefix) +
  1608.                                   axutil_strlen("MessageID")));
  1609.                                  
  1610.                                  /* axutil_strlen("<:>") + 1 = 4 */
  1611.                      end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1612.                                  (5 + axutil_strlen(p_prefix) + axutil_strlen("MessageID")));
  1613.                                   /* axutil_strlen("</:>") + 1 = 5 */
  1614.                                  
  1615.                      
  1616.  
  1617.                    
  1618.                    
  1619.                      
  1620.                      /*
  1621.                       * parsing MessageID element
  1622.                       */
  1623.  
  1624.                    
  1625.                    
  1626.                             sprintf(start_input_str, "<%s%sMessageID>",
  1627.                                  p_prefix?p_prefix:"",
  1628.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1629.                            
  1630.                         start_input_str_len = axutil_strlen(start_input_str);
  1631.                         sprintf(end_input_str, "</%s%sMessageID>",
  1632.                                  p_prefix?p_prefix:"",
  1633.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1634.                         end_input_str_len = axutil_strlen(end_input_str);
  1635.                    
  1636.                            text_value_3 = (axis2_char_t*)property_MessageID.c_str();
  1637.                            
  1638.                            axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
  1639.                            
  1640.                            
  1641.                            text_value_3_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_3, true);
  1642.                            if (text_value_3_temp)
  1643.                            {
  1644.                                axutil_stream_write(stream, Environment::getEnv(), text_value_3_temp, axutil_strlen(text_value_3_temp));
  1645.                                AXIS2_FREE(Environment::getEnv()->allocator, text_value_3_temp);
  1646.                            }
  1647.                            else
  1648.                            {
  1649.                                axutil_stream_write(stream, Environment::getEnv(), text_value_3, axutil_strlen(text_value_3));
  1650.                            }
  1651.                            
  1652.                            axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
  1653.                            
  1654.                      
  1655.                      AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  1656.                      AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  1657.                  }
  1658.  
  1659.                  
  1660.                        if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING)))
  1661.                        {
  1662.                            p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
  1663.                            sprintf(p_prefix, "n%d", (*next_ns_index)++);
  1664.                            axutil_hash_set(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING, p_prefix);
  1665.                            
  1666.                            axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
  1667.                                             "urn:ebay:apis:eBLBaseComponents", p_prefix));
  1668.                        }
  1669.                      
  1670.  
  1671.                    if (!isValidVersion)
  1672.                    {
  1673.                      
  1674.                            /* no need to complain for minoccurs=0 element */
  1675.                            
  1676.                          
  1677.                    }
  1678.                    else
  1679.                    {
  1680.                      start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1681.                                  (4 + axutil_strlen(p_prefix) +
  1682.                                   axutil_strlen("Version")));
  1683.                                  
  1684.                                  /* axutil_strlen("<:>") + 1 = 4 */
  1685.                      end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1686.                                  (5 + axutil_strlen(p_prefix) + axutil_strlen("Version")));
  1687.                                   /* axutil_strlen("</:>") + 1 = 5 */
  1688.                                  
  1689.                      
  1690.  
  1691.                    
  1692.                    
  1693.                      
  1694.                      /*
  1695.                       * parsing Version element
  1696.                       */
  1697.  
  1698.                    
  1699.                    
  1700.                             sprintf(start_input_str, "<%s%sVersion>",
  1701.                                  p_prefix?p_prefix:"",
  1702.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1703.                            
  1704.                         start_input_str_len = axutil_strlen(start_input_str);
  1705.                         sprintf(end_input_str, "</%s%sVersion>",
  1706.                                  p_prefix?p_prefix:"",
  1707.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1708.                         end_input_str_len = axutil_strlen(end_input_str);
  1709.                    
  1710.                            text_value_4 = (axis2_char_t*)property_Version.c_str();
  1711.                            
  1712.                            axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
  1713.                            
  1714.                            
  1715.                            text_value_4_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_4, true);
  1716.                            if (text_value_4_temp)
  1717.                            {
  1718.                                axutil_stream_write(stream, Environment::getEnv(), text_value_4_temp, axutil_strlen(text_value_4_temp));
  1719.                                AXIS2_FREE(Environment::getEnv()->allocator, text_value_4_temp);
  1720.                            }
  1721.                            else
  1722.                            {
  1723.                                axutil_stream_write(stream, Environment::getEnv(), text_value_4, axutil_strlen(text_value_4));
  1724.                            }
  1725.                            
  1726.                            axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
  1727.                            
  1728.                      
  1729.                      AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  1730.                      AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  1731.                  }
  1732.  
  1733.                  
  1734.                        if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING)))
  1735.                        {
  1736.                            p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
  1737.                            sprintf(p_prefix, "n%d", (*next_ns_index)++);
  1738.                            axutil_hash_set(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING, p_prefix);
  1739.                            
  1740.                            axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
  1741.                                             "urn:ebay:apis:eBLBaseComponents", p_prefix));
  1742.                        }
  1743.                      
  1744.  
  1745.                    if (!isValidEndUserIP)
  1746.                    {
  1747.                      
  1748.                            /* no need to complain for minoccurs=0 element */
  1749.                            
  1750.                          
  1751.                    }
  1752.                    else
  1753.                    {
  1754.                      start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1755.                                  (4 + axutil_strlen(p_prefix) +
  1756.                                   axutil_strlen("EndUserIP")));
  1757.                                  
  1758.                                  /* axutil_strlen("<:>") + 1 = 4 */
  1759.                      end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1760.                                  (5 + axutil_strlen(p_prefix) + axutil_strlen("EndUserIP")));
  1761.                                   /* axutil_strlen("</:>") + 1 = 5 */
  1762.                                  
  1763.                      
  1764.  
  1765.                    
  1766.                    
  1767.                      
  1768.                      /*
  1769.                       * parsing EndUserIP element
  1770.                       */
  1771.  
  1772.                    
  1773.                    
  1774.                             sprintf(start_input_str, "<%s%sEndUserIP>",
  1775.                                  p_prefix?p_prefix:"",
  1776.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1777.                            
  1778.                         start_input_str_len = axutil_strlen(start_input_str);
  1779.                         sprintf(end_input_str, "</%s%sEndUserIP>",
  1780.                                  p_prefix?p_prefix:"",
  1781.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1782.                         end_input_str_len = axutil_strlen(end_input_str);
  1783.                    
  1784.                            text_value_5 = (axis2_char_t*)property_EndUserIP.c_str();
  1785.                            
  1786.                            axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
  1787.                            
  1788.                            
  1789.                            text_value_5_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_5, true);
  1790.                            if (text_value_5_temp)
  1791.                            {
  1792.                                axutil_stream_write(stream, Environment::getEnv(), text_value_5_temp, axutil_strlen(text_value_5_temp));
  1793.                                AXIS2_FREE(Environment::getEnv()->allocator, text_value_5_temp);
  1794.                            }
  1795.                            else
  1796.                            {
  1797.                                axutil_stream_write(stream, Environment::getEnv(), text_value_5, axutil_strlen(text_value_5));
  1798.                            }
  1799.                            
  1800.                            axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
  1801.                            
  1802.                      
  1803.                      AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  1804.                      AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  1805.                  }
  1806.  
  1807.                  
  1808.                        if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING)))
  1809.                        {
  1810.                            p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
  1811.                            sprintf(p_prefix, "n%d", (*next_ns_index)++);
  1812.                            axutil_hash_set(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING, p_prefix);
  1813.                            
  1814.                            axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
  1815.                                             "urn:ebay:apis:eBLBaseComponents", p_prefix));
  1816.                        }
  1817.                      
  1818.  
  1819.                    if (!isValidErrorHandling)
  1820.                    {
  1821.                      
  1822.                            /* no need to complain for minoccurs=0 element */
  1823.                            
  1824.                          
  1825.                    }
  1826.                    else
  1827.                    {
  1828.                      start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1829.                                  (4 + axutil_strlen(p_prefix) +
  1830.                                   axutil_strlen("ErrorHandling")));
  1831.                                  
  1832.                                  /* axutil_strlen("<:>") + 1 = 4 */
  1833.                      end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1834.                                  (5 + axutil_strlen(p_prefix) + axutil_strlen("ErrorHandling")));
  1835.                                   /* axutil_strlen("</:>") + 1 = 5 */
  1836.                                  
  1837.                      
  1838.  
  1839.                    
  1840.                    
  1841.                      
  1842.                      /*
  1843.                       * parsing ErrorHandling element
  1844.                       */
  1845.  
  1846.                    
  1847.                    
  1848.                             sprintf(start_input_str, "<%s%sErrorHandling",
  1849.                                  p_prefix?p_prefix:"",
  1850.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1851.                            
  1852.                         start_input_str_len = axutil_strlen(start_input_str);
  1853.                         sprintf(end_input_str, "</%s%sErrorHandling>",
  1854.                                  p_prefix?p_prefix:"",
  1855.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1856.                         end_input_str_len = axutil_strlen(end_input_str);
  1857.                      
  1858.                             if(!property_ErrorHandling->isParticle())
  1859.                             {
  1860.                                 axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
  1861.                             }
  1862.                             property_ErrorHandling->serialize(current_node, parent_element,
  1863.                                                                                  property_ErrorHandling->isParticle() || false, namespaces, next_ns_index);
  1864.                            
  1865.                             if(!property_ErrorHandling->isParticle())
  1866.                             {
  1867.                                 axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
  1868.                             }
  1869.                            
  1870.                      
  1871.                      AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  1872.                      AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  1873.                  }
  1874.  
  1875.                  
  1876.                        if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING)))
  1877.                        {
  1878.                            p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
  1879.                            sprintf(p_prefix, "n%d", (*next_ns_index)++);
  1880.                            axutil_hash_set(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING, p_prefix);
  1881.                            
  1882.                            axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
  1883.                                             "urn:ebay:apis:eBLBaseComponents", p_prefix));
  1884.                        }
  1885.                      
  1886.  
  1887.                    if (!isValidInvocationID)
  1888.                    {
  1889.                      
  1890.                            /* no need to complain for minoccurs=0 element */
  1891.                            
  1892.                          
  1893.                    }
  1894.                    else
  1895.                    {
  1896.                      start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1897.                                  (4 + axutil_strlen(p_prefix) +
  1898.                                   axutil_strlen("InvocationID")));
  1899.                                  
  1900.                                  /* axutil_strlen("<:>") + 1 = 4 */
  1901.                      end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1902.                                  (5 + axutil_strlen(p_prefix) + axutil_strlen("InvocationID")));
  1903.                                   /* axutil_strlen("</:>") + 1 = 5 */
  1904.                                  
  1905.                      
  1906.  
  1907.                    
  1908.                    
  1909.                      
  1910.                      /*
  1911.                       * parsing InvocationID element
  1912.                       */
  1913.  
  1914.                    
  1915.                    
  1916.                             sprintf(start_input_str, "<%s%sInvocationID",
  1917.                                  p_prefix?p_prefix:"",
  1918.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1919.                            
  1920.                         start_input_str_len = axutil_strlen(start_input_str);
  1921.                         sprintf(end_input_str, "</%s%sInvocationID>",
  1922.                                  p_prefix?p_prefix:"",
  1923.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1924.                         end_input_str_len = axutil_strlen(end_input_str);
  1925.                      
  1926.                             if(!property_InvocationID->isParticle())
  1927.                             {
  1928.                                 axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
  1929.                             }
  1930.                             property_InvocationID->serialize(current_node, parent_element,
  1931.                                                                                  property_InvocationID->isParticle() || false, namespaces, next_ns_index);
  1932.                            
  1933.                             if(!property_InvocationID->isParticle())
  1934.                             {
  1935.                                 axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
  1936.                             }
  1937.                            
  1938.                      
  1939.                      AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  1940.                      AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  1941.                  }
  1942.  
  1943.                  
  1944.                        if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING)))
  1945.                        {
  1946.                            p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
  1947.                            sprintf(p_prefix, "n%d", (*next_ns_index)++);
  1948.                            axutil_hash_set(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING, p_prefix);
  1949.                            
  1950.                            axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
  1951.                                             "urn:ebay:apis:eBLBaseComponents", p_prefix));
  1952.                        }
  1953.                      
  1954.  
  1955.                    if (!isValidOutputSelector)
  1956.                    {
  1957.                      
  1958.                            /* no need to complain for minoccurs=0 element */
  1959.                            
  1960.                          
  1961.                    }
  1962.                    else
  1963.                    {
  1964.                      start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1965.                                  (4 + axutil_strlen(p_prefix) +
  1966.                                   axutil_strlen("OutputSelector")));
  1967.                                  
  1968.                                  /* axutil_strlen("<:>") + 1 = 4 */
  1969.                      end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  1970.                                  (5 + axutil_strlen(p_prefix) + axutil_strlen("OutputSelector")));
  1971.                                   /* axutil_strlen("</:>") + 1 = 5 */
  1972.                                  
  1973.                      
  1974.  
  1975.                    
  1976.                    
  1977.                      /*
  1978.                       * Parsing OutputSelector array
  1979.                       */
  1980.                      if (property_OutputSelector != NULL)
  1981.                      {
  1982.                        
  1983.                             sprintf(start_input_str, "<%s%sOutputSelector>",
  1984.                                  p_prefix?p_prefix:"",
  1985.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1986.                            
  1987.                          start_input_str_len = axutil_strlen(start_input_str);
  1988.  
  1989.                          sprintf(end_input_str, "</%s%sOutputSelector>",
  1990.                                  p_prefix?p_prefix:"",
  1991.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  1992.                          end_input_str_len = axutil_strlen(end_input_str);
  1993.  
  1994.                          count = property_OutputSelector->size();
  1995.                          for(i = 0; i < count; i++)
  1996.                          {
  1997.                             std::string* element = (*property_OutputSelector)[i];
  1998.  
  1999.                             if(NULL == element)
  2000.                             {
  2001.                                 continue;
  2002.                             }
  2003.  
  2004.                    
  2005.                      
  2006.                      /*
  2007.                       * parsing OutputSelector element
  2008.                       */
  2009.  
  2010.                    
  2011.                    
  2012.                            text_value_8 = (axis2_char_t*)(*element).c_str();
  2013.                            
  2014.                            axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
  2015.                            
  2016.                            
  2017.                            text_value_8_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_8, true);
  2018.                            if (text_value_8_temp)
  2019.                            {
  2020.                                axutil_stream_write(stream, Environment::getEnv(), text_value_8_temp, axutil_strlen(text_value_8_temp));
  2021.                                AXIS2_FREE(Environment::getEnv()->allocator, text_value_8_temp);
  2022.                            }
  2023.                            else
  2024.                            {
  2025.                                axutil_stream_write(stream, Environment::getEnv(), text_value_8, axutil_strlen(text_value_8));
  2026.                            }
  2027.                            
  2028.                            axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
  2029.                            
  2030.                          }
  2031.                      }
  2032.                    
  2033.                      
  2034.                      AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  2035.                      AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  2036.                  }
  2037.  
  2038.                  
  2039.                        if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING)))
  2040.                        {
  2041.                            p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
  2042.                            sprintf(p_prefix, "n%d", (*next_ns_index)++);
  2043.                            axutil_hash_set(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING, p_prefix);
  2044.                            
  2045.                            axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
  2046.                                             "urn:ebay:apis:eBLBaseComponents", p_prefix));
  2047.                        }
  2048.                      
  2049.  
  2050.                    if (!isValidWarningLevel)
  2051.                    {
  2052.                      
  2053.                            /* no need to complain for minoccurs=0 element */
  2054.                            
  2055.                          
  2056.                    }
  2057.                    else
  2058.                    {
  2059.                      start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  2060.                                  (4 + axutil_strlen(p_prefix) +
  2061.                                   axutil_strlen("WarningLevel")));
  2062.                                  
  2063.                                  /* axutil_strlen("<:>") + 1 = 4 */
  2064.                      end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  2065.                                  (5 + axutil_strlen(p_prefix) + axutil_strlen("WarningLevel")));
  2066.                                   /* axutil_strlen("</:>") + 1 = 5 */
  2067.                                  
  2068.                      
  2069.  
  2070.                    
  2071.                    
  2072.                      
  2073.                      /*
  2074.                       * parsing WarningLevel element
  2075.                       */
  2076.  
  2077.                    
  2078.                    
  2079.                             sprintf(start_input_str, "<%s%sWarningLevel",
  2080.                                  p_prefix?p_prefix:"",
  2081.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  2082.                            
  2083.                         start_input_str_len = axutil_strlen(start_input_str);
  2084.                         sprintf(end_input_str, "</%s%sWarningLevel>",
  2085.                                  p_prefix?p_prefix:"",
  2086.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  2087.                         end_input_str_len = axutil_strlen(end_input_str);
  2088.                      
  2089.                             if(!property_WarningLevel->isParticle())
  2090.                             {
  2091.                                 axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
  2092.                             }
  2093.                             property_WarningLevel->serialize(current_node, parent_element,
  2094.                                                                                  property_WarningLevel->isParticle() || false, namespaces, next_ns_index);
  2095.                            
  2096.                             if(!property_WarningLevel->isParticle())
  2097.                             {
  2098.                                 axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
  2099.                             }
  2100.                            
  2101.                      
  2102.                      AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  2103.                      AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  2104.                  }
  2105.  
  2106.                  
  2107.                        if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING)))
  2108.                        {
  2109.                            p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
  2110.                            sprintf(p_prefix, "n%d", (*next_ns_index)++);
  2111.                            axutil_hash_set(namespaces, "urn:ebay:apis:eBLBaseComponents", AXIS2_HASH_KEY_STRING, p_prefix);
  2112.                            
  2113.                            axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
  2114.                                             "urn:ebay:apis:eBLBaseComponents", p_prefix));
  2115.                        }
  2116.                      
  2117.  
  2118.                    if (!isValidBotBlock)
  2119.                    {
  2120.                      
  2121.                            /* no need to complain for minoccurs=0 element */
  2122.                            
  2123.                          
  2124.                    }
  2125.                    else
  2126.                    {
  2127.                      start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  2128.                                  (4 + axutil_strlen(p_prefix) +
  2129.                                   axutil_strlen("BotBlock")));
  2130.                                  
  2131.                                  /* axutil_strlen("<:>") + 1 = 4 */
  2132.                      end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  2133.                                  (5 + axutil_strlen(p_prefix) + axutil_strlen("BotBlock")));
  2134.                                   /* axutil_strlen("</:>") + 1 = 5 */
  2135.                                  
  2136.                      
  2137.  
  2138.                    
  2139.                    
  2140.                      
  2141.                      /*
  2142.                       * parsing BotBlock element
  2143.                       */
  2144.  
  2145.                    
  2146.                    
  2147.                             sprintf(start_input_str, "<%s%sBotBlock",
  2148.                                  p_prefix?p_prefix:"",
  2149.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  2150.                            
  2151.                         start_input_str_len = axutil_strlen(start_input_str);
  2152.                         sprintf(end_input_str, "</%s%sBotBlock>",
  2153.                                  p_prefix?p_prefix:"",
  2154.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  2155.                         end_input_str_len = axutil_strlen(end_input_str);
  2156.                      
  2157.                             if(!property_BotBlock->isParticle())
  2158.                             {
  2159.                                 axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
  2160.                             }
  2161.                             property_BotBlock->serialize(current_node, parent_element,
  2162.                                                                                  property_BotBlock->isParticle() || false, namespaces, next_ns_index);
  2163.                            
  2164.                             if(!property_BotBlock->isParticle())
  2165.                             {
  2166.                                 axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
  2167.                             }
  2168.                            
  2169.                      
  2170.                      AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  2171.                      AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  2172.                  }
  2173.  
  2174.                  
  2175.                        p_prefix = NULL;
  2176.                      
  2177.  
  2178.                    if (!isValidExtraElement)
  2179.                    {
  2180.                      
  2181.                            /* no need to complain for minoccurs=0 element */
  2182.                            
  2183.                          
  2184.                    }
  2185.                    else
  2186.                    {
  2187.                      start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  2188.                                  (4 + axutil_strlen(p_prefix) +
  2189.                                   axutil_strlen("extraElement")));
  2190.                                  
  2191.                                  /* axutil_strlen("<:>") + 1 = 4 */
  2192.                      end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  2193.                                  (5 + axutil_strlen(p_prefix) + axutil_strlen("extraElement")));
  2194.                                   /* axutil_strlen("</:>") + 1 = 5 */
  2195.                                  
  2196.                      
  2197.  
  2198.                    
  2199.                    
  2200.                      /*
  2201.                       * Parsing ExtraElement array
  2202.                       */
  2203.                      if (property_ExtraElement != NULL)
  2204.                      {
  2205.                        
  2206.                             sprintf(start_input_str, "<%s%sextraElement>",
  2207.                                  p_prefix?p_prefix:"",
  2208.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  2209.                            
  2210.                          start_input_str_len = axutil_strlen(start_input_str);
  2211.  
  2212.                          sprintf(end_input_str, "</%s%sextraElement>",
  2213.                                  p_prefix?p_prefix:"",
  2214.                                  (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  2215.                          end_input_str_len = axutil_strlen(end_input_str);
  2216.  
  2217.                          count = property_ExtraElement->size();
  2218.                          for(i = 0; i < count; i++)
  2219.                          {
  2220.                             wso2wsf::OMElement* element = (*property_ExtraElement)[i];
  2221.  
  2222.                             if(NULL == element)
  2223.                             {
  2224.                                 continue;
  2225.                             }
  2226.  
  2227.                    
  2228.                      
  2229.                      /*
  2230.                       * parsing extraElement element
  2231.                       */
  2232.  
  2233.                    
  2234.                    
  2235.                                 std::string s = element->toString();
  2236.                                 text_value_11 = (axis2_char_t*)(s.c_str());
  2237.                                
  2238.                                 axutil_stream_write(stream, Environment::getEnv(), text_value_11, axutil_strlen(text_value_11));
  2239.                                
  2240.                          }
  2241.                      }
  2242.                    
  2243.                      
  2244.                      AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  2245.                      AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  2246.                  }
  2247.  
  2248.                  
  2249.  
  2250.             return parent;
  2251.         }
  2252.  
  2253.  
  2254.        
  2255.  
  2256.             /**
  2257.              * Getter for DetailLevel by  Property Number 1
  2258.              */
  2259.             std::vector<ns_trading_service::DetailLevelCodeType*>* WSF_CALL
  2260.             ns_trading_service::AbstractRequestType::getProperty1()
  2261.             {
  2262.                 return getDetailLevel();
  2263.             }
  2264.  
  2265.             /**
  2266.              * getter for DetailLevel.
  2267.              */
  2268.             std::vector<ns_trading_service::DetailLevelCodeType*>* WSF_CALL
  2269.             ns_trading_service::AbstractRequestType::getDetailLevel()
  2270.              {
  2271.                 return property_DetailLevel;
  2272.              }
  2273.  
  2274.             /**
  2275.              * setter for DetailLevel
  2276.              */
  2277.             bool WSF_CALL
  2278.             ns_trading_service::AbstractRequestType::setDetailLevel(
  2279.                     std::vector<ns_trading_service::DetailLevelCodeType*>*  arg_DetailLevel)
  2280.              {
  2281.                
  2282.                  int size = 0;
  2283.                  int i = 0;
  2284.                  bool non_nil_exists = false;
  2285.                
  2286.  
  2287.                 if(isValidDetailLevel &&
  2288.                         arg_DetailLevel == property_DetailLevel)
  2289.                 {
  2290.                    
  2291.                     return true;
  2292.                 }
  2293.  
  2294.                
  2295.                  size = arg_DetailLevel->size();
  2296.                  
  2297.                  if (size < 0)
  2298.                  {
  2299.                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"DetailLevel has less than minOccurs(0)");
  2300.                      return false;
  2301.                  }
  2302.                  for(i = 0; i < size; i ++ )
  2303.                  {
  2304.                      if(NULL != (*arg_DetailLevel)[i])
  2305.                      {
  2306.                          non_nil_exists = true;
  2307.                          break;
  2308.                      }
  2309.                  }
  2310.  
  2311.                  
  2312.  
  2313.                
  2314.                 resetDetailLevel();
  2315.  
  2316.                
  2317.                     if(NULL == arg_DetailLevel)
  2318.                          
  2319.                 {
  2320.                     /* We are already done */
  2321.                     return true;
  2322.                 }
  2323.                
  2324.                         property_DetailLevel = arg_DetailLevel;
  2325.                         if(non_nil_exists)
  2326.                         {
  2327.                             isValidDetailLevel = true;
  2328.                         }
  2329.                        
  2330.                    
  2331.                 return true;
  2332.              }
  2333.  
  2334.            
  2335.             /**
  2336.              * Get ith element of DetailLevel.
  2337.              */
  2338.             ns_trading_service::DetailLevelCodeType* WSF_CALL
  2339.             ns_trading_service::AbstractRequestType::getDetailLevelAt(int i)
  2340.             {
  2341.                 ns_trading_service::DetailLevelCodeType* ret_val;
  2342.                 if(property_DetailLevel == NULL)
  2343.                 {
  2344.                     return (ns_trading_service::DetailLevelCodeType*)0;
  2345.                 }
  2346.                 ret_val =   (*property_DetailLevel)[i];
  2347.                
  2348.                     return ret_val;
  2349.                  
  2350.             }
  2351.  
  2352.             /**
  2353.              * Set the ith element of DetailLevel.
  2354.              */
  2355.            bool WSF_CALL
  2356.             ns_trading_service::AbstractRequestType::setDetailLevelAt(int i,
  2357.                     ns_trading_service::DetailLevelCodeType* arg_DetailLevel)
  2358.             {
  2359.                  ns_trading_service::DetailLevelCodeType* element;
  2360.                 int size = 0;
  2361.  
  2362.                 int non_nil_count;
  2363.                 bool non_nil_exists = false;
  2364.  
  2365.                  
  2366.  
  2367.                 if( isValidDetailLevel &&
  2368.                     property_DetailLevel &&
  2369.                  
  2370.                     arg_DetailLevel == (*property_DetailLevel)[i])
  2371.                  
  2372.                  {
  2373.                    
  2374.                     return AXIS2_SUCCESS;
  2375.                 }
  2376.  
  2377.                    
  2378.                      non_nil_exists = true;
  2379.                  
  2380.  
  2381.                 if(property_DetailLevel == NULL)
  2382.                 {
  2383.                     property_DetailLevel = new std::vector<ns_trading_service::DetailLevelCodeType*>();
  2384.                 }
  2385.                 else{
  2386.                 /* check whether there already exist an element */
  2387.                 element = (*property_DetailLevel)[i];
  2388.                 }
  2389.  
  2390.                
  2391.                         if(NULL != element)
  2392.                         {
  2393.                          
  2394.                          
  2395.                          
  2396.                                 delete element;
  2397.                              
  2398.                         }
  2399.                        
  2400.                    
  2401.                     if(!non_nil_exists)
  2402.                     {
  2403.                        
  2404.                         isValidDetailLevel = true;
  2405.                         (*property_DetailLevel)[i]= NULL;
  2406.                        
  2407.                         return AXIS2_SUCCESS;
  2408.                     }
  2409.                
  2410.                     (*property_DetailLevel)[i] = arg_DetailLevel;
  2411.                  
  2412.  
  2413.                isValidDetailLevel = true;
  2414.                
  2415.                 return AXIS2_SUCCESS;
  2416.             }
  2417.  
  2418.             /**
  2419.              * Add to DetailLevel.
  2420.              */
  2421.             bool WSF_CALL
  2422.             ns_trading_service::AbstractRequestType::addDetailLevel(
  2423.                     ns_trading_service::DetailLevelCodeType* arg_DetailLevel)
  2424.              {
  2425.  
  2426.                
  2427.                     if( NULL == arg_DetailLevel
  2428.                      )
  2429.                     {
  2430.                      
  2431.                            return true;
  2432.                        
  2433.                     }
  2434.                  
  2435.  
  2436.                 if(property_DetailLevel == NULL)
  2437.                 {
  2438.                     property_DetailLevel = new std::vector<ns_trading_service::DetailLevelCodeType*>();
  2439.                 }
  2440.              
  2441.                property_DetailLevel->push_back(arg_DetailLevel);
  2442.              
  2443.                 isValidDetailLevel = true;
  2444.                 return true;
  2445.              }
  2446.  
  2447.             /**
  2448.              * Get the size of the DetailLevel array.
  2449.              */
  2450.             int WSF_CALL
  2451.             ns_trading_service::AbstractRequestType::sizeofDetailLevel()
  2452.             {
  2453.  
  2454.                 if(property_DetailLevel == NULL)
  2455.                 {
  2456.                     return 0;
  2457.                 }
  2458.                 return property_DetailLevel->size();
  2459.             }
  2460.  
  2461.             /**
  2462.              * remove the ith element, same as set_nil_at.
  2463.              */
  2464.             bool WSF_CALL
  2465.             ns_trading_service::AbstractRequestType::removeDetailLevelAt(int i)
  2466.             {
  2467.                 return setDetailLevelNilAt(i);
  2468.             }
  2469.  
  2470.            
  2471.  
  2472.            /**
  2473.             * resetter for DetailLevel
  2474.             */
  2475.            bool WSF_CALL
  2476.            ns_trading_service::AbstractRequestType::resetDetailLevel()
  2477.            {
  2478.                int i = 0;
  2479.                int count = 0;
  2480.  
  2481.  
  2482.                
  2483.                 if (property_DetailLevel != NULL)
  2484.                 {
  2485.                   std::vector<ns_trading_service::DetailLevelCodeType*>::iterator it =  property_DetailLevel->begin();
  2486.                   for( ; it <  property_DetailLevel->end() ; ++it)
  2487.                   {
  2488.                      ns_trading_service::DetailLevelCodeType* element = *it;
  2489.                
  2490.            
  2491.                
  2492.  
  2493.                 if(element != NULL)
  2494.                 {
  2495.                    
  2496.                    
  2497.                          delete  element;
  2498.                      
  2499.  
  2500.                    }
  2501.  
  2502.                
  2503.                
  2504.                
  2505.                }
  2506.  
  2507.              }
  2508.                
  2509.                     if(NULL != property_DetailLevel)
  2510.                  delete property_DetailLevel;
  2511.                
  2512.                isValidDetailLevel = false;
  2513.                return true;
  2514.            }
  2515.  
  2516.            /**
  2517.             * Check whether DetailLevel is nill
  2518.             */
  2519.            bool WSF_CALL
  2520.            ns_trading_service::AbstractRequestType::isDetailLevelNil()
  2521.            {
  2522.                return !isValidDetailLevel;
  2523.            }
  2524.  
  2525.            /**
  2526.             * Set DetailLevel to nill (currently the same as reset)
  2527.             */
  2528.            bool WSF_CALL
  2529.            ns_trading_service::AbstractRequestType::setDetailLevelNil()
  2530.            {
  2531.                return resetDetailLevel();
  2532.            }
  2533.  
  2534.            
  2535.            /**
  2536.             * Check whether DetailLevel is nill at i
  2537.             */
  2538.            bool WSF_CALL
  2539.            ns_trading_service::AbstractRequestType::isDetailLevelNilAt(int i)
  2540.            {
  2541.                return (isValidDetailLevel == false ||
  2542.                        NULL == property_DetailLevel ||
  2543.                      NULL == (*property_DetailLevel)[i]);
  2544.             }
  2545.  
  2546.            /**
  2547.             * Set DetailLevel to nil at i
  2548.             */
  2549.            bool WSF_CALL
  2550.            ns_trading_service::AbstractRequestType::setDetailLevelNilAt(int i)
  2551.            {
  2552.                 int size = 0;
  2553.                 int j;
  2554.                 bool non_nil_exists = false;
  2555.  
  2556.                 int k = 0;
  2557.  
  2558.                 if(property_DetailLevel == NULL ||
  2559.                             isValidDetailLevel == false)
  2560.                 {
  2561.                    
  2562.                     non_nil_exists = false;
  2563.                 }
  2564.                 else
  2565.                 {
  2566.                     size = property_DetailLevel->size();
  2567.                     for(j = 0, k = 0; j < size; j ++ )
  2568.                     {
  2569.                         if(i == j) continue;
  2570.                         if(NULL != (*property_DetailLevel)[i])
  2571.                         {
  2572.                             k++;
  2573.                             non_nil_exists = true;
  2574.                             if( k >= 0)
  2575.                             {
  2576.                                 break;
  2577.                             }
  2578.                         }
  2579.                     }
  2580.                 }
  2581.                
  2582.  
  2583.                 if( k < 0)
  2584.                 {
  2585.                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of DetailLevel is beinng set to be smaller than the specificed number of minOccurs(0)");
  2586.                        return AXIS2_FAILURE;
  2587.                 }
  2588.  
  2589.                 if(property_DetailLevel == NULL)
  2590.                 {
  2591.                     isValidDetailLevel = false;
  2592.                    
  2593.                     return true;
  2594.                 }
  2595.                  
  2596.                  /* check whether there already exist an element */
  2597.                  ns_trading_service::DetailLevelCodeType* element = (*property_DetailLevel)[i];
  2598.                 if(NULL != element)
  2599.                 {
  2600.                  
  2601.                  
  2602.                  
  2603.                         delete element;
  2604.                      
  2605.                  }
  2606.                  
  2607.                     if(!non_nil_exists)
  2608.                     {
  2609.                        
  2610.                         isValidDetailLevel = false;
  2611.                         (*property_DetailLevel)[i] = NULL;
  2612.                         return AXIS2_SUCCESS;
  2613.                     }
  2614.                
  2615.  
  2616.                
  2617.                 (*property_DetailLevel)[i] = NULL;
  2618.                
  2619.                 return AXIS2_SUCCESS;
  2620.  
  2621.            }
  2622.  
  2623.            
  2624.  
  2625.             /**
  2626.              * Getter for ErrorLanguage by  Property Number 2
  2627.              */
  2628.             std::string WSF_CALL
  2629.             ns_trading_service::AbstractRequestType::getProperty2()
  2630.             {
  2631.                 return getErrorLanguage();
  2632.             }
  2633.  
  2634.             /**
  2635.              * getter for ErrorLanguage.
  2636.              */
  2637.             std::string WSF_CALL
  2638.             ns_trading_service::AbstractRequestType::getErrorLanguage()
  2639.              {
  2640.                 return property_ErrorLanguage;
  2641.              }
  2642.  
  2643.             /**
  2644.              * setter for ErrorLanguage
  2645.              */
  2646.             bool WSF_CALL
  2647.             ns_trading_service::AbstractRequestType::setErrorLanguage(
  2648.                     const std::string  arg_ErrorLanguage)
  2649.              {
  2650.                
  2651.  
  2652.                 if(isValidErrorLanguage &&
  2653.                         arg_ErrorLanguage == property_ErrorLanguage)
  2654.                 {
  2655.                    
  2656.                     return true;
  2657.                 }
  2658.  
  2659.                
  2660.  
  2661.                
  2662.                 resetErrorLanguage();
  2663.  
  2664.                
  2665.                         property_ErrorLanguage = std::string(arg_ErrorLanguage.c_str());
  2666.                         isValidErrorLanguage = true;
  2667.                    
  2668.                 return true;
  2669.              }
  2670.  
  2671.              
  2672.  
  2673.            /**
  2674.             * resetter for ErrorLanguage
  2675.             */
  2676.            bool WSF_CALL
  2677.            ns_trading_service::AbstractRequestType::resetErrorLanguage()
  2678.            {
  2679.                int i = 0;
  2680.                int count = 0;
  2681.  
  2682.  
  2683.                
  2684.                isValidErrorLanguage = false;
  2685.                return true;
  2686.            }
  2687.  
  2688.            /**
  2689.             * Check whether ErrorLanguage is nill
  2690.             */
  2691.            bool WSF_CALL
  2692.            ns_trading_service::AbstractRequestType::isErrorLanguageNil()
  2693.            {
  2694.                return !isValidErrorLanguage;
  2695.            }
  2696.  
  2697.            /**
  2698.             * Set ErrorLanguage to nill (currently the same as reset)
  2699.             */
  2700.            bool WSF_CALL
  2701.            ns_trading_service::AbstractRequestType::setErrorLanguageNil()
  2702.            {
  2703.                return resetErrorLanguage();
  2704.            }
  2705.  
  2706.            
  2707.  
  2708.             /**
  2709.              * Getter for MessageID by  Property Number 3
  2710.              */
  2711.             std::string WSF_CALL
  2712.             ns_trading_service::AbstractRequestType::getProperty3()
  2713.             {
  2714.                 return getMessageID();
  2715.             }
  2716.  
  2717.             /**
  2718.              * getter for MessageID.
  2719.              */
  2720.             std::string WSF_CALL
  2721.             ns_trading_service::AbstractRequestType::getMessageID()
  2722.              {
  2723.                 return property_MessageID;
  2724.              }
  2725.  
  2726.             /**
  2727.              * setter for MessageID
  2728.              */
  2729.             bool WSF_CALL
  2730.             ns_trading_service::AbstractRequestType::setMessageID(
  2731.                     const std::string  arg_MessageID)
  2732.              {
  2733.                
  2734.  
  2735.                 if(isValidMessageID &&
  2736.                         arg_MessageID == property_MessageID)
  2737.                 {
  2738.                    
  2739.                     return true;
  2740.                 }
  2741.  
  2742.                
  2743.  
  2744.                
  2745.                 resetMessageID();
  2746.  
  2747.                
  2748.                         property_MessageID = std::string(arg_MessageID.c_str());
  2749.                         isValidMessageID = true;
  2750.                    
  2751.                 return true;
  2752.              }
  2753.  
  2754.              
  2755.  
  2756.            /**
  2757.             * resetter for MessageID
  2758.             */
  2759.            bool WSF_CALL
  2760.            ns_trading_service::AbstractRequestType::resetMessageID()
  2761.            {
  2762.                int i = 0;
  2763.                int count = 0;
  2764.  
  2765.  
  2766.                
  2767.                isValidMessageID = false;
  2768.                return true;
  2769.            }
  2770.  
  2771.            /**
  2772.             * Check whether MessageID is nill
  2773.             */
  2774.            bool WSF_CALL
  2775.            ns_trading_service::AbstractRequestType::isMessageIDNil()
  2776.            {
  2777.                return !isValidMessageID;
  2778.            }
  2779.  
  2780.            /**
  2781.             * Set MessageID to nill (currently the same as reset)
  2782.             */
  2783.            bool WSF_CALL
  2784.            ns_trading_service::AbstractRequestType::setMessageIDNil()
  2785.            {
  2786.                return resetMessageID();
  2787.            }
  2788.  
  2789.            
  2790.  
  2791.             /**
  2792.              * Getter for Version by  Property Number 4
  2793.              */
  2794.             std::string WSF_CALL
  2795.             ns_trading_service::AbstractRequestType::getProperty4()
  2796.             {
  2797.                 return getVersion();
  2798.             }
  2799.  
  2800.             /**
  2801.              * getter for Version.
  2802.              */
  2803.             std::string WSF_CALL
  2804.             ns_trading_service::AbstractRequestType::getVersion()
  2805.              {
  2806.                 return property_Version;
  2807.              }
  2808.  
  2809.             /**
  2810.              * setter for Version
  2811.              */
  2812.             bool WSF_CALL
  2813.             ns_trading_service::AbstractRequestType::setVersion(
  2814.                     const std::string  arg_Version)
  2815.              {
  2816.                
  2817.  
  2818.                 if(isValidVersion &&
  2819.                         arg_Version == property_Version)
  2820.                 {
  2821.                    
  2822.                     return true;
  2823.                 }
  2824.  
  2825.                
  2826.  
  2827.                
  2828.                 resetVersion();
  2829.  
  2830.                
  2831.                         property_Version = std::string(arg_Version.c_str());
  2832.                         isValidVersion = true;
  2833.                    
  2834.                 return true;
  2835.              }
  2836.  
  2837.              
  2838.  
  2839.            /**
  2840.             * resetter for Version
  2841.             */
  2842.            bool WSF_CALL
  2843.            ns_trading_service::AbstractRequestType::resetVersion()
  2844.            {
  2845.                int i = 0;
  2846.                int count = 0;
  2847.  
  2848.  
  2849.                
  2850.                isValidVersion = false;
  2851.                return true;
  2852.            }
  2853.  
  2854.            /**
  2855.             * Check whether Version is nill
  2856.             */
  2857.            bool WSF_CALL
  2858.            ns_trading_service::AbstractRequestType::isVersionNil()
  2859.            {
  2860.                return !isValidVersion;
  2861.            }
  2862.  
  2863.            /**
  2864.             * Set Version to nill (currently the same as reset)
  2865.             */
  2866.            bool WSF_CALL
  2867.            ns_trading_service::AbstractRequestType::setVersionNil()
  2868.            {
  2869.                return resetVersion();
  2870.            }
  2871.  
  2872.            
  2873.  
  2874.             /**
  2875.              * Getter for EndUserIP by  Property Number 5
  2876.              */
  2877.             std::string WSF_CALL
  2878.             ns_trading_service::AbstractRequestType::getProperty5()
  2879.             {
  2880.                 return getEndUserIP();
  2881.             }
  2882.  
  2883.             /**
  2884.              * getter for EndUserIP.
  2885.              */
  2886.             std::string WSF_CALL
  2887.             ns_trading_service::AbstractRequestType::getEndUserIP()
  2888.              {
  2889.                 return property_EndUserIP;
  2890.              }
  2891.  
  2892.             /**
  2893.              * setter for EndUserIP
  2894.              */
  2895.             bool WSF_CALL
  2896.             ns_trading_service::AbstractRequestType::setEndUserIP(
  2897.                     const std::string  arg_EndUserIP)
  2898.              {
  2899.                
  2900.  
  2901.                 if(isValidEndUserIP &&
  2902.                         arg_EndUserIP == property_EndUserIP)
  2903.                 {
  2904.                    
  2905.                     return true;
  2906.                 }
  2907.  
  2908.                
  2909.  
  2910.                
  2911.                 resetEndUserIP();
  2912.  
  2913.                
  2914.                         property_EndUserIP = std::string(arg_EndUserIP.c_str());
  2915.                         isValidEndUserIP = true;
  2916.                    
  2917.                 return true;
  2918.              }
  2919.  
  2920.              
  2921.  
  2922.            /**
  2923.             * resetter for EndUserIP
  2924.             */
  2925.            bool WSF_CALL
  2926.            ns_trading_service::AbstractRequestType::resetEndUserIP()
  2927.            {
  2928.                int i = 0;
  2929.                int count = 0;
  2930.  
  2931.  
  2932.                
  2933.                isValidEndUserIP = false;
  2934.                return true;
  2935.            }
  2936.  
  2937.            /**
  2938.             * Check whether EndUserIP is nill
  2939.             */
  2940.            bool WSF_CALL
  2941.            ns_trading_service::AbstractRequestType::isEndUserIPNil()
  2942.            {
  2943.                return !isValidEndUserIP;
  2944.            }
  2945.  
  2946.            /**
  2947.             * Set EndUserIP to nill (currently the same as reset)
  2948.             */
  2949.            bool WSF_CALL
  2950.            ns_trading_service::AbstractRequestType::setEndUserIPNil()
  2951.            {
  2952.                return resetEndUserIP();
  2953.            }
  2954.  
  2955.            
  2956.  
  2957.             /**
  2958.              * Getter for ErrorHandling by  Property Number 6
  2959.              */
  2960.             ns_trading_service::ErrorHandlingCodeType* WSF_CALL
  2961.             ns_trading_service::AbstractRequestType::getProperty6()
  2962.             {
  2963.                 return getErrorHandling();
  2964.             }
  2965.  
  2966.             /**
  2967.              * getter for ErrorHandling.
  2968.              */
  2969.             ns_trading_service::ErrorHandlingCodeType* WSF_CALL
  2970.             ns_trading_service::AbstractRequestType::getErrorHandling()
  2971.              {
  2972.                 return property_ErrorHandling;
  2973.              }
  2974.  
  2975.             /**
  2976.              * setter for ErrorHandling
  2977.              */
  2978.             bool WSF_CALL
  2979.             ns_trading_service::AbstractRequestType::setErrorHandling(
  2980.                     ns_trading_service::ErrorHandlingCodeType*  arg_ErrorHandling)
  2981.              {
  2982.                
  2983.  
  2984.                 if(isValidErrorHandling &&
  2985.                         arg_ErrorHandling == property_ErrorHandling)
  2986.                 {
  2987.                    
  2988.                     return true;
  2989.                 }
  2990.  
  2991.                
  2992.  
  2993.                
  2994.                 resetErrorHandling();
  2995.  
  2996.                
  2997.                     if(NULL == arg_ErrorHandling)
  2998.                          
  2999.                 {
  3000.                     /* We are already done */
  3001.                     return true;
  3002.                 }
  3003.                
  3004.                         property_ErrorHandling = arg_ErrorHandling;
  3005.                         isValidErrorHandling = true;
  3006.                    
  3007.                 return true;
  3008.              }
  3009.  
  3010.              
  3011.  
  3012.            /**
  3013.             * resetter for ErrorHandling
  3014.             */
  3015.            bool WSF_CALL
  3016.            ns_trading_service::AbstractRequestType::resetErrorHandling()
  3017.            {
  3018.                int i = 0;
  3019.                int count = 0;
  3020.  
  3021.  
  3022.                
  3023.            
  3024.                
  3025.  
  3026.                 if(property_ErrorHandling != NULL)
  3027.                 {
  3028.                    
  3029.                    
  3030.                          delete  property_ErrorHandling;
  3031.                      
  3032.  
  3033.                    }
  3034.  
  3035.                
  3036.                
  3037.                
  3038.                isValidErrorHandling = false;
  3039.                return true;
  3040.            }
  3041.  
  3042.            /**
  3043.             * Check whether ErrorHandling is nill
  3044.             */
  3045.            bool WSF_CALL
  3046.            ns_trading_service::AbstractRequestType::isErrorHandlingNil()
  3047.            {
  3048.                return !isValidErrorHandling;
  3049.            }
  3050.  
  3051.            /**
  3052.             * Set ErrorHandling to nill (currently the same as reset)
  3053.             */
  3054.            bool WSF_CALL
  3055.            ns_trading_service::AbstractRequestType::setErrorHandlingNil()
  3056.            {
  3057.                return resetErrorHandling();
  3058.            }
  3059.  
  3060.            
  3061.  
  3062.             /**
  3063.              * Getter for InvocationID by  Property Number 7
  3064.              */
  3065.             ns_trading_service::UUIDType* WSF_CALL
  3066.             ns_trading_service::AbstractRequestType::getProperty7()
  3067.             {
  3068.                 return getInvocationID();
  3069.             }
  3070.  
  3071.             /**
  3072.              * getter for InvocationID.
  3073.              */
  3074.             ns_trading_service::UUIDType* WSF_CALL
  3075.             ns_trading_service::AbstractRequestType::getInvocationID()
  3076.              {
  3077.                 return property_InvocationID;
  3078.              }
  3079.  
  3080.             /**
  3081.              * setter for InvocationID
  3082.              */
  3083.             bool WSF_CALL
  3084.             ns_trading_service::AbstractRequestType::setInvocationID(
  3085.                     ns_trading_service::UUIDType*  arg_InvocationID)
  3086.              {
  3087.                
  3088.  
  3089.                 if(isValidInvocationID &&
  3090.                         arg_InvocationID == property_InvocationID)
  3091.                 {
  3092.                    
  3093.                     return true;
  3094.                 }
  3095.  
  3096.                
  3097.  
  3098.                
  3099.                 resetInvocationID();
  3100.  
  3101.                
  3102.                     if(NULL == arg_InvocationID)
  3103.                          
  3104.                 {
  3105.                     /* We are already done */
  3106.                     return true;
  3107.                 }
  3108.                
  3109.                         property_InvocationID = arg_InvocationID;
  3110.                         isValidInvocationID = true;
  3111.                    
  3112.                 return true;
  3113.              }
  3114.  
  3115.              
  3116.  
  3117.            /**
  3118.             * resetter for InvocationID
  3119.             */
  3120.            bool WSF_CALL
  3121.            ns_trading_service::AbstractRequestType::resetInvocationID()
  3122.            {
  3123.                int i = 0;
  3124.                int count = 0;
  3125.  
  3126.  
  3127.                
  3128.            
  3129.                
  3130.  
  3131.                 if(property_InvocationID != NULL)
  3132.                 {
  3133.                    
  3134.                    
  3135.                          delete  property_InvocationID;
  3136.                      
  3137.  
  3138.                    }
  3139.  
  3140.                
  3141.                
  3142.                
  3143.                isValidInvocationID = false;
  3144.                return true;
  3145.            }
  3146.  
  3147.            /**
  3148.             * Check whether InvocationID is nill
  3149.             */
  3150.            bool WSF_CALL
  3151.            ns_trading_service::AbstractRequestType::isInvocationIDNil()
  3152.            {
  3153.                return !isValidInvocationID;
  3154.            }
  3155.  
  3156.            /**
  3157.             * Set InvocationID to nill (currently the same as reset)
  3158.             */
  3159.            bool WSF_CALL
  3160.            ns_trading_service::AbstractRequestType::setInvocationIDNil()
  3161.            {
  3162.                return resetInvocationID();
  3163.            }
  3164.  
  3165.            
  3166.  
  3167.             /**
  3168.              * Getter for OutputSelector by  Property Number 8
  3169.              */
  3170.             std::vector<std::string*>* WSF_CALL
  3171.             ns_trading_service::AbstractRequestType::getProperty8()
  3172.             {
  3173.                 return getOutputSelector();
  3174.             }
  3175.  
  3176.             /**
  3177.              * getter for OutputSelector.
  3178.              */
  3179.             std::vector<std::string*>* WSF_CALL
  3180.             ns_trading_service::AbstractRequestType::getOutputSelector()
  3181.              {
  3182.                 return property_OutputSelector;
  3183.              }
  3184.  
  3185.             /**
  3186.              * setter for OutputSelector
  3187.              */
  3188.             bool WSF_CALL
  3189.             ns_trading_service::AbstractRequestType::setOutputSelector(
  3190.                     std::vector<std::string*>*  arg_OutputSelector)
  3191.              {
  3192.                
  3193.                  int size = 0;
  3194.                  int i = 0;
  3195.                  bool non_nil_exists = false;
  3196.                
  3197.  
  3198.                 if(isValidOutputSelector &&
  3199.                         arg_OutputSelector == property_OutputSelector)
  3200.                 {
  3201.                    
  3202.                     return true;
  3203.                 }
  3204.  
  3205.                
  3206.                  size = arg_OutputSelector->size();
  3207.                  
  3208.                  if (size < 0)
  3209.                  {
  3210.                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"OutputSelector has less than minOccurs(0)");
  3211.                      return false;
  3212.                  }
  3213.                  for(i = 0; i < size; i ++ )
  3214.                  {
  3215.                      if(NULL != (*arg_OutputSelector)[i])
  3216.                      {
  3217.                          non_nil_exists = true;
  3218.                          break;
  3219.                      }
  3220.                  }
  3221.  
  3222.                  
  3223.  
  3224.                
  3225.                 resetOutputSelector();
  3226.  
  3227.                
  3228.                     if(NULL == arg_OutputSelector)
  3229.                          
  3230.                 {
  3231.                     /* We are already done */
  3232.                     return true;
  3233.                 }
  3234.                
  3235.                         property_OutputSelector = arg_OutputSelector;
  3236.                         if(non_nil_exists)
  3237.                         {
  3238.                             isValidOutputSelector = true;
  3239.                         }
  3240.                        
  3241.                    
  3242.                 return true;
  3243.              }
  3244.  
  3245.            
  3246.             /**
  3247.              * Get ith element of OutputSelector.
  3248.              */
  3249.             std::string WSF_CALL
  3250.             ns_trading_service::AbstractRequestType::getOutputSelectorAt(int i)
  3251.             {
  3252.                 std::string* ret_val;
  3253.                 if(property_OutputSelector == NULL)
  3254.                 {
  3255.                     return (std::string)0;
  3256.                 }
  3257.                 ret_val =   (*property_OutputSelector)[i];
  3258.                
  3259.                     if(ret_val)
  3260.                     {
  3261.                         return *ret_val;
  3262.                     }
  3263.                     return (std::string)0;
  3264.                  
  3265.             }
  3266.  
  3267.             /**
  3268.              * Set the ith element of OutputSelector.
  3269.              */
  3270.            bool WSF_CALL
  3271.             ns_trading_service::AbstractRequestType::setOutputSelectorAt(int i,
  3272.                     const std::string arg_OutputSelector)
  3273.             {
  3274.                  std::string* element;
  3275.                 int size = 0;
  3276.  
  3277.                 int non_nil_count;
  3278.                 bool non_nil_exists = false;
  3279.  
  3280.                  
  3281.  
  3282.                 if( isValidOutputSelector &&
  3283.                     property_OutputSelector &&
  3284.                  
  3285.                     arg_OutputSelector == *((*property_OutputSelector)[i]))
  3286.                  
  3287.                  {
  3288.                    
  3289.                     return AXIS2_SUCCESS;
  3290.                 }
  3291.  
  3292.                    
  3293.                      non_nil_exists = true;
  3294.                  
  3295.  
  3296.                 if(property_OutputSelector == NULL)
  3297.                 {
  3298.                     property_OutputSelector = new std::vector<std::string*>();
  3299.                 }
  3300.                 else{
  3301.                 /* check whether there already exist an element */
  3302.                 element = (*property_OutputSelector)[i];
  3303.                 }
  3304.  
  3305.                
  3306.                     if(!non_nil_exists)
  3307.                     {
  3308.                        
  3309.                         isValidOutputSelector = true;
  3310.                         (*property_OutputSelector)[i]= NULL;
  3311.                        
  3312.                         return AXIS2_SUCCESS;
  3313.                     }
  3314.                
  3315.                     (*property_OutputSelector)[i]= new string(arg_OutputSelector.c_str());
  3316.                  
  3317.  
  3318.                isValidOutputSelector = true;
  3319.                
  3320.                 return AXIS2_SUCCESS;
  3321.             }
  3322.  
  3323.             /**
  3324.              * Add to OutputSelector.
  3325.              */
  3326.             bool WSF_CALL
  3327.             ns_trading_service::AbstractRequestType::addOutputSelector(
  3328.                     const std::string arg_OutputSelector)
  3329.              {
  3330.  
  3331.                
  3332.                     if(
  3333.                       arg_OutputSelector.empty()
  3334.                        
  3335.                      )
  3336.                     {
  3337.                      
  3338.                            return true;
  3339.                        
  3340.                     }
  3341.                  
  3342.  
  3343.                 if(property_OutputSelector == NULL)
  3344.                 {
  3345.                     property_OutputSelector = new std::vector<std::string*>();
  3346.                 }
  3347.              
  3348.                property_OutputSelector->push_back(new string(arg_OutputSelector.c_str()));
  3349.              
  3350.                 isValidOutputSelector = true;
  3351.                 return true;
  3352.              }
  3353.  
  3354.             /**
  3355.              * Get the size of the OutputSelector array.
  3356.              */
  3357.             int WSF_CALL
  3358.             ns_trading_service::AbstractRequestType::sizeofOutputSelector()
  3359.             {
  3360.  
  3361.                 if(property_OutputSelector == NULL)
  3362.                 {
  3363.                     return 0;
  3364.                 }
  3365.                 return property_OutputSelector->size();
  3366.             }
  3367.  
  3368.             /**
  3369.              * remove the ith element, same as set_nil_at.
  3370.              */
  3371.             bool WSF_CALL
  3372.             ns_trading_service::AbstractRequestType::removeOutputSelectorAt(int i)
  3373.             {
  3374.                 return setOutputSelectorNilAt(i);
  3375.             }
  3376.  
  3377.            
  3378.  
  3379.            /**
  3380.             * resetter for OutputSelector
  3381.             */
  3382.            bool WSF_CALL
  3383.            ns_trading_service::AbstractRequestType::resetOutputSelector()
  3384.            {
  3385.                int i = 0;
  3386.                int count = 0;
  3387.  
  3388.  
  3389.                
  3390.                     if(NULL != property_OutputSelector)
  3391.                  delete property_OutputSelector;
  3392.                
  3393.                isValidOutputSelector = false;
  3394.                return true;
  3395.            }
  3396.  
  3397.            /**
  3398.             * Check whether OutputSelector is nill
  3399.             */
  3400.            bool WSF_CALL
  3401.            ns_trading_service::AbstractRequestType::isOutputSelectorNil()
  3402.            {
  3403.                return !isValidOutputSelector;
  3404.            }
  3405.  
  3406.            /**
  3407.             * Set OutputSelector to nill (currently the same as reset)
  3408.             */
  3409.            bool WSF_CALL
  3410.            ns_trading_service::AbstractRequestType::setOutputSelectorNil()
  3411.            {
  3412.                return resetOutputSelector();
  3413.            }
  3414.  
  3415.            
  3416.            /**
  3417.             * Check whether OutputSelector is nill at i
  3418.             */
  3419.            bool WSF_CALL
  3420.            ns_trading_service::AbstractRequestType::isOutputSelectorNilAt(int i)
  3421.            {
  3422.                return (isValidOutputSelector == false ||
  3423.                        NULL == property_OutputSelector ||
  3424.                      NULL == (*property_OutputSelector)[i]);
  3425.             }
  3426.  
  3427.            /**
  3428.             * Set OutputSelector to nil at i
  3429.             */
  3430.            bool WSF_CALL
  3431.            ns_trading_service::AbstractRequestType::setOutputSelectorNilAt(int i)
  3432.            {
  3433.                 int size = 0;
  3434.                 int j;
  3435.                 bool non_nil_exists = false;
  3436.  
  3437.                 int k = 0;
  3438.  
  3439.                 if(property_OutputSelector == NULL ||
  3440.                             isValidOutputSelector == false)
  3441.                 {
  3442.                    
  3443.                     non_nil_exists = false;
  3444.                 }
  3445.                 else
  3446.                 {
  3447.                     size = property_OutputSelector->size();
  3448.                     for(j = 0, k = 0; j < size; j ++ )
  3449.                     {
  3450.                         if(i == j) continue;
  3451.                         if(NULL != (*property_OutputSelector)[i])
  3452.                         {
  3453.                             k++;
  3454.                             non_nil_exists = true;
  3455.                             if( k >= 0)
  3456.                             {
  3457.                                 break;
  3458.                             }
  3459.                         }
  3460.                     }
  3461.                 }
  3462.                
  3463.  
  3464.                 if( k < 0)
  3465.                 {
  3466.                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of OutputSelector is beinng set to be smaller than the specificed number of minOccurs(0)");
  3467.                        return AXIS2_FAILURE;
  3468.                 }
  3469.  
  3470.                 if(property_OutputSelector == NULL)
  3471.                 {
  3472.                     isValidOutputSelector = false;
  3473.                    
  3474.                     return true;
  3475.                 }
  3476.                  
  3477.                     if(!non_nil_exists)
  3478.                     {
  3479.                        
  3480.                         isValidOutputSelector = false;
  3481.                         (*property_OutputSelector)[i] = NULL;
  3482.                         return AXIS2_SUCCESS;
  3483.                     }
  3484.                
  3485.  
  3486.                
  3487.                 (*property_OutputSelector)[i] = NULL;
  3488.                
  3489.                 return AXIS2_SUCCESS;
  3490.  
  3491.            }
  3492.  
  3493.            
  3494.  
  3495.             /**
  3496.              * Getter for WarningLevel by  Property Number 9
  3497.              */
  3498.             ns_trading_service::WarningLevelCodeType* WSF_CALL
  3499.             ns_trading_service::AbstractRequestType::getProperty9()
  3500.             {
  3501.                 return getWarningLevel();
  3502.             }
  3503.  
  3504.             /**
  3505.              * getter for WarningLevel.
  3506.              */
  3507.             ns_trading_service::WarningLevelCodeType* WSF_CALL
  3508.             ns_trading_service::AbstractRequestType::getWarningLevel()
  3509.              {
  3510.                 return property_WarningLevel;
  3511.              }
  3512.  
  3513.             /**
  3514.              * setter for WarningLevel
  3515.              */
  3516.             bool WSF_CALL
  3517.             ns_trading_service::AbstractRequestType::setWarningLevel(
  3518.                     ns_trading_service::WarningLevelCodeType*  arg_WarningLevel)
  3519.              {
  3520.                
  3521.  
  3522.                 if(isValidWarningLevel &&
  3523.                         arg_WarningLevel == property_WarningLevel)
  3524.                 {
  3525.                    
  3526.                     return true;
  3527.                 }
  3528.  
  3529.                
  3530.  
  3531.                
  3532.                 resetWarningLevel();
  3533.  
  3534.                
  3535.                     if(NULL == arg_WarningLevel)
  3536.                          
  3537.                 {
  3538.                     /* We are already done */
  3539.                     return true;
  3540.                 }
  3541.                
  3542.                         property_WarningLevel = arg_WarningLevel;
  3543.                         isValidWarningLevel = true;
  3544.                    
  3545.                 return true;
  3546.              }
  3547.  
  3548.              
  3549.  
  3550.            /**
  3551.             * resetter for WarningLevel
  3552.             */
  3553.            bool WSF_CALL
  3554.            ns_trading_service::AbstractRequestType::resetWarningLevel()
  3555.            {
  3556.                int i = 0;
  3557.                int count = 0;
  3558.  
  3559.  
  3560.                
  3561.            
  3562.                
  3563.  
  3564.                 if(property_WarningLevel != NULL)
  3565.                 {
  3566.                    
  3567.                    
  3568.                          delete  property_WarningLevel;
  3569.                      
  3570.  
  3571.                    }
  3572.  
  3573.                
  3574.                
  3575.                
  3576.                isValidWarningLevel = false;
  3577.                return true;
  3578.            }
  3579.  
  3580.            /**
  3581.             * Check whether WarningLevel is nill
  3582.             */
  3583.            bool WSF_CALL
  3584.            ns_trading_service::AbstractRequestType::isWarningLevelNil()
  3585.            {
  3586.                return !isValidWarningLevel;
  3587.            }
  3588.  
  3589.            /**
  3590.             * Set WarningLevel to nill (currently the same as reset)
  3591.             */
  3592.            bool WSF_CALL
  3593.            ns_trading_service::AbstractRequestType::setWarningLevelNil()
  3594.            {
  3595.                return resetWarningLevel();
  3596.            }
  3597.  
  3598.            
  3599.  
  3600.             /**
  3601.              * Getter for BotBlock by  Property Number 10
  3602.              */
  3603.             ns_trading_service::BotBlockRequestType* WSF_CALL
  3604.             ns_trading_service::AbstractRequestType::getProperty10()
  3605.             {
  3606.                 return getBotBlock();
  3607.             }
  3608.  
  3609.             /**
  3610.              * getter for BotBlock.
  3611.              */
  3612.             ns_trading_service::BotBlockRequestType* WSF_CALL
  3613.             ns_trading_service::AbstractRequestType::getBotBlock()
  3614.              {
  3615.                 return property_BotBlock;
  3616.              }
  3617.  
  3618.             /**
  3619.              * setter for BotBlock
  3620.              */
  3621.             bool WSF_CALL
  3622.             ns_trading_service::AbstractRequestType::setBotBlock(
  3623.                     ns_trading_service::BotBlockRequestType*  arg_BotBlock)
  3624.              {
  3625.                
  3626.  
  3627.                 if(isValidBotBlock &&
  3628.                         arg_BotBlock == property_BotBlock)
  3629.                 {
  3630.                    
  3631.                     return true;
  3632.                 }
  3633.  
  3634.                
  3635.  
  3636.                
  3637.                 resetBotBlock();
  3638.  
  3639.                
  3640.                     if(NULL == arg_BotBlock)
  3641.                          
  3642.                 {
  3643.                     /* We are already done */
  3644.                     return true;
  3645.                 }
  3646.                
  3647.                         property_BotBlock = arg_BotBlock;
  3648.                         isValidBotBlock = true;
  3649.                    
  3650.                 return true;
  3651.              }
  3652.  
  3653.              
  3654.  
  3655.            /**
  3656.             * resetter for BotBlock
  3657.             */
  3658.            bool WSF_CALL
  3659.            ns_trading_service::AbstractRequestType::resetBotBlock()
  3660.            {
  3661.                int i = 0;
  3662.                int count = 0;
  3663.  
  3664.  
  3665.                
  3666.            
  3667.                
  3668.  
  3669.                 if(property_BotBlock != NULL)
  3670.                 {
  3671.                    
  3672.                    
  3673.                          delete  property_BotBlock;
  3674.                      
  3675.  
  3676.                    }
  3677.  
  3678.                
  3679.                
  3680.                
  3681.                isValidBotBlock = false;
  3682.                return true;
  3683.            }
  3684.  
  3685.            /**
  3686.             * Check whether BotBlock is nill
  3687.             */
  3688.            bool WSF_CALL
  3689.            ns_trading_service::AbstractRequestType::isBotBlockNil()
  3690.            {
  3691.                return !isValidBotBlock;
  3692.            }
  3693.  
  3694.            /**
  3695.             * Set BotBlock to nill (currently the same as reset)
  3696.             */
  3697.            bool WSF_CALL
  3698.            ns_trading_service::AbstractRequestType::setBotBlockNil()
  3699.            {
  3700.                return resetBotBlock();
  3701.            }
  3702.  
  3703.            
  3704.  
  3705.             /**
  3706.              * Getter for extraElement by  Property Number 11
  3707.              */
  3708.             std::vector<wso2wsf::OMElement*>* WSF_CALL
  3709.             ns_trading_service::AbstractRequestType::getProperty11()
  3710.             {
  3711.                 return getExtraElement();
  3712.             }
  3713.  
  3714.             /**
  3715.              * getter for extraElement.
  3716.              */
  3717.             std::vector<wso2wsf::OMElement*>* WSF_CALL
  3718.             ns_trading_service::AbstractRequestType::getExtraElement()
  3719.              {
  3720.                 return property_ExtraElement;
  3721.              }
  3722.  
  3723.             /**
  3724.              * setter for extraElement
  3725.              */
  3726.             bool WSF_CALL
  3727.             ns_trading_service::AbstractRequestType::setExtraElement(
  3728.                     std::vector<wso2wsf::OMElement*>*  arg_ExtraElement)
  3729.              {
  3730.                
  3731.                  int size = 0;
  3732.                  int i = 0;
  3733.                  bool non_nil_exists = false;
  3734.                
  3735.  
  3736.                 if(isValidExtraElement &&
  3737.                         arg_ExtraElement == property_ExtraElement)
  3738.                 {
  3739.                    
  3740.                     return true;
  3741.                 }
  3742.  
  3743.                
  3744.                  size = arg_ExtraElement->size();
  3745.                  
  3746.                  if (size < 0)
  3747.                  {
  3748.                      WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"extraElement has less than minOccurs(0)");
  3749.                      return false;
  3750.                  }
  3751.                  for(i = 0; i < size; i ++ )
  3752.                  {
  3753.                      if(NULL != (*arg_ExtraElement)[i])
  3754.                      {
  3755.                          non_nil_exists = true;
  3756.                          break;
  3757.                      }
  3758.                  }
  3759.  
  3760.                  
  3761.  
  3762.                
  3763.                 resetExtraElement();
  3764.  
  3765.                
  3766.                     if(NULL == arg_ExtraElement)
  3767.                          
  3768.                 {
  3769.                     /* We are already done */
  3770.                     return true;
  3771.                 }
  3772.                
  3773.                         property_ExtraElement = arg_ExtraElement;
  3774.                         if(non_nil_exists)
  3775.                         {
  3776.                             isValidExtraElement = true;
  3777.                         }
  3778.                        
  3779.                    
  3780.                 return true;
  3781.              }
  3782.  
  3783.            
  3784.             /**
  3785.              * Get ith element of extraElement.
  3786.              */
  3787.             wso2wsf::OMElement* WSF_CALL
  3788.             ns_trading_service::AbstractRequestType::getExtraElementAt(int i)
  3789.             {
  3790.                 wso2wsf::OMElement* ret_val;
  3791.                 if(property_ExtraElement == NULL)
  3792.                 {
  3793.                     return (wso2wsf::OMElement*)0;
  3794.                 }
  3795.                 ret_val =   (*property_ExtraElement)[i];
  3796.                
  3797.                     return ret_val;
  3798.                  
  3799.             }
  3800.  
  3801.             /**
  3802.              * Set the ith element of extraElement.
  3803.              */
  3804.            bool WSF_CALL
  3805.             ns_trading_service::AbstractRequestType::setExtraElementAt(int i,
  3806.                     wso2wsf::OMElement* arg_ExtraElement)
  3807.             {
  3808.                  wso2wsf::OMElement* element;
  3809.                 int size = 0;
  3810.  
  3811.                 int non_nil_count;
  3812.                 bool non_nil_exists = false;
  3813.  
  3814.                  
  3815.  
  3816.                 if( isValidExtraElement &&
  3817.                     property_ExtraElement &&
  3818.                  
  3819.                     arg_ExtraElement == (*property_ExtraElement)[i])
  3820.                  
  3821.                  {
  3822.                    
  3823.                     return AXIS2_SUCCESS;
  3824.                 }
  3825.  
  3826.                    
  3827.                      non_nil_exists = true;
  3828.                  
  3829.  
  3830.                 if(property_ExtraElement == NULL)
  3831.                 {
  3832.                     property_ExtraElement = new std::vector<wso2wsf::OMElement*>();
  3833.                 }
  3834.                 else{
  3835.                 /* check whether there already exist an element */
  3836.                 element = (*property_ExtraElement)[i];
  3837.                 }
  3838.  
  3839.                
  3840.                         if(NULL != element)
  3841.                         {
  3842.                          
  3843.                          
  3844.                          
  3845.                                  // TODO Clear om Element
  3846.                                  delete element;
  3847.                              
  3848.                         }
  3849.                        
  3850.                    
  3851.                     if(!non_nil_exists)
  3852.                     {
  3853.                        
  3854.                         isValidExtraElement = true;
  3855.                         (*property_ExtraElement)[i]= NULL;
  3856.                        
  3857.                         return AXIS2_SUCCESS;
  3858.                     }
  3859.                
  3860.                     (*property_ExtraElement)[i] = arg_ExtraElement;
  3861.                  
  3862.  
  3863.                isValidExtraElement = true;
  3864.                
  3865.                 return AXIS2_SUCCESS;
  3866.             }
  3867.  
  3868.             /**
  3869.              * Add to extraElement.
  3870.              */
  3871.             bool WSF_CALL
  3872.             ns_trading_service::AbstractRequestType::addExtraElement(
  3873.                     wso2wsf::OMElement* arg_ExtraElement)
  3874.              {
  3875.  
  3876.                
  3877.                     if( NULL == arg_ExtraElement
  3878.                      )
  3879.                     {
  3880.                      
  3881.                            return true;
  3882.                        
  3883.                     }
  3884.                  
  3885.  
  3886.                 if(property_ExtraElement == NULL)
  3887.                 {
  3888.                     property_ExtraElement = new std::vector<wso2wsf::OMElement*>();
  3889.                 }
  3890.              
  3891.                property_ExtraElement->push_back(arg_ExtraElement);
  3892.              
  3893.                 isValidExtraElement = true;
  3894.                 return true;
  3895.              }
  3896.  
  3897.             /**
  3898.              * Get the size of the extraElement array.
  3899.              */
  3900.             int WSF_CALL
  3901.             ns_trading_service::AbstractRequestType::sizeofExtraElement()
  3902.             {
  3903.  
  3904.                 if(property_ExtraElement == NULL)
  3905.                 {
  3906.                     return 0;
  3907.                 }
  3908.                 return property_ExtraElement->size();
  3909.             }
  3910.  
  3911.             /**
  3912.              * remove the ith element, same as set_nil_at.
  3913.              */
  3914.             bool WSF_CALL
  3915.             ns_trading_service::AbstractRequestType::removeExtraElementAt(int i)
  3916.             {
  3917.                 return setExtraElementNilAt(i);
  3918.             }
  3919.  
  3920.            
  3921.  
  3922.            /**
  3923.             * resetter for extraElement
  3924.             */
  3925.            bool WSF_CALL
  3926.            ns_trading_service::AbstractRequestType::resetExtraElement()
  3927.            {
  3928.                int i = 0;
  3929.                int count = 0;
  3930.  
  3931.  
  3932.                
  3933.                 if (property_ExtraElement != NULL)
  3934.                 {
  3935.                   std::vector<wso2wsf::OMElement*>::iterator it =  property_ExtraElement->begin();
  3936.                   for( ; it <  property_ExtraElement->end() ; ++it)
  3937.                   {
  3938.                      wso2wsf::OMElement* element = *it;
  3939.                
  3940.            
  3941.                
  3942.  
  3943.                 if(element != NULL)
  3944.                 {
  3945.                    
  3946.                    
  3947.                         delete element;
  3948.                          element = NULL;
  3949.                      
  3950.  
  3951.                    }
  3952.  
  3953.                
  3954.                
  3955.                
  3956.                }
  3957.  
  3958.              }
  3959.                
  3960.                     if(NULL != property_ExtraElement)
  3961.                  delete property_ExtraElement;
  3962.                
  3963.                isValidExtraElement = false;
  3964.                return true;
  3965.            }
  3966.  
  3967.            /**
  3968.             * Check whether extraElement is nill
  3969.             */
  3970.            bool WSF_CALL
  3971.            ns_trading_service::AbstractRequestType::isExtraElementNil()
  3972.            {
  3973.                return !isValidExtraElement;
  3974.            }
  3975.  
  3976.            /**
  3977.             * Set extraElement to nill (currently the same as reset)
  3978.             */
  3979.            bool WSF_CALL
  3980.            ns_trading_service::AbstractRequestType::setExtraElementNil()
  3981.            {
  3982.                return resetExtraElement();
  3983.            }
  3984.  
  3985.            
  3986.            /**
  3987.             * Check whether extraElement is nill at i
  3988.             */
  3989.            bool WSF_CALL
  3990.            ns_trading_service::AbstractRequestType::isExtraElementNilAt(int i)
  3991.            {
  3992.                return (isValidExtraElement == false ||
  3993.                        NULL == property_ExtraElement ||
  3994.                      NULL == (*property_ExtraElement)[i]);
  3995.             }
  3996.  
  3997.            /**
  3998.             * Set extraElement to nil at i
  3999.             */
  4000.            bool WSF_CALL
  4001.            ns_trading_service::AbstractRequestType::setExtraElementNilAt(int i)
  4002.            {
  4003.                 int size = 0;
  4004.                 int j;
  4005.                 bool non_nil_exists = false;
  4006.  
  4007.                 int k = 0;
  4008.  
  4009.                 if(property_ExtraElement == NULL ||
  4010.                             isValidExtraElement == false)
  4011.                 {
  4012.                    
  4013.                     non_nil_exists = false;
  4014.                 }
  4015.                 else
  4016.                 {
  4017.                     size = property_ExtraElement->size();
  4018.                     for(j = 0, k = 0; j < size; j ++ )
  4019.                     {
  4020.                         if(i == j) continue;
  4021.                         if(NULL != (*property_ExtraElement)[i])
  4022.                         {
  4023.                             k++;
  4024.                             non_nil_exists = true;
  4025.                             if( k >= 0)
  4026.                             {
  4027.                                 break;
  4028.                             }
  4029.                         }
  4030.                     }
  4031.                 }
  4032.                
  4033.  
  4034.                 if( k < 0)
  4035.                 {
  4036.                        WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of extraElement is beinng set to be smaller than the specificed number of minOccurs(0)");
  4037.                        return AXIS2_FAILURE;
  4038.                 }
  4039.  
  4040.                 if(property_ExtraElement == NULL)
  4041.                 {
  4042.                     isValidExtraElement = false;
  4043.                    
  4044.                     return true;
  4045.                 }
  4046.                  
  4047.                  /* check whether there already exist an element */
  4048.                  wso2wsf::OMElement* element = (*property_ExtraElement)[i];
  4049.                 if(NULL != element)
  4050.                 {
  4051.                  
  4052.                  
  4053.                  
  4054.                      delete element;
  4055.                      
  4056.                  }
  4057.                  
  4058.                     if(!non_nil_exists)
  4059.                     {
  4060.                        
  4061.                         isValidExtraElement = false;
  4062.                         (*property_ExtraElement)[i] = NULL;
  4063.                         return AXIS2_SUCCESS;
  4064.                     }
  4065.                
  4066.  
  4067.                
  4068.                 (*property_ExtraElement)[i] = NULL;
  4069.                
  4070.                 return AXIS2_SUCCESS;
  4071.  
  4072.            }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement