use of org.n52.svalbard.encode.exception.NoEncoderForKeyException in project arctic-sea by 52North.
the class AbstractSoapEncoder method getBodyContent.
/**
* Get the content for the SOAPBody as {@link XmlObject}
*
* @param response SOAP response
*
* @return SOAPBody content as {@link XmlObject}
*
* @throws EncodingException If no encoder is available, the object to encode is not supported or an error occurs
* during the encoding
*/
protected XmlObject getBodyContent(SoapResponse response) throws EncodingException {
OperationResponseEncoderKey key = new OperationResponseEncoderKey(new OwsOperationKey(response.getBodyContent()), MediaTypes.APPLICATION_XML);
Encoder<Object, OwsServiceResponse> encoder = getEncoder(key);
if (encoder == null) {
throw new NoEncoderForKeyException(key);
}
return (XmlObject) encoder.encode(response.getBodyContent());
}
Aggregations