Search in sources :

Example 36 with OwsServiceRequest

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;
}
Also used : InsertResultRequest(org.n52.shetland.ogc.sos.request.InsertResultRequest) InsertResultType(net.opengis.sos.x20.InsertResultType)

Example 37 with OwsServiceRequest

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;
}
Also used : EncodingException(org.n52.svalbard.encode.exception.EncodingException) XmlObject(org.apache.xmlbeans.XmlObject)

Example 38 with OwsServiceRequest

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", "") {
    });
}
Also used : OwsServiceRequest(org.n52.shetland.ogc.ows.service.OwsServiceRequest) Test(org.junit.Test)

Example 39 with OwsServiceRequest

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() {
    });
}
Also used : OwsServiceRequest(org.n52.shetland.ogc.ows.service.OwsServiceRequest) Test(org.junit.Test)

Aggregations

OwsServiceRequest (org.n52.shetland.ogc.ows.service.OwsServiceRequest)12 DecodingException (org.n52.svalbard.decode.exception.DecodingException)10 XmlObject (org.apache.xmlbeans.XmlObject)7 OwsServiceResponse (org.n52.shetland.ogc.ows.service.OwsServiceResponse)6 XmlException (org.apache.xmlbeans.XmlException)5 OwsExceptionReport (org.n52.shetland.ogc.ows.exception.OwsExceptionReport)5 GetCapabilitiesRequest (org.n52.shetland.ogc.ows.service.GetCapabilitiesRequest)4 OwsServiceCommunicationObject (org.n52.shetland.ogc.ows.service.OwsServiceCommunicationObject)4 IOException (java.io.IOException)3 OwsDecodingException (org.n52.iceland.coding.decode.OwsDecodingException)3 InvalidServiceParameterException (org.n52.iceland.exception.ows.concrete.InvalidServiceParameterException)3 AbstractFeature (org.n52.shetland.ogc.gml.AbstractFeature)3 OperationDecoderKey (org.n52.svalbard.decode.OperationDecoderKey)3 JsonNode (com.fasterxml.jackson.databind.JsonNode)2 LinkedList (java.util.LinkedList)2 Set (java.util.Set)2 GetFeatureOfInterest (net.opengis.sos.x10.GetFeatureOfInterestDocument.GetFeatureOfInterest)2 GetResultTemplateType (net.opengis.sos.x20.GetResultTemplateType)2 Test (org.junit.Test)2 VersionNotSupportedException (org.n52.iceland.exception.ows.concrete.VersionNotSupportedException)2