Search in sources :

Example 1 with SchemaAwareEncoder

use of org.n52.svalbard.encode.SchemaAwareEncoder in project arctic-sea by 52North.

the class Soap12XmlStreamWriter method getSchemaLocation.

protected Set<SchemaLocation> getSchemaLocation() throws EncodingException, XMLStreamException {
    SoapResponse response = getElement();
    Set<SchemaLocation> schemaLocations = Sets.newHashSet();
    schemaLocations.add(SoapConstants.SOAP_12_SCHEMA_LOCATION);
    if (response.isSetBodyContent()) {
        Encoder<Object, OwsServiceResponse> encoder = getEncoder(response.getBodyContent());
        if (encoder != null && encoder instanceof SchemaAwareEncoder) {
            schemaLocations.addAll(((SchemaAwareEncoder<?, ?>) encoder).getSchemaLocations());
        }
    }
    return schemaLocations;
}
Also used : SchemaLocation(org.n52.shetland.w3c.SchemaLocation) SchemaAwareEncoder(org.n52.svalbard.encode.SchemaAwareEncoder) SoapResponse(org.n52.shetland.w3c.soap.SoapResponse) XmlObject(org.apache.xmlbeans.XmlObject) OwsServiceResponse(org.n52.shetland.ogc.ows.service.OwsServiceResponse)

Aggregations

XmlObject (org.apache.xmlbeans.XmlObject)1 OwsServiceResponse (org.n52.shetland.ogc.ows.service.OwsServiceResponse)1 SchemaLocation (org.n52.shetland.w3c.SchemaLocation)1 SoapResponse (org.n52.shetland.w3c.soap.SoapResponse)1 SchemaAwareEncoder (org.n52.svalbard.encode.SchemaAwareEncoder)1