gpt4 book ai didi

org.apache.openejb.server.webservices.WsService类的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 21:05:05 28 4
gpt4 key购买 nike

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

WsService介绍

暂无

代码示例

代码示例来源:origin: org.apache.openejb/tomee-webservices

@Override
  public void afterApplicationCreated(AppInfo appInfo, WebAppInfo webApp) {
    // required for Pojo Web Services because when Assembler creates the application
    // the CoreContainerSystem does not contain the WebContext
    // see also the start method getContainerSystem().addWebDeployment(webContext);
    WsService component = SystemInstance.get().getComponent(WsService.class);
    if (component == null) return;
    component.afterApplicationCreated(webApp);
  }
}

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-webservices

destroyEjbWsContainer(enterpriseBean.ejbDeploymentId);
destroyPojoWsContainer(portInfo.serviceLink);

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-webservices

private String autoAssignWsLocation(EnterpriseBeanInfo bean, PortData port, Map<String, String> contextData, StringTemplate template) {
  contextData.put("ejbDeploymentId", bean.ejbDeploymentId);
  contextData.put("ejbType", getEjbType(bean.type));
  contextData.put("ejbClass", bean.ejbClass);
  contextData.put("ejbClass.simpleName", bean.ejbClass.substring(bean.ejbClass.lastIndexOf('.') + 1));
  contextData.put("ejbName", bean.ejbName);
  contextData.put("portComponentName", port.getPortName().getLocalPart());
  contextData.put("wsdlPort", port.getWsdlPort().getLocalPart());
  contextData.put("wsdlService", port.getWsdlService().getLocalPart());
  return template.apply(contextData);
}

代码示例来源:origin: org.apache.openejb/openejb-webservices

