Package org.apache.cxf.bus.spring

Examples of org.apache.cxf.bus.spring.SpringBusFactory


     */
    public boolean runTest(int arg0) {
      LOG.info("Executing operation runTest("+arg0+")");

      try {
        SpringBusFactory bf = new SpringBusFactory();
        URL busFile = SecureServiceTestHarnessImpl.class.getResource("/wssec.xml");

        Bus bus = bf.createBus(busFile.toString());
        bf.setThreadDefaultBus(bus);

        QName portName=new QName("http://www.jboss.org/bpel/examples/wsdl", "SecureHelloPort");
       
        URL wsdlURL = new URL("http://127.0.0.1:8080/Quickstart_bpel_secure_serviceWS?wsdl");
       
View Full Code Here


        } catch (MalformedURLException e) {
            e.printStackTrace();
            System.exit(2);
        }
     
        SpringBusFactory bf = new SpringBusFactory();
        URL busFile = ClassLoader.getSystemResource("wssec.xml");
        Bus bus = bf.createBus(busFile.toString());
        bf.setDefaultBus(bus);
       
        QName portName=new QName("http://www.jboss.org/bpel/examples/wsdl", "SecureHelloPort");
       
       
        Service service = Service.create(wsdlURL, SERVICE_NAME);
View Full Code Here

   * @param portName The port name
   * @param baseURI The base URI of the deployment
   */
  public void initializeStack(QName serviceName, QName portName, java.net.URI baseURI) {
    try {
      SpringBusFactory bf = new SpringBusFactory();
         
      URLClassLoader urlcl=new URLClassLoader(new URL[]{baseURI.toURL()});
     
      String filename="jbossws-cxf-"+portName.getLocalPart()+".xml";
         
      URL busFile = urlcl.getResource(filename);
     
      log.debug("Web Stack initialization file: name="+filename+" file="+busFile);
     
      if (busFile != null) {
        Bus bus = bf.createBus(busFile.toString());
        bf.setThreadDefaultBus(bus);
       
        log.debug("Set thread default bus="+bus);
      }
           
    } catch(Exception e) {
View Full Code Here

   * not been created.
   *
   */
  public void serviceCreated() {
    try {
      SpringBusFactory bf = new SpringBusFactory();
         
      bf.setThreadDefaultBus(bf.getDefaultBus());

      log.debug("Have reset thread default bus to default");
           
    } catch(Exception e) {
      log.error("Failed to reset default bus", e);
View Full Code Here

 
  @Override
  public BasicConnectionFactory createConnectionFactory() throws ResourceException {
    QName portQName = SforceService.SERVICE;
    if (this.configFile != null) {
      this.bus = new SpringBusFactory().createBus(this.configFile);
      JaxWsClientFactoryBean instance = new JaxWsClientFactoryBean();
      Configurer configurer = this.bus.getExtension(Configurer.class);
          if (null != configurer) {
              configurer.configureBean(portQName.toString() + ".jaxws-client.proxyFactory", instance); //$NON-NLS-1$
          }
View Full Code Here

    if (configName == null) {
      configName = WSConnectionImpl.DEFAULT_LOCAL_NAME;
    }
    this.portQName = new QName(WSConnectionImpl.DEFAULT_NAMESPACE_URI, configName);
    if (configFile != null) {
      bus = new SpringBusFactory().createBus(configFile);
      JaxWsClientFactoryBean instance = new JaxWsClientFactoryBean();
      Configurer configurer = bus.getExtension(Configurer.class);
          if (null != configurer) {
              configurer.configureBean(portQName.toString() + ".jaxws-client.proxyFactory", instance); //$NON-NLS-1$
          }
View Full Code Here

    }

    protected void run()  {
        URL busFile = Server.class.getResource("server.xml");
        Bus busLocal = new SpringBusFactory().createBus(busFile);
        BusFactory.setDefaultBus(busLocal);
        setBus(busLocal);
    }
View Full Code Here

   
    private WebClient createWebClient(String address) {
        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
        bean.setAddress(address);
       
        SpringBusFactory bf = new SpringBusFactory();
        URL busFile = JAXRSOAuth2Test.class.getResource("client.xml");
        Bus springBus = bf.createBus(busFile.toString());
        bean.setBus(springBus);

        WebClient wc = bean.createWebClient();
        wc.type(MediaType.APPLICATION_FORM_URLENCODED).accept(MediaType.APPLICATION_JSON);
        return wc;
View Full Code Here

       
    }
   
    protected void run()  {
        try {
            Bus busLocal = new SpringBusFactory().createBus(
                "org/apache/cxf/systest/ws/wssc/server/server.xml");
            BusFactory.setDefaultBus(busLocal);
            setBus(busLocal);
            new Server("http://localhost:" + PORT + "/");
        } catch (Exception e) {
View Full Code Here

   
    private WebClient createWebClientWithProps(String address) {
        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
        bean.setAddress(address);
       
        SpringBusFactory bf = new SpringBusFactory();
        URL busFile = JAXRSOAuth2Test.class.getResource("client.xml");
        Bus springBus = bf.createBus(busFile.toString());
        bean.setBus(springBus);

        Map<String, Object> properties = new HashMap<String, Object>();
        properties.put("ws-security.callback-handler",
                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
View Full Code Here

TOP

Related Classes of org.apache.cxf.bus.spring.SpringBusFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.