com.sun.istack.SAXException2: Instance of "javax.xml.bind.JAXBElement" is substituting "java.lang.Object", but "javax.xml.bind.JAXBElement" is bound to an anonymous type.]
when adding PropertyName to a net.opengis.wfs.v_2_0.QueryType using
withAbstractProjectionClause
I encounter the following MarshalException
com.sun.istack.SAXException2: Instance of "javax.xml.bind.JAXBElement" is substituting "java.lang.Object", but "javax.xml.bind.JAXBElement" is bound to an anonymous type.]
when adding
PropertyName
to anet.opengis.wfs.v_2_0.QueryType
usingwithAbstractProjectionClause
Testcase is: ` package sample;
import java.io.StringWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBElement; import javax.xml.bind.Marshaller; import javax.xml.namespace.QName;
import net.opengis.filter.v_2_0.BinarySpatialOpType; import net.opengis.filter.v_2_0.FilterType; import net.opengis.gml.v_3_2_1.DirectPositionType; import net.opengis.gml.v_3_2_1.PointType; import net.opengis.wfs.v_2_0.GetFeatureType; import net.opengis.wfs.v_2_0.ObjectFactory; import net.opengis.wfs.v_2_0.PropertyName; import net.opengis.wfs.v_2_0.QueryType;
public class GetFeatureTest {
} ` As far as I can tell this needs a schema adjustment, but I am not really sure how to do this.