Search in sources :

Example 1 with XmlSchemaMessageBodyReaderWfs11

use of org.codice.ddf.spatial.ogc.wfs.v110.catalog.source.reader.XmlSchemaMessageBodyReaderWfs11 in project ddf by codice.

the class WfsSource method initProviders.

private List<?> initProviders() {
    // We need to tell the JAXBElementProvider to marshal the GetFeatureType
    // class as an element because it is missing the @XmlRootElement Annotation
    JAXBElementProvider<ExtendedGetFeatureType> provider = new JAXBElementProvider<>();
    Map<String, String> jaxbClassMap = new HashMap<>();
    // Ensure a namespace is used when the GetFeature request is generated
    String expandedName = new QName(Wfs11Constants.WFS_NAMESPACE, Wfs11Constants.GET_FEATURE).toString();
    jaxbClassMap.put(ExtendedGetFeatureType.class.getName(), expandedName);
    provider.setJaxbElementClassMap(jaxbClassMap);
    provider.setMarshallAsJaxbElement(true);
    return Arrays.asList(provider, new WfsResponseExceptionMapper(), new XmlSchemaMessageBodyReaderWfs11(), new WfsMessageBodyReader(featureTransformationService, () -> wfsMetadata));
}
Also used : JAXBElementProvider(org.apache.cxf.jaxrs.provider.JAXBElementProvider) HashMap(java.util.HashMap) QName(javax.xml.namespace.QName) XmlSchemaMessageBodyReaderWfs11(org.codice.ddf.spatial.ogc.wfs.v110.catalog.source.reader.XmlSchemaMessageBodyReaderWfs11)

Aggregations

HashMap (java.util.HashMap)1 QName (javax.xml.namespace.QName)1 JAXBElementProvider (org.apache.cxf.jaxrs.provider.JAXBElementProvider)1 XmlSchemaMessageBodyReaderWfs11 (org.codice.ddf.spatial.ogc.wfs.v110.catalog.source.reader.XmlSchemaMessageBodyReaderWfs11)1