Search in sources :

Example 1 with AbstractDestination

use of org.apache.cxf.transport.AbstractDestination in project cxf by apache.

the class UnformattedServiceListWriter method writeUnformattedSOAPEndpoints.

private void writeUnformattedSOAPEndpoints(PrintWriter writer, String baseAddress, AbstractDestination[] destinations) throws IOException {
    for (AbstractDestination sd : destinations) {
        String address = getAbsoluteAddress(baseAddress, sd);
        address = StringEscapeUtils.escapeHtml4(address);
        writer.write(address);
        if (renderWsdlList) {
            writer.write("?wsdl");
        }
        writer.write('\n');
    }
    writer.write('\n');
}
Also used : AbstractDestination(org.apache.cxf.transport.AbstractDestination)

Example 2 with AbstractDestination

use of org.apache.cxf.transport.AbstractDestination in project cxf by apache.

the class FormattedServiceListWriter method writeRESTfulEndpoints.

private void writeRESTfulEndpoints(PrintWriter writer, String basePath, AbstractDestination[] restfulDests) throws IOException {
    writer.write("<span class=\"heading\">Available RESTful services:</span><br/>");
    writer.write("<table " + (styleSheetPath.endsWith("stylesheet=1") ? "cellpadding=\"1\" cellspacing=\"1\" border=\"1\" width=\"100%\"" : "") + ">");
    for (AbstractDestination sd : restfulDests) {
        writeRESTfulEndpoint(writer, basePath, sd);
    }
    writer.write("</table>");
}
Also used : AbstractDestination(org.apache.cxf.transport.AbstractDestination)

Example 3 with AbstractDestination

use of org.apache.cxf.transport.AbstractDestination in project cxf by apache.

the class FormattedServiceListWriter method writeSOAPEndpoints.

private void writeSOAPEndpoints(PrintWriter writer, String basePath, AbstractDestination[] destinations) throws IOException {
    writer.write("<span class=\"heading\">Available SOAP services:</span><br/>");
    writer.write("<table " + (styleSheetPath.endsWith("stylesheet=1") ? "cellpadding=\"1\" cellspacing=\"1\" border=\"1\" width=\"100%\"" : "") + ">");
    for (AbstractDestination sd : destinations) {
        writerSoapEndpoint(writer, basePath, sd);
    }
    writer.write("</table><br/><br/>");
}
Also used : AbstractDestination(org.apache.cxf.transport.AbstractDestination)

Example 4 with AbstractDestination

use of org.apache.cxf.transport.AbstractDestination in project cxf by apache.

the class UnformattedServiceListWriter method writeUnformattedRESTfulEndpoints.

private void writeUnformattedRESTfulEndpoints(PrintWriter writer, String baseAddress, AbstractDestination[] destinations) throws IOException {
    for (AbstractDestination sd : destinations) {
        String address = getAbsoluteAddress(baseAddress, sd);
        address = StringEscapeUtils.escapeHtml4(address);
        boolean wadlAvailable = bus != null && PropertyUtils.isTrue(bus.getProperty("wadl.service.descrition.available"));
        boolean swaggerAvailable = bus != null && PropertyUtils.isTrue(bus.getProperty("swagger.service.descrition.available"));
        boolean openApiAvailable = bus != null && PropertyUtils.isTrue(bus.getProperty("openapi.service.descrition.available"));
        if (!wadlAvailable && !swaggerAvailable) {
            writer.write(address + "\n");
            return;
        }
        if (wadlAvailable) {
            writer.write(address + "?_wadl\n");
        }
        if (swaggerAvailable) {
            writer.write(address + "/swagger.json\n");
        }
        if (openApiAvailable) {
            writer.write(address + "/openapi.json\n");
        }
    }
}
Also used : AbstractDestination(org.apache.cxf.transport.AbstractDestination)

Aggregations

AbstractDestination (org.apache.cxf.transport.AbstractDestination)4