Gunther,
Thank you, it is now working using the second method you indicated. It
was not obvious to me that I could have multiple bindings in one file.
So, my binding.xml file is structured something like:
<binding name="bindingReportInput" direction="input" track-source="true">
<mapping name="report" class="xxx.Report">
<BIG SNIP/>
</mapping>
</binding>
<binding name="bindingReportOutput1" direction="output" track-source="true">
<mapping name="report" class="xxx.Report">
<BIG SNIP/>
</mapping>
</binding>
I am not sure if the track-source has any meaning for the output
direction, but nothing complained when simple cut and paste left it
unintentionally in there. I will remove it (and choose better names for
things as we get more serious.)
Really nice. Great tool.
Thank you again for the help (the "other" ingredient making for a great
tool),
Bill
Günther Wieser wrote:
hi bill,
there are two ways to accomplish that:
first, if your input and output binding will be the same in each
situation, you can use different mappings by specifying the
direction="output" or direction="input" attribute in the binding
element, see
http://jibx.sourceforge.net/tutorial/binding-advanced.html
second, you can use named bindings. you can specify a name in the
binding element, and in your java code, you can specify which named
binding you want to use. this allows you to use as many different
bindings as you like or need.
see the binding definition
at http://jibx.sourceforge.net/details/binding-element.html for more
details on the attribute "name". i think there is also some more
detailed explanation in the tutorial, but i couldn't find it now.
br,
günther
Am 19.11.2007 um 22:16 schrieb William Surowiec:
Hi,
I've recently started using JibX - really useful, thank you.
But, of course, I have a question. I sense there may be several ways
to accomplish what I wish to do and I would appreciate guidance on
the "best practice" way. Here is what I would like to accomplish:
I have a complex, custom Java object. I receive an xml representation
of it (actually a subset of it.) I can parse the subset without a
problem. I now wish to produce another xml representation of it (same
object) but publishing different facets of it. Structurally the
resultant xml would look different than the input xml: meta data
inserted, aggregation performed, some field elided.
In this specific situation, it makes sense to maintain a single
object with multiple views. Is there a "best practice" jibx approach?
Thanks,
Bill
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users
--
Günther Wieser
creative-it
Guglgasse 6/1/11/1
A-1110 Wien
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.creative-it.com
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------------------
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users