Google Groups Home
Help | Sign in
problem with inout sequence of string
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Enos Meroka  
View profile  
 More options Feb 9 2005, 8:19 am
Newsgroups: comp.object.corba
From: en_mer...@yahoo.com (Enos Meroka)
Date: 9 Feb 2005 05:19:09 -0800
Local: Wed, Feb 9 2005 8:19 am
Subject: problem with inout sequence of string
Hallo,

Am working with Orbacus 4.2.x Corba C++, in a Unix environment.

Problem

with this IDL
===============================================
 typedef sequence<string> INSequence;
===============================================

in my application am calling a function that uses the INSequence above
as shown below
=======================================================================
        if(CORBA::is_nil(Account))
        {
          LogMessage(str_account + object_not_available_error_message);
          return str_error_return_value;
        }

        // in string parameters
        CORBA::String_var sqlAddCrit,bitmap;

        //initialise
        sqlAddCrit=CORBA::string_dup("");
        bitmap=CORBA::string_dup(in_bitmap.c_str());

        //out string
        CORBA::String_var cmdResult;

        //inout string
        CORBA::String_var nbstart;

        //initialise inout
        nbstart=CORBA::string_dup("");

        //inout sequence parameters and initialise
        inObject::INSequence_var  a_cursta = new inObject::INSequence;
a_cursta->length(1);
        inObject::INSequence_var  a_empty = new inObject::INSequence;
a_empty->length(1);
        inObject::INSequence_var  a_lock = new inObject::INSequence;
a_lock->length(1);
        inObject::INSequence_var  a_maxerr = new inObject::INSequence;
a_maxerr->length(1);
        inObject::INSequence_var  a_scsus = new inObject::INSequence;
a_scsus->length(1);
        inObject::INSequence_var  b_credcs = new inObject::INSequence;
b_credcs->length(1);
        inObject::INSequence_var  b_incom = new inObject::INSequence;
b_incom->length(1);
        inObject::INSequence_var  b_tanac = new inObject::INSequence;
b_tanac->length(1);
        inObject::INSequence_var  cc_cnt = new inObject::INSequence;
cc_cnt->length(1);
        inObject::INSequence_var  b_trbon = new inObject::INSequence;
b_trbon->length(1);
        inObject::INSequence_var  cc_date = new inObject::INSequence;
cc_date->length(1);
        inObject::INSequence_var  city_loc = new inObject::INSequence;
city_loc->length(1);
        inObject::INSequence_var  city_nbr = new inObject::INSequence;
city_nbr->length(1);
        inObject::INSequence_var  credit = new inObject::INSequence;
credit->length(1);
        inObject::INSequence_var  cs_freec = new inObject::INSequence;
cs_freec->length(1);
        inObject::INSequence_var  cs_lstd = new inObject::INSequence;
cs_lstd->length(1);
        inObject::INSequence_var  dynami_f = new inObject::INSequence;
dynami_f->length(1);
        inObject::INSequence_var  ff_flag = new inObject::INSequence;
ff_flag->length(1);
        inObject::INSequence_var  ff_group = new inObject::INSequence;
ff_group->length(1);
        inObject::INSequence_var  gprs = new inObject::INSequence;
gprs->length(1);
        inObject::INSequence_var  gprs_usr = new inObject::INSequence;
gprs_usr->length(1);
        inObject::INSequence_var  h_cscred = new inObject::INSequence;
h_cscred->length(1);
        inObject::INSequence_var  h_cscrep = new inObject::INSequence;
h_cscrep->length(1);
        inObject::INSequence_var  h_curmon = new inObject::INSequence;
h_curmon->length(1);
        inObject::INSequence_var  h_raz = new inObject::INSequence;
h_raz->length(1);
        inObject::INSequence_var  h_refill = new inObject::INSequence;
h_refill->length(1);
        inObject::INSequence_var  idx_hist = new inObject::INSequence;
idx_hist->length(1);
        inObject::INSequence_var  imsi = new inObject::INSequence;
imsi->length(1);
        inObject::INSequence_var  langcur = new inObject::INSequence;
langcur->length(1);
        inObject::INSequence_var  login = new inObject::INSequence;
login->length(1);
        inObject::INSequence_var  msisdn = new inObject::INSequence;
msisdn->length(9);
        inObject::INSequence_var  n_lip = new inObject::INSequence;
n_lip->length(1);
        inObject::INSequence_var  n_lip2 = new inObject::INSequence;
n_lip2->length(1);
        inObject::INSequence_var  n_lwlim = new inObject::INSequence;
n_lwlim->length(1);
        inObject::INSequence_var  n_lwlimc = new inObject::INSequence;
n_lwlimc->length(1);
        inObject::INSequence_var  n_raz = new inObject::INSequence;
n_raz->length(1);
        inObject::INSequence_var  n_refill = new inObject::INSequence;
