Is there a counterpart of JaxB's ObjectFactory in JiBX?

245 views Asked by At

I'm trying to enhance a module from using JaxB to JiBX. I was able to produce the java classes through the jiBX maven plugin in pom.xml although I'm having issues on how I can generate an Objectfactory just like the one in JaxB's. Is there like a counterpart in JiBX because I've been searching through the net for hours but I can't find one. I'm new to marshalling and unmarshalling mechanisms so any help will be much appreciated. Thanks!

1

There are 1 answers

2
Don Corley On

Rocky,

JiBX has a similar mechanism. You need to create a JiBX Binding Factory then create a Marshalling or Marshalling context. The best way to see this is to look at one of our examples. Here's a link to a simple program that creates a java object, marshalls it to XML, then unmarshals the XML back to java objects.

https://github.com/jibx/maven-plugin/blob/master/test-suite/base-binding-test/org.jibx.schema.test.person/src/main/java/org/jibx/schema/test/person/PersonTest.java

Enjoy!

Don