use of org.n52.shetland.ogc.ows.service.OwsServiceRequest in project arctic-sea by 52North.
the class SosDecoderv20 method parseInsertResult.
private OwsServiceRequest parseInsertResult(final InsertResultDocument insertResultDoc) throws DecodingException {
final InsertResultType insertResult = insertResultDoc.getInsertResult();
final InsertResultRequest sosInsertResultRequest = new InsertResultRequest();
sosInsertResultRequest.setService(insertResult.getService());
sosInsertResultRequest.setVersion(insertResult.getVersion());
sosInsertResultRequest.setTemplateIdentifier(insertResult.getTemplate());
sosInsertResultRequest.setResultValues(parseResultValues(insertResult.getResultValues()));
sosInsertResultRequest.setExtensions(parseExtensibleRequest(insertResult));
return sosInsertResultRequest;
}
use of org.n52.shetland.ogc.ows.service.OwsServiceRequest in project arctic-sea by 52North.
the class SosRequestEncoderv20 method encode.
@Override
public XmlObject encode(OwsServiceRequest request, EncodingContext additionalValues) throws EncodingException {
XmlObject encodedObject = encodeRequests(request);
XmlHelper.validateDocument(encodedObject, EncodingException::new);
return encodedObject;
}
use of org.n52.shetland.ogc.ows.service.OwsServiceRequest in project arctic-sea by 52North.
the class AbstractSwesRequestEncoderTest method shouldThrowExceptionIfVersionIsMissing.
@Test
public void shouldThrowExceptionIfVersionIsMissing() throws EncodingException {
thrown.expect(UnsupportedEncoderInputException.class);
thrown.expectMessage(Is.is("Encoder " + AbstractSwesRequestEncoderSeam.class.getSimpleName() + " can not encode 'missing version'"));
encoder.validateInput(new OwsServiceRequest("SOS", "") {
});
}
use of org.n52.shetland.ogc.ows.service.OwsServiceRequest in project arctic-sea by 52North.
the class AbstractSwesRequestEncoderTest method shouldThrowExceptionIfServiceIsMissing.
@Test
public void shouldThrowExceptionIfServiceIsMissing() throws EncodingException {
thrown.expect(UnsupportedEncoderInputException.class);
thrown.expectMessage(Is.is("Encoder " + AbstractSwesRequestEncoderSeam.class.getSimpleName() + " can not encode 'missing service'"));
encoder.validateInput(new OwsServiceRequest() {
});
}
Aggregations