final String host = host(ejbJar, appInfo);
for (final EnterpriseBeanInfo bean : ejbJar.enterpriseBeans) {
  if (bean instanceof StatelessBeanInfo || bean instanceof SingletonBeanInfo) {
      final PortData port = WsBuilder.toPortData(portInfo, beanContext.getInjections(), moduleBaseUrl, beanContext.getClassLoader());
      final HttpListener container = createEjbWsContainer(moduleBaseUrl, port, beanContext, new ServiceConfiguration(beanContext.getProperties(), appInfo.services));
        location = autoAssignWsLocation(bean, port, contextData, deploymentIdTemplate);
          setWsdl(container, address);
          logger.info("Webservice(wsdl=" + address + ", qname=" + port.getWsdlService() + ") --> Ejb(id=" + portInfo.portId + ")");
          ejbAddresses.put(bean.ejbDeploymentId, address);
          addressesForApp(appInfo.appId).add(new EndpointInfo(address, port.getWsdlService(), beanContext.getBeanClass().getName()));
  afterApplicationCreated(appInfo, webApp);

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-webservices

PortData port = WsBuilder.toPortData(portInfo, deploymentInfo.getInjections(), moduleBaseUrl, deploymentInfo.getClassLoader());
      HttpListener container = createEjbWsContainer(moduleBaseUrl, port, deploymentInfo);
        location = autoAssignWsLocation(bean, port, contextData, deploymentIdTemplate);
        String address = selectSingleAddress(addresses);
afterApplicationCreated(webApp);

代码示例来源:origin: org.apache.openejb/openejb-webservices

addressesForApp(appInfo.appId).remove(new EndpointInfo(address, portInfo.wsdlPort, beanContext.getBeanClass().getName()));
  destroyEjbWsContainer(enterpriseBean.ejbDeploymentId);
  ejbLocations.remove(enterpriseBean.ejbDeploymentId);
    this.wsRegistry.clearWsContainer(webApp.contextRoot, host(webApp), servlet);
  } catch (final IllegalArgumentException ignored) {
destroyPojoWsContainer(portInfo.serviceLink);

代码示例来源:origin: org.apache.openejb/openejb-webservices

final HttpListener container = createPojoWsContainer(classLoader, moduleBaseUrl, port, portInfo.serviceLink,
  target, context, webApp.contextRoot, bindings,
  new ServiceConfiguration(PojoUtil.findConfiguration(pojoConfiguration, target.getName()), appInfo.services));
  final List<String> addresses = wsRegistry.setWsContainer(container, classLoader, webApp.contextRoot, host(webApp), servlet, realm, transport, auth);
  setWsdl(container, address);
  logger.info("Webservice(wsdl=" + address + ", qname=" + port.getWsdlService() + ") --> Pojo(id=" + portInfo.portId + ")");
  servletAddresses.put(webApp.moduleId + "." + servlet.servletName, address);
  addressesForApp(webApp.moduleId).add(new EndpointInfo(address, port.getWsdlService(), target.getName()));

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-webservices

HttpListener container = createPojoWsContainer(moduleBaseUrl, port, portInfo.serviceLink, target, context, webApp.contextRoot);
  String address = selectSingleAddress(addresses);

代码示例来源:origin: org.apache.tomee/openejb-webservices

public void newEjbToDeploy(final @Observes NewEjbAvailableAfterApplicationCreated event) {
  final AppInfo app = event.getApp();
  if (!deployedApplications.containsKey(app)) {
    deployedApplications.putIfAbsent(app, new LinkedList<BeanContext>());
  }
  deployApp(app, event.getBeanContexts());
}

代码示例来源:origin: org.apache.tomee/openejb-webservices

@Override
public void start() throws ServiceException {
  wsRegistry = SystemInstance.get().getComponent(WsRegistry.class);
  if (wsRegistry == null && SystemInstance.get().getComponent(HttpListenerRegistry.class) != null) {
    wsRegistry = new OpenEJBHttpWsRegistry();
  }
  if (portAddressRegistry == null) {
    portAddressRegistry = new PortAddressRegistryImpl();
    SystemInstance.get().setComponent(PortAddressRegistry.class, portAddressRegistry);
  }
  containerSystem = (CoreContainerSystem) SystemInstance.get().getComponent(ContainerSystem.class);
  portAddressRegistry = SystemInstance.get().getComponent(PortAddressRegistry.class);
  assembler = SystemInstance.get().getComponent(Assembler.class);
  SystemInstance.get().setComponent(WsService.class, this);
  if (assembler != null) {
    SystemInstance.get().addObserver(this);
    for (final AppInfo appInfo : assembler.getDeployedApplications()) {
      final AppContext appContext = containerSystem.getAppContext(appInfo.appId);
      deploy(new AssemblerAfterApplicationCreated(appInfo, appContext, null));
    }
  }
}

代码示例来源:origin: org.apache.tomee/openejb-webservices

final String host = host(ejbJar, appInfo);
      final PortData port = WsBuilder.toPortData(portInfo, beanContext.getInjections(), moduleBaseUrl, beanContext.getClassLoader());
      final HttpListener container = createEjbWsContainer(moduleBaseUrl, port, beanContext, new ServiceConfiguration(beanContext.getProperties(), appInfo.services));
        location = autoAssignWsLocation(bean, port, contextData, deploymentIdTemplate);
          setWsdl(container, address);
          logger.info("Webservice(wsdl=" + address + ", qname=" + port.getWsdlService() + ") --> Ejb(id=" + portInfo.portId + ")");
          ejbAddresses.put(bean.ejbDeploymentId, address);
          addressesForApp(appInfo.appId).add(new EndpointInfo(address, port.getWsdlService(), beanContext.getBeanClass().getName()));
  afterApplicationCreated(appInfo, webApp);

代码示例来源:origin: org.apache.tomee/openejb-webservices

addressesForApp(appInfo.appId).remove(new EndpointInfo(address, portInfo.wsdlPort, beanContext.getBeanClass().getName()));
  destroyEjbWsContainer(enterpriseBean.ejbDeploymentId);
  ejbLocations.remove(enterpriseBean.ejbDeploymentId);
    this.wsRegistry.clearWsContainer(webApp.contextRoot, host(webApp), servlet, webApp.moduleId);
  } catch (final IllegalArgumentException ignored) {
destroyPojoWsContainer(portInfo.serviceLink);

代码示例来源:origin: org.apache.tomee/openejb-webservices

final HttpListener container = createPojoWsContainer(classLoader, moduleBaseUrl, port, portInfo.serviceLink,
  target, context, webApp.contextRoot, bindings,
  new ServiceConfiguration(PojoUtil.findConfiguration(pojoConfiguration, target.getName()), appInfo.services));
  final List<String> addresses = wsRegistry.setWsContainer(container, classLoader, webApp.contextRoot, host(webApp), servlet, realm, transport, auth, webApp.moduleId);
  setWsdl(container, address);
  logger.info("Webservice(wsdl=" + address + ", qname=" + port.getWsdlService() + ") --> Pojo(id=" + portInfo.portId + ")");
  servletAddresses.put(webApp.moduleId + "." + servlet.servletName, address);
  addressesForApp(webApp.moduleId).add(new EndpointInfo(address, port.getWsdlService(), target.getName()));

代码示例来源:origin: org.apache.openejb/openejb-webservices

public void newEjbToDeploy(final @Observes NewEjbAvailableAfterApplicationCreated event) {
  final AppInfo app = event.getApp();
  if (!deployedApplications.containsKey(app)) {
    deployedApplications.putIfAbsent(app, new LinkedList<BeanContext>());
  }
  deployApp(app, event.getBeanContexts());
}

代码示例来源:origin: org.apache.openejb/openejb-webservices

@Override
public void start() throws ServiceException {
  wsRegistry = SystemInstance.get().getComponent(WsRegistry.class);
  if (wsRegistry == null && SystemInstance.get().getComponent(HttpListenerRegistry.class) != null) {
    wsRegistry = new OpenEJBHttpWsRegistry();
  }
  if (portAddressRegistry == null) {
    portAddressRegistry = new PortAddressRegistryImpl();
    SystemInstance.get().setComponent(PortAddressRegistry.class, portAddressRegistry);
  }
  containerSystem = (CoreContainerSystem) SystemInstance.get().getComponent(ContainerSystem.class);
  portAddressRegistry = SystemInstance.get().getComponent(PortAddressRegistry.class);
  assembler = SystemInstance.get().getComponent(Assembler.class);
  SystemInstance.get().setComponent(WsService.class, this);
  if (assembler != null) {
    SystemInstance.get().addObserver(this);
    for (final AppInfo appInfo : assembler.getDeployedApplications()) {
      final AppContext appContext = containerSystem.getAppContext(appInfo.appId);
      deploy(new AssemblerAfterApplicationCreated(appInfo, appContext, null));
    }
  }
}

代码示例来源:origin: org.apache.openejb/openejb-tomcat-catalina

List<WebAppInfo> webApps = contextInfo.appInfo.webApps;
for (WebAppInfo webApp : webApps) {
  wsService.afterApplicationCreated(webApp);

代码示例来源:origin: org.apache.tomee/openejb-webservices

private String autoAssignWsLocation(final EnterpriseBeanInfo bean, final PortData port, final Map<String, String> contextData, final StringTemplate template) {
  if (bean.properties.containsKey(WS_FORCE_ADDRESS)) {
    return bean.properties.getProperty(WS_FORCE_ADDRESS);
  }
  contextData.put("ejbDeploymentId", bean.ejbDeploymentId);
  contextData.put("ejbType", getEjbType(bean.type));
  contextData.put("ejbClass", bean.ejbClass);
  contextData.put("ejbClass.simpleName", bean.ejbClass.substring(bean.ejbClass.lastIndexOf('.') + 1));
  contextData.put("ejbName", bean.ejbName);
  contextData.put("portComponentName", port.getPortName().getLocalPart());
  contextData.put("wsdlPort", port.getWsdlPort().getLocalPart());
  contextData.put("wsdlService", port.getWsdlService().getLocalPart());
  return template.apply(contextData);
}

代码示例来源:origin: org.apache.openejb/openejb-webservices

public void deploy(final @Observes AssemblerAfterApplicationCreated event) {
  final AppInfo appInfo = event.getApp();
  if (deployedApplications.put(appInfo, new LinkedList<BeanContext>()) == null) {
    deployApp(appInfo, event.getContext().getBeanContexts());
  }
}

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-webservices

public void start() throws ServiceException {
  wsRegistry = SystemInstance.get().getComponent(WsRegistry.class);
  if (wsRegistry == null && SystemInstance.get().getComponent(HttpListenerRegistry.class) != null) {
    wsRegistry = new OpenEJBHttpWsRegistry();
  }
  if (portAddressRegistry == null) {
    portAddressRegistry = new PortAddressRegistryImpl();
    SystemInstance.get().setComponent(PortAddressRegistry.class, portAddressRegistry);
  }
  containerSystem = (CoreContainerSystem) SystemInstance.get().getComponent(ContainerSystem.class);
  portAddressRegistry = SystemInstance.get().getComponent(PortAddressRegistry.class);
  assembler = SystemInstance.get().getComponent(Assembler.class);
  SystemInstance.get().setComponent(WsService.class, this);
  if (assembler != null) {
    assembler.addDeploymentListener(this);
    for (AppInfo appInfo : assembler.getDeployedApplications()) {
      afterApplicationCreated(appInfo);
    }
  }
}

代码示例来源:origin: org.apache.openejb/openejb-webservices

private String autoAssignWsLocation(final EnterpriseBeanInfo bean, final PortData port, final Map<String, String> contextData, final StringTemplate template) {
  if (bean.properties.containsKey(WS_FORCE_ADDRESS)) {
    return bean.properties.getProperty(WS_FORCE_ADDRESS);
  }
  contextData.put("ejbDeploymentId", bean.ejbDeploymentId);
  contextData.put("ejbType", getEjbType(bean.type));
  contextData.put("ejbClass", bean.ejbClass);
  contextData.put("ejbClass.simpleName", bean.ejbClass.substring(bean.ejbClass.lastIndexOf('.') + 1));
  contextData.put("ejbName", bean.ejbName);
  contextData.put("portComponentName", port.getPortName().getLocalPart());
  contextData.put("wsdlPort", port.getWsdlPort().getLocalPart());
  contextData.put("wsdlService", port.getWsdlService().getLocalPart());
  return template.apply(contextData);
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com