All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sirius.web.services.XMLServiceCall Maven / Gradle / Ivy

There is a newer version: 22.2.3
Show newest version
/*
 * 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()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy