use of org.codice.ddf.spatial.ogc.wfs.v1_0_0.catalog.source.reader.XmlSchemaMessageBodyReaderWfs10 in project ddf by codice.
the class WfsSource method initProviders.
private List<? extends Object> initProviders() {
// We need to tell the JAXBElementProvider to marshal the GetFeatureType
// class as an element because it is missing the @XmlRootElement Annotation
JAXBElementProvider<GetFeatureType> provider = new JAXBElementProvider<GetFeatureType>();
Map<String, String> jaxbClassMap = new HashMap<String, String>();
// Ensure a namespace is used when the GetFeature request is generated
String expandedName = new QName(Wfs10Constants.WFS_NAMESPACE, Wfs10Constants.GET_FEATURE).toString();
jaxbClassMap.put(GetFeatureType.class.getName(), expandedName);
provider.setJaxbElementClassMap(jaxbClassMap);
provider.setMarshallAsJaxbElement(true);
featureCollectionReader = new FeatureCollectionMessageBodyReaderWfs10();
return Arrays.asList(provider, new WfsResponseExceptionMapper(), new XmlSchemaMessageBodyReaderWfs10(), featureCollectionReader);
}
use of org.codice.ddf.spatial.ogc.wfs.v1_0_0.catalog.source.reader.XmlSchemaMessageBodyReaderWfs10 in project ddf by codice.
the class TestXmlSchemaMessageBodyReader method testReadFromValidSchema.
@Test
public void testReadFromValidSchema() throws WebApplicationException, IOException {
XmlSchemaMessageBodyReaderWfs10 reader = new XmlSchemaMessageBodyReaderWfs10();
XmlSchema schema = reader.readFrom(null, null, null, null, null, schemaXml);
assertNotNull(schema);
}
use of org.codice.ddf.spatial.ogc.wfs.v1_0_0.catalog.source.reader.XmlSchemaMessageBodyReaderWfs10 in project ddf by codice.
the class TestXmlSchemaMessageBodyReader method testReadFromServiceExceptionReport.
@Test
public void testReadFromServiceExceptionReport() throws WebApplicationException, IOException {
XmlSchemaMessageBodyReaderWfs10 reader = new XmlSchemaMessageBodyReaderWfs10();
XmlSchema schema = reader.readFrom(null, null, null, null, null, ser);
assertNull(schema);
}
Aggregations