code: protected static AbstractWebApplicationService newWebApplicationService(final HttpServletRequest request,
                                                                              final String serviceToUse) {
          val artifactId = request != null ? request.getParameter(CasProtocolConstants.PARAMETER_TICKET) : null;
          val id = cleanupUrl(serviceToUse);
          val newService = new SimpleWebApplicationServiceImpl(id, serviceToUse, artifactId);
          determineWebApplicationFormat(request, newService);
          val source = getSourceParameter(request, CasProtocolConstants.PARAMETER_TARGET_SERVICE, CasProtocolConstants.PARAMETER_SERVICE);
          newService.setSource(source);
          return newService;
      }
docs: Build new web application service simple web application service.
  
  @param request      the request
  @param serviceToUse the service to use
  @return the simple web application service