users@jaxb.java.net

Re: Compiling FPML schemas via JAXB 2.x RI XJC

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Sat, 29 Sep 2007 00:42:24 +0200

Hi.

> I have schema type bellow and XJC gives me errors that element
> "definePosition" is definded in more than one property.

...

I'm afraid you'll need to reformulate the schema.

The problem is that you have

replaceAllPositions definePosition+ (definePosition | removePosition) *

XJC wants to create the following properties

replaceAllPositions
definePosition
definePositionOrRemovePosition

And the problem is that define Position goes into both second and
third properties. So during unmarshalling JAXB won't know where to put
this element.

Consider removing the first definePosition element.

Bye.
/lexi