n_refill->length(1);
        inObject::INSequence_var  n_uplim = new inObject::INSequence;
n_uplim->length(1);
        inObject::INSequence_var  n_uplimc = new inObject::INSequence;
n_uplimc->length(1);
        inObject::INSequence_var  next_fee = new inObject::INSequence;
next_fee->length(1);
        inObject::INSequence_var  nfirst = new inObject::INSequence;
nfirst->length(1);
        inObject::INSequence_var  nperiod = new inObject::INSequence;
nperiod->length(1);
        inObject::INSequence_var  number3 = new inObject::INSequence;
number3->length(1);
        inObject::INSequence_var  op_acdur = new inObject::INSequence;
op_acdur->length(1);
        inObject::INSequence_var  op_cred = new inObject::INSequence;
op_cred->length(1);
        inObject::INSequence_var  op_ddate = new inObject::INSequence;
op_ddate->length(1);
        inObject::INSequence_var  op_undur = new inObject::INSequence;
op_undur->length(1);
        inObject::INSequence_var  op2acdur = new inObject::INSequence;
op2acdur->length(1);
        inObject::INSequence_var  op2cred = new inObject::INSequence;
op2cred->length(1);
        inObject::INSequence_var  op2ddate = new inObject::INSequence;
op2ddate->length(1);
        inObject::INSequence_var  op2undur = new inObject::INSequence;
op2undur->length(1);
        inObject::INSequence_var  p_smscpt = new inObject::INSequence;
p_smscpt->length(1);
        inObject::INSequence_var  p_useend = new inObject::INSequence;
p_useend->length(1);
        inObject::INSequence_var  pin_f = new inObject::INSequence;
pin_f->length(1);
        inObject::INSequence_var  pin_nbr = new inObject::INSequence;
pin_nbr->length(1);
        inObject::INSequence_var  profile = new inObject::INSequence;
profile->length(1);
        inObject::INSequence_var  r_smscpt = new inObject::INSequence;
r_smscpt->length(1);
        inObject::INSequence_var  r_useend = new inObject::INSequence;
r_useend->length(1);
        inObject::INSequence_var  rateplan = new inObject::INSequence;
rateplan->length(1);
        inObject::INSequence_var  refill_e = new inObject::INSequence;
refill_e->length(1);
        inObject::INSequence_var  s_smscpt = new inObject::INSequence;
s_smscpt->length(1);
        inObject::INSequence_var  s_smsend = new inObject::INSequence;
s_smsend->length(1);
        inObject::INSequence_var  static_f = new inObject::INSequence;
static_f->length(1);
        inObject::INSequence_var  tac = new inObject::INSequence;
tac->length(1);
        inObject::INSequence_var  tb1 = new inObject::INSequence;
tb1->length(1);
        inObject::INSequence_var  tb2 = new inObject::INSequence;
tb2->length(1);
        inObject::INSequence_var  tbe = new inObject::INSequence;
tbe->length(1);
        inObject::INSequence_var  tcfaxda = new inObject::INSequence;
tcfaxda->length(1);
        inObject::INSequence_var  tend = new inObject::INSequence;
tend->length(1);
        inObject::INSequence_var  tmc = new inObject::INSequence;
tmc->length(1);
        inObject::INSequence_var  toterr = new inObject::INSequence;
toterr->length(1);
        inObject::INSequence_var  tr = new inObject::INSequence;
tr->length(1);

        //out sequence parameters
        inObject::INSequence_var rema_fee;

        //allocate msisdn
        msisdn[0] = CORBA::string_dup(in_msisdn.c_str());
        cout<<"Length of msisdn string: "<< msisdn->length()<<"Value:
