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');
}
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>");
}
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/>");
}
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");
}
}
}
Aggregations