Package org.jboss.wsf.spi.deployment

Examples of org.jboss.wsf.spi.deployment.Endpoint


        if (endpointClass == null) {
            throw new NullPointerException("Null endpoint class");
        }

        final Endpoint endpoint = this.deploymentModelFactory.newHttpEndpoint(endpointClass);
        endpoint.setShortName(endpointName);
        dep.getService().addEndpoint(endpoint);

        return endpoint;
    }
View Full Code Here


        if (endpointClass == null) {
            throw new NullPointerException("Null endpoint class");
        }

        final Endpoint endpoint = this.deploymentModelFactory.newJMSEndpoint(endpointClass);
        endpoint.setAddress(soapAddress);
        endpoint.setShortName(endpointName);
        dep.getService().addEndpoint(endpoint);

        return endpoint;
    }
View Full Code Here

            final String ejbName = container.getComponentName();
            this.log.debug("EJB3 name: " + ejbName);
            final String ejbClass = container.getComponentClassName();
            this.log.debug("EJB3 class: " + ejbClass);

            final Endpoint ep = this.newHttpEndpoint(ejbClass, ejbName, dep);
            ep.setProperty(ASHelper.CONTAINER_NAME, container.getContainerName());
        }
    }
View Full Code Here

      SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
      EndpointRegistry epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();

      JMSEndpointResolver resolver = spiProvider.getSPI(JMSEndpointResolver.class);
      resolver.setDestination(destination);
      Endpoint endpoint = epRegistry.resolve(resolver);

      if (endpoint == null)
         throw new IllegalStateException("Cannot find endpoint for destination: " + destination);

      EndpointAssociation.setEndpoint(endpoint);
      try
      {
         boolean debugEnabled = log.isDebugEnabled();
         if (debugEnabled)
            log.debug("dipatchMessage: " + endpoint.getName());

         // [JBWS-1324]: workaround to prevent message processing before endpoint is started
         EndpointState state = endpoint.getState();
         ObjectName name = endpoint.getName();
         long startTime = System.currentTimeMillis();
         if (debugEnabled)
            log.debug(name + " is in state: " + state);
         while (state != EndpointState.STARTED && (System.currentTimeMillis() - startTime < 60000))
         {
            try
            {
               Thread.sleep(1000);
               state = endpoint.getState();
               if (debugEnabled)
                  log.debug(name + " is now in state: " + state);
            }
            catch (InterruptedException e)
            {
               throw new EJBException(e);
            }
         }

         RequestHandler reqHandler = endpoint.getRequestHandler();

         try
         {
            InvocationContext invContext = new InvocationContext();
            invContext.setTargetBean(this);
View Full Code Here

      deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
   }

   public void testCustomizationWriteAccess() throws Exception
   {
      Endpoint endpoint = deploymentModelFactory.newEndpoint(null);
      JAXBBindingCustomization jaxbCustomization = new JAXBBindingCustomization();
      jaxbCustomization.put(JAXBBindingCustomization.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.bindingCustomization");
      endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);

      // a started endpoint should deny customizations
      try
      {
         endpoint.setState(EndpointState.STARTED);
         endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);

         fail("It should not be possible to change bindinig customizations on a started endpoint");
      }
      catch (Exception e)
      {
View Full Code Here

      }
   }

   public void testCustomizationReadAccess() throws Exception
   {
      Endpoint endpoint = deploymentModelFactory.newEndpoint(null);
      JAXBBindingCustomization jaxbCustomization = new JAXBBindingCustomization();
      jaxbCustomization.put(JAXBBindingCustomization.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.bindingCustomization");
      endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);
      endpoint.setState(EndpointState.STARTED);

      // read a single customization
      BindingCustomization knownCustomization = endpoint.getAttachment(BindingCustomization.class);
      assertNotNull(knownCustomization);

      // however the iteratoion should be unmodifiable
      try
      {
         endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);
         fail("Started Endpoints should only axpose read acccess to their binding customizations");
      }
      catch (Exception e)
      {
         // all fine, we'd expect this
View Full Code Here

      SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
      EndpointRegistry registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
     
      ObjectName oname = ObjectNameFactory.create("jboss.ws:context=jaxws-jbws1909,endpoint=TestEndpointImpl");
      Endpoint endpoint = registry.getEndpoint(oname);
      RequestHandler reqHandler = endpoint.getRequestHandler();
     
      try
      {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         reqHandler.handleWSDLRequest(endpoint, baos, null); // The context is null
View Full Code Here

         // JAXBIntros may mofiy the WSDL being generated
         // only true for server side invocation, tooling (WSProvide) doesnt support this
         BindingCustomization bindingCustomization = null;
         if (epMetaData instanceof ServerEndpointMetaData)
         {
            Endpoint endpoint = ((ServerEndpointMetaData)epMetaData).getEndpoint();
            bindingCustomization = endpoint != null ? endpoint.getAttachment(BindingCustomization.class) : null;
         }

         jaxbCtx = factory.createContext(javaTypes.toArray(new Class[0]), typeRefs, targetNS, false, bindingCustomization);
      }
      catch (WSException ex)
View Full Code Here

         if (handler instanceof GenericSOAPHandler)
            ((GenericSOAPHandler)handler).setHeaders(soapHeaders);

         if (injections != null)
         {
            Endpoint ep = EndpointAssociation.getEndpoint();
            Context ctx = ep == null ? null : ep.getJNDIContext();
            InjectionHelper.injectResources(handler, injections, ctx);
         }
         InjectionHelper.callPostConstructMethod(handler);

         addHandler(jaxwsMetaData, handler, type);
View Full Code Here

      WebService anWebService = sepClass.getAnnotation(WebService.class);
      WebServiceProvider anWebServiceProvider = sepClass.getAnnotation(WebServiceProvider.class);
      if ((anWebService == null) && (anWebServiceProvider == null))
         throw new WSException("Cannot obtain neither @WebService nor @WebServiceProvider annotation from: " + sepClass.getName());

      Endpoint ep = dep.getService().getEndpointByName(linkName);
     
      Class<?> seiClass = null;
      String seiName;
      WSDLUtils wsdlUtils = WSDLUtils.getInstance();
View Full Code Here

TOP

Related Classes of org.jboss.wsf.spi.deployment.Endpoint

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.