hi,
i'm using jaxb to generate xml from classes generated from a schema using
xjc. the xml has to work on both .net and within java for interoperability.
there are 2 xml snippets below. the first is the output from .net and the
second is from jaxb. jaxb misses out the type names of the list elements.
The type names are Trades and BusinessEvent. The .net generation adds
them, but the jaxb doesn't. is this a bug or hopefully something i am doing
wrong. The relevant part of the schema is at the bottom. the java code from
the unit test is directly below:-
// create the context for the deal type
JAXBContext context =
JAXBContext.newInstance(DealImpl.class);
// create a deal for unit test
Deal deal = createCannedDeal();
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
StringWriter swNew = new StringWriter();
m.marshal(deal, swNew);
// microsoft xml xnippet
be1
BE name1
trade1
trade2
be2
BE name2
// jaxb xml snippet
be1
BE name1
trade1
trade2
be2
BE name2
// cuto down schema snippet
cheers
eddy
--
View this message in context: http://www.nabble.com/marshal-lists---missing-type-names-tp17204300p17204300.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.