Java Code Examples for org.apache.cxf.BusFactory#getDefaultBus()

The following examples show how to use org.apache.cxf.BusFactory#getDefaultBus() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UndertowHTTPDestinationTest.java    From cxf with Apache License 2.0 6 votes vote down vote up
@Test
public void testServerPolicyInServiceModel()
    throws Exception {
    policy = new HTTPServerPolicy();
    address = getEPR("bar/foo");
    bus = BusFactory.getDefaultBus(true);

    transportFactory = new HTTPTransportFactory();

    ServiceInfo serviceInfo = new ServiceInfo();
    serviceInfo.setName(new QName("bla", "Service"));
    endpointInfo = new EndpointInfo(serviceInfo, "");
    endpointInfo.setName(new QName("bla", "Port"));
    endpointInfo.addExtensor(policy);

    engine = EasyMock.createMock(UndertowHTTPServerEngine.class);
    EasyMock.replay();
    endpointInfo.setAddress(NOWHERE + "bar/foo");

    UndertowHTTPDestination dest =
        new EasyMockUndertowHTTPDestination(
                bus, transportFactory.getRegistry(), endpointInfo, null, engine);
    assertEquals(policy, dest.getServer());
}
 
Example 2
Source File: JMSTransactionTest.java    From cxf with Apache License 2.0 6 votes vote down vote up
public static void startBusAndJMS(String brokerURI) {
    try {
        transactionManager = new GeronimoTransactionManager();
    } catch (XAException e) {
        throw new IllegalStateException(e.getMessage(), e);
    }
    bus = BusFactory.getDefaultBus();
    registerTransactionManager();
    ActiveMQXAConnectionFactory cf1 = new ActiveMQXAConnectionFactory(brokerURI);
    cf1.setRedeliveryPolicy(redeliveryPolicy());
    JcaPooledConnectionFactory pcf = new JcaPooledConnectionFactory();
    pcf.setTransactionManager(transactionManager);
    pcf.setConnectionFactory(cf1);
    cf = pcf;
    cff = new ConnectionFactoryFeature(pcf);
}
 
Example 3
Source File: AbstractToolContainer.java    From cxf with Apache License 2.0 6 votes vote down vote up
public Bus getBus() {
    Bus bus = BusFactory.getDefaultBus();

    OASISCatalogManager catalogManager = bus.getExtension(OASISCatalogManager.class);

    String catalogLocation = getCatalogURL();
    if (!StringUtils.isEmpty(catalogLocation)) {
        try {
            catalogManager.loadCatalog(new URI(catalogLocation).toURL());
        } catch (Exception e) {
            e.printStackTrace(err);
            throw new ToolException(new Message("FOUND_NO_FRONTEND", LOG, catalogLocation));
        }
    }

    return bus;
}
 
Example 4
Source File: ClassIntrospectorTest.java    From aries-jax-rs-whiteboard with Apache License 2.0 6 votes vote down vote up
@Test
public void testPlainResource() {
    Bus bus = BusFactory.getDefaultBus(true);

    ResourceMethodInfoDTO[] resourceMethodInfoDTOS =
        ClassIntrospector.getResourceMethodInfos(
            PlainResource.class, bus
        ).toArray(
            new ResourceMethodInfoDTO[0]
        );

    assertEquals(1, resourceMethodInfoDTOS.length);

    ResourceMethodInfoDTO resourceMethodInfoDTO =
        resourceMethodInfoDTOS[0];

    assertEquals(HttpMethod.GET, resourceMethodInfoDTO.method);
    assertNull(resourceMethodInfoDTO.consumingMimeType);
    assertNull(resourceMethodInfoDTO.producingMimeType);
    assertEquals("/", resourceMethodInfoDTO.path);
    assertNull(resourceMethodInfoDTO.nameBindings);
}
 
Example 5
Source File: ReadHeaderInterceptorTest.java    From cxf with Apache License 2.0 6 votes vote down vote up
@Test
public void testBadSOAPEnvelopeNamespace() throws Exception {
    soapMessage = TestUtil.createEmptySoapMessage(Soap12.getInstance(), chain);
    InputStream in = getClass().getResourceAsStream("test-bad-env.xml");
    assertNotNull(in);
    ByteArrayDataSource bads = new ByteArrayDataSource(in, "test/xml");
    soapMessage.setContent(InputStream.class, bads.getInputStream());

    ReadHeadersInterceptor r = new ReadHeadersInterceptor(BusFactory.getDefaultBus());
    try {
        r.handleMessage(soapMessage);
        fail("Did not throw exception");
    } catch (SoapFault f) {
        assertEquals(Soap11.getInstance().getVersionMismatch(), f.getFaultCode());
    }
}
 
Example 6
Source File: RxJava2ObservableServer.java    From cxf with Apache License 2.0 5 votes vote down vote up
protected void run() {
    Bus bus = BusFactory.getDefaultBus();
    // Make sure default JSONProvider is not loaded
    bus.setProperty("skip.default.json.provider.registration", true);
    JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
    sf.setInvoker(new ReactiveIOInvoker());
    sf.setProvider(new JacksonJsonProvider());
    sf.getOutInterceptors().add(new LoggingOutInterceptor());
    sf.setResourceClasses(RxJava2ObservableService.class);
    sf.setResourceProvider(RxJava2ObservableService.class,
                           new SingletonResourceProvider(new RxJava2ObservableService(), true));
    sf.setAddress("http://localhost:" + PORT + "/");
    server = sf.create();
}
 
Example 7
Source File: HTTPSConduitTest.java    From cxf with Apache License 2.0 5 votes vote down vote up
@AfterClass
public static void cleanUp() {
    Bus b = BusFactory.getDefaultBus(false);
    if (b != null) {
        b.shutdown(true);
    }
    b = BusFactory.getThreadDefaultBus(false);
    if (b != null) {
        b.shutdown(true);
    }
}
 
Example 8
Source File: TrustServerNoSpring.java    From cxf with Apache License 2.0 5 votes vote down vote up
protected void run()  {
    Bus busLocal = BusFactory.getDefaultBus(true);
    setBus(busLocal);

    String address = "https://localhost:" + TrustManagerTest.PORT3 + "/SoapContext/HttpsPort";

    try {
        KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
        keyStore.load(ClassLoaderUtils.getResourceAsStream("keys/Bethal.jks",
                                                           this.getClass()),
                      "password".toCharArray());

        KeyManagerFactory kmf  =
            KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
        kmf.init(keyStore, "password".toCharArray());

        TLSServerParameters tlsParams = new TLSServerParameters();
        tlsParams.setKeyManagers(kmf.getKeyManagers());

        ClientAuthentication clientAuthentication = new ClientAuthentication();
        clientAuthentication.setRequired(false);
        clientAuthentication.setWant(true);
        tlsParams.setClientAuthentication(clientAuthentication);

        Map<String, TLSServerParameters> map = new HashMap<>();
        map.put("tlsId", tlsParams);

        JettyHTTPServerEngineFactory factory =
            busLocal.getExtension(JettyHTTPServerEngineFactory.class);
        factory.setTlsServerParametersMap(map);
        factory.createJettyHTTPServerEngine("localhost", Integer.parseInt(TrustManagerTest.PORT3),
                                            "https", "tlsId");

        factory.initComplete();
    } catch (Exception ex) {
        ex.printStackTrace();
    }

    Endpoint.publish(address, new GreeterImpl());
}
 
Example 9
Source File: ReactorServer.java    From cxf with Apache License 2.0 5 votes vote down vote up
@Override
protected void run() {
    Bus bus = BusFactory.getDefaultBus();
    // Make sure default JSONProvider is not loaded
    bus.setProperty("skip.default.json.provider.registration", true);
    JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
    sf.getProperties(true).put("useStreamingSubscriber", false);
    sf.setProvider(new JacksonJsonProvider());
    new ReactorCustomizer().customize(sf);
    sf.setResourceClasses(FluxService.class, MonoService.class);
    sf.setResourceProvider(FluxService.class,
            new SingletonResourceProvider(new FluxService(), true));
    sf.setResourceProvider(MonoService.class,
            new SingletonResourceProvider(new MonoService(), true));
    sf.setAddress("http://localhost:" + PORT + "/reactor");
    server1 = sf.create();
    
    JAXRSServerFactoryBean sf2 = new JAXRSServerFactoryBean();
    sf2.setProvider(new JacksonJsonProvider());
    sf2.setProvider(new IllegalArgumentExceptionMapper());
    new ReactorCustomizer().customize(sf2);
    sf2.setResourceClasses(FluxService.class);
    sf2.setResourceProvider(FluxService.class,
            new SingletonResourceProvider(new FluxService(), true));
    sf2.setAddress("http://localhost:" + PORT + "/reactor2");
    server2 = sf2.create();
}
 
Example 10
Source File: RxJava3ObservableServer.java    From cxf with Apache License 2.0 5 votes vote down vote up
protected void run() {
    Bus bus = BusFactory.getDefaultBus();
    // Make sure default JSONProvider is not loaded
    bus.setProperty("skip.default.json.provider.registration", true);
    JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
    sf.setInvoker(new ReactiveIOInvoker());
    sf.setProvider(new JacksonJsonProvider());
    sf.getOutInterceptors().add(new LoggingOutInterceptor());
    sf.setResourceClasses(RxJava3ObservableService.class);
    sf.setResourceProvider(RxJava3ObservableService.class,
                           new SingletonResourceProvider(new RxJava3ObservableService(), true));
    sf.setAddress("http://localhost:" + PORT + "/");
    server = sf.create();
}
 
Example 11
Source File: ProxyInvocationHandlerTest.java    From cxf with Apache License 2.0 5 votes vote down vote up
@Test
public void testInvokeSetsBusCurrent() throws Throwable {
    Bus oldBus = BusFactory.getDefaultBus();

    testObject.invoke(target, testMethod, new Object[] {});

    Bus newBus = BusFactory.getDefaultBus();

    assertSame("Current Bus has been set and is as expected, val=" + newBus, newBus, mockBus);
     // set back the JVM current local variable
    BusFactory.setDefaultBus(oldBus);
}
 
Example 12
Source File: ControlImpl.java    From cxf with Apache License 2.0 5 votes vote down vote up
public boolean startGreeter(String cfgResource) {
    LOG.fine("Starting greeter with cfgResource: " + cfgResource);
    greeterBus = null;
    BusFactory.setDefaultBus(null);
    String original = System.clearProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME);
    try {
        if (cfgResource != null && cfgResource.length() > 0) {
            System.setProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME, cfgResource);
        }

        String a = address == null ? "http://localhost:9020/SoapContext/GreeterPort" : address;
        Object i = implementor == null ? new GreeterImpl() : implementor;
        endpoint = Endpoint.publish(a, i);
        LOG.info("Published greeter endpoint on bus with cfg file resource: " + cfgResource);
        greeterBus = BusFactory.getDefaultBus();
    } finally {
        System.clearProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME);
        if (null != original) {
            System.setProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME, cfgResource);
        }
    }
    if (implementor instanceof AbstractGreeterImpl) {
        ((AbstractGreeterImpl)implementor).resetLastOnewayArg();
    }

    return null != greeterBus;
}
 
Example 13
Source File: JettyHTTPDestinationTest.java    From cxf with Apache License 2.0 5 votes vote down vote up
@Test
public void testRandomPortAllocation() throws Exception {
    bus = BusFactory.getDefaultBus(true);
    transportFactory = new HTTPTransportFactory();
    ServiceInfo serviceInfo = new ServiceInfo();
    serviceInfo.setName(new QName("bla", "Service"));
    EndpointInfo ei = new EndpointInfo(serviceInfo, "");
    ei.setName(new QName("bla", "Port"));

    Destination d1 = transportFactory.getDestination(ei, bus);
    URL url = new URL(d1.getAddress().getAddress().getValue());
    assertTrue("No random port has been allocated",
               url.getPort() > 0);

}
 
Example 14
Source File: SoapOutInterceptorTest.java    From cxf with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    super.setUp();
    StaxInInterceptor sii = new StaxInInterceptor("phase1");
    chain.add(sii);

    rhi = new ReadHeadersInterceptor(BusFactory.getDefaultBus(), "phase2");
    chain.add(rhi);
    sbi = new StartBodyInterceptor("phase1.5");
    chain.add(sbi);

    soi = new SoapOutInterceptor(BusFactory.getDefaultBus(), "phase3");
    chain.add(soi);
}
 
Example 15
Source File: ServiceListGeneratorServlet.java    From cxf with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public void service(HttpServletRequest request,
                    HttpServletResponse response) throws ServletException, IOException {
    Object obj = request.getAttribute(ServletController.AUTH_SERVICE_LIST);
    boolean isAuthServiceList = false;
    if (obj != null) {
        isAuthServiceList = Boolean.valueOf(obj.toString());
    }
    if (isAuthServiceList) {
        String authServiceListRealm = (String)request.getAttribute(ServletController.AUTH_SERVICE_LIST_REALM);
        ServiceListJAASAuthenticator authenticator = new ServiceListJAASAuthenticator();
        authenticator.setRealm(authServiceListRealm);
        if (!authenticator.authenticate(request, response)) {
            return;
        }
        request.removeAttribute(ServletController.AUTH_SERVICE_LIST);
        request.removeAttribute(ServletController.AUTH_SERVICE_LIST_REALM);
    }
    AbstractDestination[] destinations = destinationRegistry.getSortedDestinations();
    if (request.getParameter("stylesheet") != null) {
        renderStyleSheet(request, response);
        return;
    }
    List<String> privateEndpoints;
    if (bus == null) {
        bus = BusFactory.getDefaultBus(false);
    }
    if (bus != null) {
        privateEndpoints = (List<String>)bus.getProperty("org.apache.cxf.private.endpoints");
    } else {
        privateEndpoints = new ArrayList<>();
    }

    AbstractDestination[] soapEndpoints = getSOAPEndpoints(destinations, privateEndpoints);
    AbstractDestination[] restEndpoints = getRestEndpoints(destinations, privateEndpoints);
    ServiceListWriter serviceListWriter;
    if ("false".equals(request.getParameter("formatted"))) {
        boolean renderWsdlList = "true".equals(request.getParameter("wsdlList"));
        serviceListWriter = new UnformattedServiceListWriter(renderWsdlList, bus);
    } else {
        String styleSheetPath;
        if (serviceListStyleSheet != null) {
            styleSheetPath = request.getContextPath() + "/" + serviceListStyleSheet;
        } else {
            styleSheetPath = "";
            String contextPath = request.getContextPath();
            if (contextPath != null) {
                styleSheetPath += contextPath;
            }
            String servletPath = request.getServletPath();
            if (servletPath != null) {
                styleSheetPath += servletPath;
            }
            String pathInfo = request.getPathInfo();
            if (pathInfo != null) {
                styleSheetPath += pathInfo;
            }

            if (!styleSheetPath.endsWith("/")) {
                styleSheetPath += "/";
            }
            styleSheetPath += "?stylesheet=1";
        }
        serviceListWriter =
            new FormattedServiceListWriter(styleSheetPath, title, showForeignContexts, bus);

    }
    response.setContentType(serviceListWriter.getContentType());
    Object basePath = request.getAttribute(Message.BASE_PATH);
    serviceListWriter.writeServiceList(response.getWriter(),
                                       basePath == null ? null : basePath.toString(),
                                       soapEndpoints, restEndpoints);
}
 
