import java.io.OutputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
+import java.nio.charset.StandardCharsets;
import java.util.List;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusContext;
import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusEntity;
import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
-import org.opendaylight.restconf.Draft16;
+import org.opendaylight.restconf.Rfc8040;
import org.opendaylight.restconf.utils.RestconfConstants;
@Provider
@Produces({Draft02.MediaTypes.PATCH_STATUS + RestconfService.XML,
- Draft16.MediaTypes.PATCH_STATUS + RestconfConstants.XML})
+ Rfc8040.MediaTypes.PATCH_STATUS + RestconfConstants.XML})
public class PATCHXmlBodyWriter implements MessageBodyWriter<PATCHStatusContext> {
private static final XMLOutputFactory XML_FACTORY;
throws IOException, WebApplicationException {
try {
- final XMLStreamWriter xmlWriter = XML_FACTORY.createXMLStreamWriter(entityStream);
+ final XMLStreamWriter xmlWriter = XML_FACTORY.createXMLStreamWriter(entityStream, StandardCharsets.UTF_8.name());
writeDocument(xmlWriter, patchStatusContext);
} catch (final XMLStreamException e) {
throw new IllegalStateException(e);