use of net.opengis.sos.x20.InsertResultTemplateResponseType in project arctic-sea by 52North.
the class InsertResultTemplateResponseDecoder method decode.
@Override
public InsertResultTemplateResponse decode(XmlObject xmlObject) throws DecodingException {
LOGGER.debug("REQUESTTYPE: {}", xmlObject != null ? xmlObject.getClass() : "null recevied");
if (!(xmlObject instanceof InsertResultTemplateResponseDocument)) {
throw new UnsupportedDecoderInputException(this, xmlObject);
}
InsertResultTemplateResponseDocument isrd = (InsertResultTemplateResponseDocument) xmlObject;
InsertResultTemplateResponseType isr = isrd.getInsertResultTemplateResponse();
if (isr == null) {
throw new DecodingException("Received XML document is not valid. Set log level to debug to get more details");
}
InsertResultTemplateResponse decodedResponse = new InsertResultTemplateResponse(SosConstants.SOS, Sos2Constants.SERVICEVERSION);
decodedResponse.setAcceptedTemplate(isr.getAcceptedTemplate());
return decodedResponse;
}
use of net.opengis.sos.x20.InsertResultTemplateResponseType in project arctic-sea by 52North.
the class InsertResultTemplateResponseEncoder method create.
@Override
protected XmlObject create(InsertResultTemplateResponse response) throws EncodingException {
InsertResultTemplateResponseDocument doc = InsertResultTemplateResponseDocument.Factory.newInstance(getXmlOptions());
InsertResultTemplateResponseType irtr = doc.addNewInsertResultTemplateResponse();
irtr.setAcceptedTemplate(response.getAcceptedTemplate());
return doc;
}
Aggregations