Example 16
Source File: ColocOutInterceptor.java    From cxf with Apache License 2.0 4 votes vote down vote up
public void handleMessage(Message message) throws Fault {
    if (bus == null) {
        bus = message.getExchange().getBus();
        if (bus == null) {
            bus = BusFactory.getDefaultBus(false);
        }
        if (bus == null) {
            throw new Fault(new org.apache.cxf.common.i18n.Message("BUS_NOT_FOUND", BUNDLE));
        }
    }

    ServerRegistry registry = bus.getExtension(ServerRegistry.class);

    if (registry == null) {
        throw new Fault(new org.apache.cxf.common.i18n.Message("SERVER_REGISTRY_NOT_FOUND", BUNDLE));
    }

    Exchange exchange = message.getExchange();
    Endpoint senderEndpoint = exchange.getEndpoint();

    if (senderEndpoint == null) {
        throw new Fault(new org.apache.cxf.common.i18n.Message("ENDPOINT_NOT_FOUND",
                                                               BUNDLE));
    }

    BindingOperationInfo boi = exchange.getBindingOperationInfo();

    if (boi == null) {
        throw new Fault(new org.apache.cxf.common.i18n.Message("OPERATIONINFO_NOT_FOUND",
                                                               BUNDLE));
    }

    Server srv = isColocated(registry.getServers(), senderEndpoint, boi);

    if (srv != null) {
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Operation:" + boi.getName() + " dispatched as colocated call.");
        }

        InterceptorChain outChain = message.getInterceptorChain();
        outChain.abort();
        exchange.put(Bus.class, bus);
        message.put(COLOCATED, Boolean.TRUE);
        message.put(Message.WSDL_OPERATION, boi.getName());
        message.put(Message.WSDL_INTERFACE, boi.getBinding().getInterface().getName());
        invokeColocObserver(message, srv.getEndpoint());
        if (!exchange.isOneWay()) {
            invokeInboundChain(exchange, senderEndpoint);
        }
    } else {
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Operation:" + boi.getName() + " dispatched as remote call.");
        }

        message.put(COLOCATED, Boolean.FALSE);
    }
}
 
Example 17
Source File: JAXWSImporterAbstractTest.java    From fuchsia with Apache License 2.0 4 votes vote down vote up
protected void startServer() throws Exception {

        httpServer = new Server(HTTP_PORT);

        Bus bus = BusFactory.getDefaultBus(true);
        ContextHandlerCollection contexts = new ContextHandlerCollection();
        httpServer.setHandler(contexts);

        ServletContextHandler root = new ServletContextHandler(contexts, "/",
                ServletContextHandler.SESSIONS);

        BusFactory.setDefaultBus(bus);

        CXFServlet cxf = new CXFServlet();

        cxf.setBus(bus);

        ServletHolder servlet = new ServletHolder(cxf);

        root.addServlet(servlet, "/cxf/*");

        httpServer.start();

    }
 
Example 18
Source File: ClassResourceInfo.java    From cxf with Apache License 2.0 4 votes vote down vote up
public ClassResourceInfo(Class<?> theResourceClass, Class<?> theServiceClass, boolean theRoot) {
    this(theResourceClass, theServiceClass, theRoot, false, BusFactory.getDefaultBus(true));
}
 
Example 19
Source File: NoSpringServletServer.java    From cxf with Apache License 2.0 4 votes vote down vote up
@Override
protected void run() {
    // setup the system properties
    String busFactory = System.getProperty(BusFactory.BUS_FACTORY_PROPERTY_NAME);
    System.setProperty(BusFactory.BUS_FACTORY_PROPERTY_NAME, "org.apache.cxf.bus.CXFBusFactory");
    try {
        httpServer = new Server(Integer.parseInt(PORT));
        ContextHandlerCollection contexts = new ContextHandlerCollection();
        httpServer.setHandler(contexts);

        ServletContextHandler root = new ServletContextHandler(contexts, "/",
                                                               ServletContextHandler.SESSIONS);
        bus = BusFactory.getDefaultBus(true);
        CXFServlet cxf = new CXFServlet();
        cxf.setBus(bus);
        ServletHolder servlet = new ServletHolder(cxf);
        servlet.setName("soap");
        servlet.setForcedPath("soap");
        root.addServlet(servlet, "/soap/*");

        httpServer.start();
        setBus(bus);
        BusFactory.setDefaultBus(bus);
        GreeterImpl impl = new GreeterImpl();
        Endpoint.publish("/Greeter", impl);
        HelloImpl helloImpl = new HelloImpl();
        Endpoint.publish("/Hello", helloImpl);

        ((EndpointImpl)Endpoint.create(helloImpl)).publish("/");

    } catch (Exception e) {
        throw new RuntimeException(e);
    } finally {
        // clean up the system properties
        if (busFactory != null) {
            System.setProperty(BusFactory.BUS_FACTORY_PROPERTY_NAME, busFactory);
        } else {
            System.clearProperty(BusFactory.BUS_FACTORY_PROPERTY_NAME);
        }
    }
}
 
