com.sun.xml.ws.transport.http.servlet.WSServletDelegate类的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中com.sun.xml.ws.transport.http.servlet.WSServletDelegate类的一些代码示例,展示了WSServletDelegate类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WSServletDelegate类的具体详情如下:
包路径:com.sun.xml.ws.transport.http.servlet.WSServletDelegate
类名称:WSServletDelegate

WSServletDelegate介绍

[英]Called by WSServlet to choose HttpAdapterand sends a request to it.

One instance of this object is created, and then shared across WSServlet instances (the container might deploy many of them, depending on how the user writes web.xml.)
[中]由WSServlet调用以选择HttpAdapter并向其发送请求。
创建该对象的一个实例,然后在WSServlet实例之间共享(容器可能会部署许多实例,具体取决于用户编写web.xml的方式)

代码示例

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

/**
 * Creates {@link WSServletDelegate} that does the real work.
 */
protected @NotNull WSServletDelegate createDelegate(List<ServletAdapter> adapters, ServletContext context) {
  return new WSServletDelegate(adapters,context);
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

@Override
protected void doPost( HttpServletRequest request, HttpServletResponse response) throws ServletException {
  if (delegate != null) {
    delegate.doPost(request,response,getServletContext());
  }
}

代码示例来源:origin: javaee/metro-jax-ws

/**
 * processes web service requests by finding the {@link ServletAdapter}
 * created by the {@link WSServletContextListener} and creating a
 * {@link ServletConnectionImpl}.
 *
 * @param request the HTTP request object
 * @param response the HTTP response object
 */
public void doPost(HttpServletRequest request, HttpServletResponse response, ServletContext context) throws ServletException {
  doGet(request, response,context);
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

ServletAdapter target = getTarget(request);
if (target != null) {
  if (logger.isLoggable(Level.FINEST)) {
  Localizer localizer = getLocalizerFor(request);
  writeNotFoundErrorPage(localizer, response, "Invalid Request");

代码示例来源:origin: org.seedstack.seed/seed-ws-support-web

@Override
public void stop() {
  if (wsServletDelegate != null) {
    wsServletDelegate.destroy();
  }
  if (servletAdapters != null) {
    for (ServletAdapter servletAdapter : servletAdapters) {
      LOGGER.info("Disposing WS endpoint {}", servletAdapter.getName());
      servletAdapter.getEndpoint().dispose();
    }
  }
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

/**
 * Handles HTTP DELETE for XML/HTTP binding based endpoints
 */
public void doDelete(HttpServletRequest request, HttpServletResponse response, ServletContext context)
  throws ServletException {
  // At preseent, there is no difference for between PUT and DELETE processing
  doPut(request, response, context);
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

@Override
protected void doDelete( HttpServletRequest request, HttpServletResponse response)
  throws ServletException {
  if (delegate != null) {
    delegate.doDelete(request,response,getServletContext());
  }
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

@Override
protected void doHead( HttpServletRequest request, HttpServletResponse response) throws ServletException {
  if (delegate != null) {
    delegate.doHead(request,response,getServletContext());
  }
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

public void doHead(HttpServletRequest request, HttpServletResponse response, ServletContext context)
  throws ServletException {
  try {
    ServletAdapter target = getTarget(request);
    if (target != null) {
      if (logger.isLoggable(Level.FINEST)) {
        logger.finest(
          WsservletMessages.SERVLET_TRACE_GOT_REQUEST_FOR_ENDPOINT(target.name));
      }
      target.handle(context, request, response);
    } else {
      response.setStatus(HttpServletResponse.SC_NOT_FOUND);
    }
  } catch (JAXWSExceptionBase e) {
    logger.log(Level.SEVERE, defaultLocalizer.localize(e), e);
    response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
  } catch (Throwable e) {
    if (e instanceof Localizable) {
      logger.log(
        Level.SEVERE,
        defaultLocalizer.localize((Localizable) e),
        e);
    } else {
      logger.log(Level.SEVERE, "caught throwable", e);
    }
    response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
  }
}

代码示例来源:origin: javaee/metro-jax-ws

ServletAdapter target = getTarget(request);
if (target != null) {
  if (logger.isLoggable(Level.FINEST)) {
  Localizer localizer = getLocalizerFor(request);
  writeNotFoundErrorPage(localizer, response, "Invalid Request");

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

public void contextDestroyed(ServletContextEvent event) {
  if (delegate != null) { // the deployment might have failed.
    delegate.destroy();
  }
  if (adapters != null) {
    for(ServletAdapter a : adapters) {
      try {
        a.getEndpoint().dispose();
      } catch(Throwable e) {
        logger.log(Level.SEVERE, e.getMessage(), e);
      }
      // Emit undeployment probe event for each endpoint
      probe.undeploy(a);
    }
  }
  if (logger.isLoggable(Level.INFO)) {
    logger.info(WsservletMessages.LISTENER_INFO_DESTROY());
  }
}

代码示例来源:origin: javaee/metro-jax-ws

/**
 * Handles HTTP DELETE for XML/HTTP binding based endpoints
 */
public void doDelete(HttpServletRequest request, HttpServletResponse response, ServletContext context)
  throws ServletException {
  // At preseent, there is no difference for between PUT and DELETE processing
  doPut(request, response, context);
}

代码示例来源:origin: javaee/metro-jax-ws

@Override
protected void doDelete( HttpServletRequest request, HttpServletResponse response)
  throws ServletException {
  if (delegate != null) {
    delegate.doDelete(request,response,getServletContext());
  }
}

代码示例来源:origin: javaee/metro-jax-ws

@Override
protected void doHead( HttpServletRequest request, HttpServletResponse response) throws ServletException {
  if (delegate != null) {
    delegate.doHead(request,response,getServletContext());
  }
}

代码示例来源:origin: javaee/metro-jax-ws

public void doHead(HttpServletRequest request, HttpServletResponse response, ServletContext context)
  throws ServletException {
  try {
    ServletAdapter target = getTarget(request);
    if (target != null) {
      if (logger.isLoggable(Level.FINEST)) {
        logger.finest(
          WsservletMessages.SERVLET_TRACE_GOT_REQUEST_FOR_ENDPOINT(target.name));
      }
      target.handle(context, request, response);
    } else {
      response.setStatus(HttpServletResponse.SC_NOT_FOUND);
    }
  } catch (JAXWSExceptionBase e) {
    logger.log(Level.SEVERE, defaultLocalizer.localize(e), e);
    response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
  } catch (Throwable e) {
    if (e instanceof Localizable) {
      logger.log(
        Level.SEVERE,
        defaultLocalizer.localize((Localizable) e),
        e);
    } else {
      logger.log(Level.SEVERE, "caught throwable", e);
    }
    response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
  }
}

代码示例来源:origin: javaee/metro-jax-ws

@Override
protected void doPost( HttpServletRequest request, HttpServletResponse response) throws ServletException {
  if (delegate != null) {
    delegate.doPost(request,response,getServletContext());
  }
}

代码示例来源:origin: javaee/metro-jax-ws

/**
 * Creates {@link WSServletDelegate} that does the real work.
 */
protected @NotNull WSServletDelegate createDelegate(List<ServletAdapter> adapters, ServletContext context) {
  return new WSServletDelegate(adapters,context);
}

代码示例来源:origin: javaee/metro-jax-ws

/**
 * processes web service requests by finding the {@link ServletAdapter}
 * created by the {@link WSServletContextListener} and creating a
 * {@link ServletConnectionImpl}.
 *
 * @param request the HTTP request object
 * @param response the HTTP response object
 */
public void doPost(HttpServletRequest request, HttpServletResponse response, ServletContext context) throws ServletException {
  doGet(request, response,context);
}

代码示例来源:origin: javaee/metro-jax-ws

ServletAdapter target = getTarget(request);
if (target != null) {
  if (logger.isLoggable(Level.FINEST)) {
  Localizer localizer = getLocalizerFor(request);
  writeNotFoundErrorPage(localizer, response, "Invalid Request");

代码示例来源:origin: javaee/metro-jax-ws

public void contextDestroyed(ServletContextEvent event) {
  if (delegate != null) { // the deployment might have failed.
    delegate.destroy();
  }
  if (adapters != null) {
    for(ServletAdapter a : adapters) {
      try {
        a.getEndpoint().dispose();
      } catch(Throwable e) {
        logger.log(Level.SEVERE, e.getMessage(), e);
      }
      // Emit undeployment probe event for each endpoint
      probe.undeploy(a);
    }
  }
  if (logger.isLoggable(Level.INFO)) {
    logger.info(WsservletMessages.LISTENER_INFO_DESTROY());
  }
}

相关文章