"<<msisdn[0]<<endl;

        a_cursta[0] =  CORBA::string_dup("");
        a_empty[0] =  CORBA::string_dup("");
        a_lock[0] =  CORBA::string_dup("");
        a_maxerr[0] =  CORBA::string_dup("");
        a_scsus[0] =  CORBA::string_dup("");
        b_credcs[0] =  CORBA::string_dup("");
        b_incom[0] =  CORBA::string_dup("");
        b_tanac[0] =  CORBA::string_dup("");
        cc_cnt[0] =  CORBA::string_dup("");
        b_trbon[0] =  CORBA::string_dup("");
        cc_date[0] =  CORBA::string_dup("");
        city_loc[0] =  CORBA::string_dup("");
        city_nbr[0] =  CORBA::string_dup("");
        credit[0] =  CORBA::string_dup("");
        cs_freec[0] =  CORBA::string_dup("");
        cs_lstd[0] =  CORBA::string_dup("");
        dynami_f[0] =  CORBA::string_dup("");
        ff_flag[0] =  CORBA::string_dup("");
        ff_group[0] =  CORBA::string_dup("");
        gprs[0] =  CORBA::string_dup("");
        gprs_usr[0] =  CORBA::string_dup("");
        h_cscred[0] =  CORBA::string_dup("");
        h_cscrep[0] =  CORBA::string_dup("");
        h_curmon[0] =  CORBA::string_dup("");
        h_raz[0] =  CORBA::string_dup("");
        h_refill[0] =  CORBA::string_dup("");
        idx_hist[0] =  CORBA::string_dup("");
        imsi[0] =  CORBA::string_dup("");
        langcur[0] =  CORBA::string_dup("");
        login[0] =  CORBA::string_dup("");
        n_lip[0] =  CORBA::string_dup("");
        n_lip2[0] =  CORBA::string_dup("");
        n_lwlim[0] =  CORBA::string_dup("");
        n_lwlimc[0] =  CORBA::string_dup("");
        n_raz[0] =  CORBA::string_dup("");
        n_refill[0] =  CORBA::string_dup("");
        n_uplim[0] =  CORBA::string_dup("");
        n_uplimc[0] =  CORBA::string_dup("");
        next_fee[0] =  CORBA::string_dup("");
        nfirst[0] =  CORBA::string_dup("");
        nperiod[0] =  CORBA::string_dup("");
        number3[0] =  CORBA::string_dup("");
        op_acdur[0] =  CORBA::string_dup("");
        op_cred[0] =  CORBA::string_dup("");
        op_ddate[0] =  CORBA::string_dup("");
        op_undur[0] =  CORBA::string_dup("");
        op2acdur[0] =  CORBA::string_dup("");
        op2cred[0] =  CORBA::string_dup("");
        op2ddate[0] =  CORBA::string_dup("");
        op2undur[0] =  CORBA::string_dup("");
        p_smscpt[0] =  CORBA::string_dup("");
        p_useend[0] =  CORBA::string_dup("");
        pin_f[0] =  CORBA::string_dup("");
        pin_nbr[0] =  CORBA::string_dup("");
        profile[0] =  CORBA::string_dup("");
        r_smscpt[0] =  CORBA::string_dup("");
        r_useend[0] =  CORBA::string_dup("");
        rateplan[0] =  CORBA::string_dup("");
        refill_e[0] =  CORBA::string_dup("");
        s_smscpt[0] =  CORBA::string_dup("");
        s_smsend[0] =  CORBA::string_dup("");
        static_f[0] =  CORBA::string_dup("");
        tac[0] =  CORBA::string_dup("");
        tb1[0] =  CORBA::string_dup("");
        tb2[0] =  CORBA::string_dup("");
        tbe[0] =  CORBA::string_dup("");
        tcfaxda[0] =  CORBA::string_dup("");
        tend[0] =  CORBA::string_dup("");
        tmc[0] =  CORBA::string_dup("");
        toterr[0] =  CORBA::string_dup("");
        tr[0] =  CORBA::string_dup("");

        try
        {
                err.type = (constsOfRetValues)Account->list( a_cursta, a_empty,
a_lock, a_maxerr, a_scsus, b_credcs, b_incom, b_tanac, b_trbon,
cc_cnt, cc_date, city_loc, city_nbr, credit, cs_freec, cs_lstd,
dynami_f, ff_flag, ff_group, gprs, gprs_usr, h_cscred, h_cscrep,
h_curmon, ...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Smudge  
View profile  
 More options Feb 10 2005, 7:05 am
Newsgroups: comp.object.corba
From: "Smudge" <mu...@7northfield.com>
Date: 10 Feb 2005 04:05:19 -0800
Local: Thurs, Feb 10 2005 7:05 am
Subject: Re: problem with inout sequence of string
Very interesting. I am interested in why you have chosen to do it this
way instead of using a loop and an array of parameters?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
en_mer...@yahoo.com  
View profile  
 More options Feb 11 2005, 7:21 am
Newsgroups: comp.object.corba
From: en_mer...@yahoo.com
Date: 11 Feb 2005 04:21:17 -0800
Local: Fri, Feb 11 2005 7:21 am
Subject: Re: problem with inout sequence of string
The IDL provided specifies that I use inout sequence of strings. I
therefore thought that since am not aware of how many values i might
get from the server, use of unbounded sequences was the preferred
option.

However am open to other options,

Some one has suggested that my aproach is ok, how can I be sure that am
doing it the right way, coz am not getting any results from the server.

If you could provide some code examples of another approach, i will
appreciate.

Thanks


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
grahamo  
View profile  
 More options Feb 11 2005, 8:51 am
Newsgroups: comp.object.corba
From: graham_wals...@hotmail.com (grahamo)
Date: 11 Feb 2005 05:51:35 -0800
Local: Fri, Feb 11 2005 8:51 am
Subject: Re: problem with inout sequence of string
nothing like summarising your code in a terse, comprehensive message, eh Smudge?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google