Hi Arvind, You can use JiBX to bind existing domain objects to XML matching an existing schema, but it's going to require some work on your part.
The easiest way to start is probably by using CodeGen to generate a data model from your existing schema. This generated data model won't match your existing domain objects, of course, but it gives you a starting point. Then use CodeGen customizations to move the generated data model closer to your existing domain objects - so customize the generated package and class name to match your existing class, customize the property names to match your existing properties. Once you've got a match, you can ignore the generated classes and just use the generated binding with your existing classes. If it gets to the point where you can't use CodeGen customizations to create a match (for instance, when the data from a single schema type definition is split between different objects in your domain objects) you will need to just take the final generated binding and start modifying that by hand. In this case, the schema Element type is a subset of the data in your Holding class, so it should be easy to match these up - it doesn't even look like you'd need to customize the property names, since those already match. - Dennis Dennis M. Sosnoski XML and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Arvind S wrote: > Can someone please help me with how to configure JIBX to use custom > domain objects? > I am using JIBX along with AXIS2 in my web service client framework. > > Thanks > Arvind > > --- On *Thu, 3/25/10, Arvind S /<arvind2...@yahoo.com>/* wrote: > > > From: Arvind S <arvind2...@yahoo.com> > Subject: Using existing domain objects with JIBX 1.2.2 > To: jibx-users@lists.sourceforge.net > Date: Thursday, March 25, 2010, 5:53 PM > > Hi > > I am trying to use existing domain object model with the JIBX > 1.2.2 code gen utility. > However i am unable to create a customization that will allow > me to do the same > > Can you please help me with the same? This is urgent.. > The xsd and custom object that i am using for the Proof of > Concept are attached > > Thanks > Arvind > > > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ------------------------------------------------------------------------ > > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users