Example 20
Source File: PolicyAnnotationTest.java    From cxf with Apache License 2.0 4 votes vote down vote up
@org.junit.Test
public void testAnnotationsInterfaceAsClass() throws Exception {
    Bus bus = BusFactory.getDefaultBus();
    JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
    factory.setBus(bus);
    factory.setServiceBean(new TestImpl());
    factory.setServiceClass(TestInterface.class);
    factory.setStart(false);
    List<String> tp = Arrays.asList(
        "http://schemas.xmlsoap.org/soap/http",
        "http://schemas.xmlsoap.org/wsdl/http/",
        "http://schemas.xmlsoap.org/wsdl/soap/http",
        "http://www.w3.org/2003/05/soap/bindings/HTTP/",
        "http://cxf.apache.org/transports/http/configuration",
        "http://cxf.apache.org/bindings/xformat");

    LocalTransportFactory f = new LocalTransportFactory();
    f.getUriPrefixes().add("http");
    f.setTransportIds(tp);


    Server s = factory.create();

    try {
        ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus,
                                                            s.getEndpoint().getService()
                                                                .getServiceInfos());
        Definition def = builder.build();
        WSDLWriter wsdlWriter = bus.getExtension(WSDLManager.class)
            .getWSDLFactory().newWSDLWriter();
        def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
        Element wsdl = wsdlWriter.getDocument(def).getDocumentElement();

        Map<String, String> ns = new HashMap<>();
        ns.put("wsdl", WSDLConstants.NS_WSDL11);
        ns.put("wsu",
               "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
        ns.put("wsp", Constants.URI_POLICY_13_NS);
        XPathUtils xpu = new XPathUtils(ns);
        //org.apache.cxf.helpers.XMLUtils.printDOM(wsdl);
        check(xpu, wsdl, "/wsdl:definitions/wsdl:service/wsdl:port", "TestInterfacePortPortPolicy");
        check(xpu, wsdl, "/wsdl:definitions/wsdl:portType/", "TestInterfacePortTypePolicy");
        check(xpu, wsdl, "/wsdl:definitions/wsdl:portType/wsdl:operation/", "echoIntPortTypeOpPolicy");
        check(xpu, wsdl, "/wsdl:definitions/wsdl:portType/wsdl:operation/wsdl:input",
              "echoIntPortTypeOpInputPolicy");
        check(xpu, wsdl, "/wsdl:definitions/wsdl:portType/wsdl:operation/wsdl:output",
              "echoIntPortTypeOpOutputPolicy");
        check(xpu, wsdl, "/wsdl:definitions/wsdl:binding/",
              "TestInterfaceServiceSoapBindingBindingPolicy");
        check(xpu, wsdl, "/wsdl:definitions/wsdl:binding/wsdl:operation/", "echoIntBindingOpPolicy");
        check(xpu, wsdl, "/wsdl:definitions/wsdl:binding/wsdl:operation/wsdl:input",
              "echoIntBindingOpInputPolicy");
        check(xpu, wsdl, "/wsdl:definitions/wsdl:binding/wsdl:operation/wsdl:output",
              "echoIntBindingOpOutputPolicy");
        check(xpu, wsdl, "/wsdl:definitions/wsdl:service/", "TestInterfaceServiceServicePolicy");

        assertEquals(1,
                     xpu.getValueList("/wsdl:definitions/wsdl:binding/wsdl:operation/"
                                          + "wsp:PolicyReference[@URI='#echoIntBindingOpPolicy']", wsdl)
                         .getLength());

    } finally {
        bus.shutdown(true);
    }
}