@Override
 public void loadBus(ServletConfig servletConfig) {
   super.loadBus(servletConfig);
   BimServer bimServer = (BimServer) servletConfig.getServletContext().getAttribute("bimserver");
   Bus bus = getBus();
   BusFactory.setDefaultBus(bus);
   JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
   Map<String, Object> properties = new HashMap<String, Object>();
   properties.put("mtom-enabled", Boolean.TRUE);
   serverFactoryBean.setProperties(properties);
   serverFactoryBean.setServiceClass(ServiceInterface.class);
   serverFactoryBean.setInvoker(new CustomInvoker(bimServer.getServiceFactory()));
   serverFactoryBean.setAddress("/");
   serverFactoryBean.setTransportId("http://schemas.xmlsoap.org/soap/http");
   serverFactoryBean.create();
 }
예제 #2
0
  @Override
  public void loadBus(ServletConfig servletConfig) throws ServletException {
    super.loadBus(servletConfig);

    // TODO: Hacky first version to get default Process Engine
    ProcessEngine processEngine =
        ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault()
            .buildProcessEngine();

    Bus bus = getBus();
    BusFactory.setDefaultBus(bus);
    Endpoint.publish("/RuntimeService", new RuntimeWebServiceImpl(processEngine));

    // You can als use the simple frontend API to do this
    ServerFactoryBean factory = new ServerFactoryBean();
    factory.setBus(bus);
    factory.setServiceClass(RuntimeWebServiceImpl.class);
    factory.setAddress("/RuntimeService");
    factory.create();
  }