public class ServicesXMLLoader extends AbstractXMLLoader {
/** {@inheritDoc} */
@Override
public final void loadBody(XMLStreamWriter writer, IWebRequest request) throws Exception {
ServiceRegistry serviceRegistry = AppContext.getServiceRegistry();
writer.writeStartElement("services");
Service[] services = serviceRegistry.getServices();
String serviceParameter = request.getParameter("service");
int simulation = this.getParameterInt(request, "sim", 0);
if (simulation > 0) {
Service[] sim = new Service[simulation + services.length];
System.arraycopy(services, 0, sim, 0, services.length);