code: private void getWSDL(String api, String requestURL, PrintWriter out) throws IOException,
              ServletException {
  
          String wsdlPath = (String) _WSDL_PATHS.get(api);
          if (wsdlPath != null) {
  
              File schemaFile = new File(_serverDir, _XSD_PATH);
              File sourceWSDL = new File(_serverDir, wsdlPath);
  
              String baseURL = getFedoraBaseURL(requestURL);
              String svcPath = (String) _SERVICE_PATHS.get(api);
  
              RuntimeWSDL wsdl =
                      new RuntimeWSDL(schemaFile, sourceWSDL, baseURL + "/"
                              + svcPath);
  
              wsdl.serialize(out);
  
          } else {
              throw new ServletException("No such api: '" + api + "'");
          }
      }
docs: Get the self-contained WSDL given the api name and request URL.