sirius.web.services.XMLServiceCall Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirius-web Show documentation
Show all versions of sirius-web Show documentation
Provides a modern and scalable web server as SIRIUS module
/*
* Made with all the love in the world
* by scireum in Remshalden, Germany
*
* Copyright by scireum GmbH
* http://www.scireum.de - [email protected]
*/
package sirius.web.services;
import com.google.common.base.Charsets;
import io.netty.handler.codec.http.HttpResponseStatus;
import sirius.kernel.xml.StructuredOutput;
import sirius.kernel.xml.XMLStructuredOutput;
import sirius.web.http.WebContext;
/**
* XML encoder for calls to a {@link StructuredService}.
*/
class XMLServiceCall extends ServiceCall {
XMLServiceCall(WebContext ctx) {
super(ctx);
}
@Override
protected StructuredOutput createOutput() {
return new XMLStructuredOutput(ctx.respondWith()
.outputStream(HttpResponseStatus.OK,
"text/xml;charset=" + Charsets.UTF_8.name()));
}
}