Thanks, I found a paragraph to that effect on the bottom of this page a few
moments before I received your response:
http://jibx.sourceforge.net/tutorial/binding-advanced.html
This presents a little bit of a challenge for us. We're trying to work in a
"plugin" environment, a la Eclipse, so sometimes we're going to want to bind
to classes that already exist and cannot be changed (i.e. that have been
made available through other plugins that have no notion of XML and want to
keep it that way). We really do not want to be creating new versions of
these classes just to support XML binding, especially since they are also
annotated with JPA annotations for database persistence.
I am beginning to think that JiBX isn't the tool we should be using. I am
basically looking for something that can bind XML to Java objects but
doesn't require generation from Java files (because the same class might be
used several times) or from XSDs (because we don't have any and I don't want
to generate XSDs *and* binding files). JiBX seemed to make the most sense
and be the most flexible around in terms of the actual mapping ... except
that it requires the binary class files to be enhanced.
An alternative for us might be to use the bind on load facility - but what
is the likely over-head of using that compared to classes enhanced/created
by the binding compiler? Is it even possible?
Any thoughts appreciated. Thanks again.
Regards,
Brindy
On 06/02/07, venkateswarlu a <[EMAIL PROTECTED]> wrote:
we can use one concreate class for t wo binding files
we have to create two binding files and have to complie at atime
<binding name="binding1">
<mapping>.....</mapping>
<binding>
<binding name="binding2">
<mpping>...............</mapping>
<binding>
and comple two binding files ata time
and while getting binding factory
BindingFactory bf=BindingDirectory.getFactory(bindingname,classname); for
both the xmls
and do the marshal and Unmarshal
Regards
venkat annangi
On 2/6/07, Brindy <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've had a quick look through the archives but not managed to find
> anything that exactly matches my question, which is simply:
>
> Can a single concrete class be used by multiple bindings?
>
> For instance, I may have the following XML files:
>
> <customer-list>
>
> <customer>
> <name>Christopher Brind</name>
> <phone>0777 111 2222</phone>
> </customer>
>
> <customer>
> <name>Joe Blogs</name>
> <phone>0777 111 2222</phone>
> </customer>
>
> <customer>
> <name>Sammy Dow</name>
> <phone>0777 111 2222</phone>
> </customer>
>
> <customer>
> <name>Leo Vinci</name>
> <phone>0777 111 2222</phone>
> </customer>
>
> </customer-list>
>
> and in another XML file ...
>
> <order-details>
>
> <customer>
> <name>Leo Vinci</name>
> <phone>0777 111 2222</phone>
> </customer>
>
> <pick-list>
> <item name="Sigma Desk Lamp" aisle="12" location="15"/>
> </pick-list>
>
> </order-details>
>
> In both cases the customer part of the XML would map to a Customer
> class, something like:
>
> public class Customer {
>
> private String name;
> private String phone;
>
> // getters and setters left out ...
>
> }
>
> I imagine I would be creating a <mapping> for each of the above XML
> files. Since the JiBX binding compiler enhances the binary class file will
> one <mapping> aversely affect the binary of the other binding?
>
> I hope that's clear.
>
> Thanks in advance.
>
> Regards,
> Brindy
>
> -------------------------------------------------------------------------
> 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
> [email protected]
> https://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
[email protected]
https://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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users