Hi Ernest,

I've seen this same problem come up in another context, with a client 
company using JiBX. For their case I recommended they bypass the 
collection handling by defining a set-method for the equivalent of the 
<carrier> elements in your example, and then have the set-method 
actually add the item to a collection each time it was called. This is a 
somewhat kludgey solution, though. I'm looking into making the case you 
have shown here work for the upcoming 1.1.1 release.

  - Dennis

Dennis M. Sosnoski
SOA, Web Services, and XML
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117



Ernest Rajakumar wrote:
> Hi,
> JiBX does not seem to permit flexible attribute on structures that contain 
> unnamed collection elements. I have huge list of JiBX mappings that use such 
> unnamed collection elements with embedded structure elements (please see 
> sample binding definition below). Is there are a way I can work around this 
> without needing to touch collection element line? 
> If the above is not possible, what would be the quickest change so that 
> flexible attribute can be used in the binding definition?
> Thanks,Ernest.
>
> Binding Definition:-------------------------------<binding>  <mapping 
> class="timetable" name="timetable">    <structure name="table" 
> usage="optioonal" ordered="false" flexible="true">      <value field="date" 
> name="date" usage="optional"/>      <value field="time" name="time" 
> usage="optional"/>      <collection field="carrierList" usage="optional">     
>     <structure name="carrier" type="timetabletablecarrier" usage="optional">  
>           <value field="code" name="code" style="attribute" 
> usage="optional"/>         </structure>     </collection>   </structure>  
> </mapping></binding>
> Error issued by JiBX binding compiler when “flexible” attribute was 
> introduced:-----------------------------------------------------------------------------------------------------------------
>  Error: All cchild components must define element names for flexible='true'; 
> on collection element at (line 6, col 54, in jibxflextest/binding.xml)
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!Fully 
> trained technicians. The highest number of Red Hat certifications inthe 
> hosting industry. Faanatical Support. Click to learn 
> morehttp://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642_______________________________________________jibx-users
>  mailing [EMAIL PROTECTED]://lists.sourceforge.net/lists/listinfo/jibx-users
>
>   

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to