I think I used cfloop. Basically <cfloop from="1" to="#arraylen(benefits)#" index="I">
Benefits[i].benefitType . etc. then you can do the same loop for the #arraylen(benefit[i].medcert)# From: [email protected] [mailto:[email protected]] On Behalf Of Ajas Mohammed Sent: Tuesday, September 17, 2013 12:43 PM To: [email protected] Subject: Re: [ACFUG Discuss] CF 10 webservice complex type within complex type Bill, Great suggestion. So lets say there are 3 benefits sent in webservice, can you think of how I could loop through them? I can get no of elements in benefits struct via StructCount is : #StructCount(benefits[1])# , which in this case gives me 3 because,#StructKeyList(benefits[1])# StructKeyList is - medcert,benefitType,benefitReferenceNumber Just wondering how would I check/loop if there is benefits[1], benefits[2], benefits[3]. I wouldnt know if 3 or 4 etc benefits were sent, so a dynamic approach would help. Thanks again, <Ajas Mohammed /> iUseDropbox( <http://db.tt/63Lvone9> http://db.tt/63Lvone9) http://ajashadi.blogspot.com We cannot become what we need to be, remaining what we are. No matter what, find a way. Because thats what winners do. You can't improve what you don't measure. Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives. On Tue, Sep 17, 2013 at 12:24 PM, Bill Beers <[email protected]> wrote: You should be able to access it as you expected. ComplexObj.benefits[x].medcert[i]."certfield" I did a similar service for products and skus. Regards, Bill From: [email protected] [mailto:[email protected]] On Behalf Of Ajas Mohammed Sent: Tuesday, September 17, 2013 12:12 PM To: [email protected] Subject: [ACFUG Discuss] CF 10 webservice complex type within complex type Hello everyone, I created a CF 10 webservice (attached code) that has complex type as one of the arguments. This complex type has another complex type in it. See attached code Overview : complextype.cfc is the actual webservice and then it has benefits complex type, which is benefits.cfc, and benefits.cfc has medcert complex type which is medcert.cfc . I am able to consume this webservice in CF 10 via Consume_fncomplextype_Soap2.cfm and all is good but question is how do I read/parse data from the complex type that has another complex type in it. I think it comes out as struct (within struct perhaps???) but I havent got chance to play with it. If anyone knows how to do this then let me know. Thanks, <Ajas Mohammed /> iUseDropbox( <http://db.tt/63Lvone9> http://db.tt/63Lvone9) http://ajashadi.blogspot.com We cannot become what we need to be, remaining what we are. No matter what, find a way. Because thats what winners do. You can't improve what you don't measure. Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives. ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> ------------------------------------------------------------- ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
