Codota Logo
ListingAgent
Code IndexAdd Codota to your IDE (free)

How to use
ListingAgent
in
org.apache.axis2.transport.http

Best Java code snippets using org.apache.axis2.transport.http.ListingAgent (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: org.apache.axis2/axis2-transport-http

/**
 * Initialize HTTP GET request processors
 *
 * @param config The ServletConfig of this Servlet
 */
protected void initGetRequestProcessors(ServletConfig config) {
  // The ListingAgent is an HTTP GET request processor
  agent = new ListingAgent(configContext);
}
origin: org.apache.axis2/axis2-transport-http

private void handleWSDL2Request(HttpServletRequest req,
                HttpServletResponse res,
                String url,
                AxisService axisService) throws IOException {
  if (!canExposeServiceMetadata(axisService)){
    res.sendError(HttpServletResponse.SC_FORBIDDEN);
    return;
  }
  res.setContentType("text/xml");
  String ip = extractHost(url);
  String wsdlName = getParamtereIgnoreCase(req , "wsdl2");
  int ret = axisService.printWSDL2(res.getOutputStream(), ip, wsdlName);
  if (ret == 0) {
    res.sendRedirect("");
  } else if (ret == -1) {
    res.sendError(HttpServletResponse.SC_NOT_FOUND);
  }
}
origin: apache/axis2-java

private void handleXSDRequest(HttpServletRequest req, HttpServletResponse res,
               AxisService axisService) throws IOException {
  if (!canExposeServiceMetadata(axisService)){
    res.sendError(HttpServletResponse.SC_FORBIDDEN);
    return;
  }
  res.setContentType("text/xml");
  int ret = axisService.printXSD(res.getOutputStream(), getParamtereIgnoreCase(req ,"xsd"));
  if (ret == 0) {
    //multiple schemas are present and the user specified
    //no name - in this case we cannot possibly pump a schema
    //so redirect to the service root
    res.sendRedirect("");
  } else if (ret == -1) {
    res.sendError(HttpServletResponse.SC_NOT_FOUND);
  }
}
origin: apache/axis2-java

String serviceName = extractServiceName(url);
HashMap<String, AxisService> services = configContext.getAxisConfiguration().getServices();
String query = req.getQueryString();
  if (axisService != null) {              
    if (wsdl2 >= 0) {
      handleWSDL2Request(req, res, url, axisService);
      return;
    } else if (wsdl >= 0) {
      handleWSDLRequest(req, res, url, axisService);
      return;
    } else if (xsd >= 0) {
      handleXSDRequest(req, res, axisService);
      return;
    } else if (policy >= 0) {
      handlePolicyRequest(req, res, serviceName, axisService);
      return;
origin: apache/axis2-java

  agent.processListService(request, response);
} else if (HttpUtils.endsWithIgnoreCase(requestURI , ".xsd") ||
    HttpUtils.endsWithIgnoreCase(requestURI, ".wsdl")) {
  agent.processExplicitSchemaAndWSDL(request, response);
} else if (requestURI.endsWith(LIST_SERVICES_SUFFIX) ||
    requestURI.endsWith(LIST_FAULTY_SERVICES_SUFFIX)) {
    agent.handle(request, response);
  } catch (Exception e) {
    throw new ServletException(e);
origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2

super.processListService(req, res);
origin: org.apache.axis2/axis2-transport-http

               String serviceName,
               AxisService axisService) throws IOException, ServletException {
if (!canExposeServiceMetadata(axisService)){
  res.sendError(HttpServletResponse.SC_FORBIDDEN);
  return;
  Policy targetPolicy = findPolicy(idParam, axisService);
origin: org.apache.axis2/axis2-transport-http

private Policy findPolicy(String id, AxisDescription des) {
    Collection<PolicyComponent> policyElements = des.getPolicySubject().getAttachedPolicyComponents();
  PolicyRegistry registry = new PolicyRegistryImpl();
  Object policyComponent;
  Policy policy = registry.lookup(id);
  if (policy != null) {
    return policy;
  }
  for (Iterator<PolicyComponent> iterator = policyElements.iterator(); iterator.hasNext();) {
    policyComponent = iterator.next();
    if (policyComponent instanceof Policy) {
      // policy found for the id
      if (id.equals(((Policy) policyComponent).getId())) {
        return (Policy) policyComponent;
      }
    }
  }
  AxisDescription child;
  for (Iterator<? extends AxisDescription> iterator = des.getChildren(); iterator.hasNext();) {
    child = (AxisDescription) iterator.next();
    policy = findPolicy(id, child);
    if (policy != null) {
      return policy;
    }
  }
  return null;
}
origin: apache/axis2-java

OutputStream out = response.getOutputStream();
response.setContentType("text/xml");
ListingAgent.copy(stream, out);
out.flush();
out.close();
origin: org.apache.axis2/axis2-transport-http

String serviceName = extractServiceName(url);
HashMap<String, AxisService> services = configContext.getAxisConfiguration().getServices();
String query = req.getQueryString();
  if (axisService != null) {              
    if (wsdl2 >= 0) {
      handleWSDL2Request(req, res, url, axisService);
      return;
    } else if (wsdl >= 0) {
      handleWSDLRequest(req, res, url, axisService);
      return;
    } else if (xsd >= 0) {
      handleXSDRequest(req, res, axisService);
      return;
    } else if (policy >= 0) {
      handlePolicyRequest(req, res, serviceName, axisService);
      return;
origin: org.apache.axis2/axis2-transport-http

  agent.processListService(request, response);
} else if (HttpUtils.endsWithIgnoreCase(requestURI , ".xsd") ||
    HttpUtils.endsWithIgnoreCase(requestURI, ".wsdl")) {
  agent.processExplicitSchemaAndWSDL(request, response);
} else if (requestURI.endsWith(LIST_SERVICES_SUFFIX) ||
    requestURI.endsWith(LIST_FAULTY_SERVICES_SUFFIX)) {
    agent.handle(request, response);
  } catch (Exception e) {
    throw new ServletException(e);
origin: org.apache.axis2/axis2-transport-http

public void handle(HttpServletRequest httpServletRequest,
          HttpServletResponse httpServletResponse)
    throws IOException, ServletException {
  httpServletRequest = new ForbidSessionCreationWrapper(httpServletRequest);
  String query = httpServletRequest.getQueryString();
  if (query != null) {
    if (HttpUtils.indexOfIngnoreCase(query , "wsdl2") > 0 || HttpUtils.indexOfIngnoreCase(query, "wsdl") > 0 ||
      HttpUtils.indexOfIngnoreCase(query, "xsd") > 0 || HttpUtils.indexOfIngnoreCase(query, "policy") > 0) {
      processListService(httpServletRequest, httpServletResponse);
    } else {
      super.handle(httpServletRequest, httpServletResponse);
    }
  } else {
    super.handle(httpServletRequest, httpServletResponse);
  }
}
origin: org.apache.axis2/axis2-transport-http

private void handleXSDRequest(HttpServletRequest req, HttpServletResponse res,
               AxisService axisService) throws IOException {
  if (!canExposeServiceMetadata(axisService)){
    res.sendError(HttpServletResponse.SC_FORBIDDEN);
    return;
  }
  res.setContentType("text/xml");
  int ret = axisService.printXSD(res.getOutputStream(), getParamtereIgnoreCase(req ,"xsd"));
  if (ret == 0) {
    //multiple schemas are present and the user specified
    //no name - in this case we cannot possibly pump a schema
    //so redirect to the service root
    res.sendRedirect("");
  } else if (ret == -1) {
    res.sendError(HttpServletResponse.SC_NOT_FOUND);
  }
}
origin: apache/axis2-java

               String serviceName,
               AxisService axisService) throws IOException, ServletException {
if (!canExposeServiceMetadata(axisService)){
  res.sendError(HttpServletResponse.SC_FORBIDDEN);
  return;
  Policy targetPolicy = findPolicy(idParam, axisService);
origin: apache/axis2-java

private Policy findPolicy(String id, AxisDescription des) {
    Collection<PolicyComponent> policyElements = des.getPolicySubject().getAttachedPolicyComponents();
  PolicyRegistry registry = new PolicyRegistryImpl();
  Object policyComponent;
  Policy policy = registry.lookup(id);
  if (policy != null) {
    return policy;
  }
  for (Iterator<PolicyComponent> iterator = policyElements.iterator(); iterator.hasNext();) {
    policyComponent = iterator.next();
    if (policyComponent instanceof Policy) {
      // policy found for the id
      if (id.equals(((Policy) policyComponent).getId())) {
        return (Policy) policyComponent;
      }
    }
  }
  AxisDescription child;
  for (Iterator<? extends AxisDescription> iterator = des.getChildren(); iterator.hasNext();) {
    child = (AxisDescription) iterator.next();
    policy = findPolicy(id, child);
    if (policy != null) {
      return policy;
    }
  }
  return null;
}
origin: org.apache.axis2/axis2-transport-http

OutputStream out = response.getOutputStream();
response.setContentType("text/xml");
ListingAgent.copy(stream, out);
out.flush();
out.close();
origin: apache/axis2-java

private void handleWSDL2Request(HttpServletRequest req,
                HttpServletResponse res,
                String url,
                AxisService axisService) throws IOException {
  if (!canExposeServiceMetadata(axisService)){
    res.sendError(HttpServletResponse.SC_FORBIDDEN);
    return;
  }
  res.setContentType("text/xml");
  String ip = extractHost(url);
  String wsdlName = getParamtereIgnoreCase(req , "wsdl2");
  int ret = axisService.printWSDL2(res.getOutputStream(), ip, wsdlName);
  if (ret == 0) {
    res.sendRedirect("");
  } else if (ret == -1) {
    res.sendError(HttpServletResponse.SC_NOT_FOUND);
  }
}
origin: apache/axis2-java

/**
 * Initialize HTTP GET request processors
 *
 * @param config The ServletConfig of this Servlet
 */
protected void initGetRequestProcessors(ServletConfig config) {
  // The ListingAgent is an HTTP GET request processor
  agent = new ListingAgent(configContext);
}
origin: apache/axis2-java

public void handle(HttpServletRequest httpServletRequest,
          HttpServletResponse httpServletResponse)
    throws IOException, ServletException {
  httpServletRequest = new ForbidSessionCreationWrapper(httpServletRequest);
  String query = httpServletRequest.getQueryString();
  if (query != null) {
    if (HttpUtils.indexOfIngnoreCase(query , "wsdl2") > 0 || HttpUtils.indexOfIngnoreCase(query, "wsdl") > 0 ||
      HttpUtils.indexOfIngnoreCase(query, "xsd") > 0 || HttpUtils.indexOfIngnoreCase(query, "policy") > 0) {
      processListService(httpServletRequest, httpServletResponse);
    } else {
      super.handle(httpServletRequest, httpServletResponse);
    }
  } else {
    super.handle(httpServletRequest, httpServletResponse);
  }
}
origin: apache/axis2-java

private void handleWSDLRequest(HttpServletRequest req,
                HttpServletResponse res,
                String url,
                AxisService axisService) throws IOException {
  if (!canExposeServiceMetadata(axisService)){
    res.sendError(HttpServletResponse.SC_FORBIDDEN);
    return;
  }
  OutputStream out = res.getOutputStream();
  res.setContentType("text/xml");
  String ip = extractHost(url);
  String wsdlName = getParamtereIgnoreCase(req , "wsdl");
  if (wsdlName != null && wsdlName.length()>0) {
    axisService.printUserWSDL(out, wsdlName, ip);
  } else {
    axisService.printWSDL(out, ip);
  }
}
org.apache.axis2.transport.httpListingAgent

Most used methods

  • <init>
  • processListService
  • canExposeServiceMetadata
    Checks whether exposing the WSDL & WSDL elements such as schema & policy have been allowed
  • copy
    Copies the input stream to the output stream
  • extractHost
  • extractServiceName
  • findPolicy
  • getParamtereIgnoreCase
  • handle
  • handlePolicyRequest
  • handleWSDL2Request
  • handleWSDLRequest
  • handleWSDL2Request,
  • handleWSDLRequest,
  • handleXSDRequest,
  • listServiceDisabled,
  • populateRequestAttributes,
  • processExplicitSchemaAndWSDL,
  • processListServices,
  • renderView

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now