Package org.jboss.soa.esb

Examples of org.jboss.soa.esb.Service


                    String key = buildDestinationKey(curr);
                    String category = curr.getAttribute(
                            ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, "");
                    String name = curr
                            .getRequiredAttribute(ListenerTagNames.SERVICE_NAME_TAG);
                    Service service = new Service(category, name);
                    _destinations.put(key, service);
                    messageMulticaster.addRecipient(service);
                }
                catch (Exception e) {
                    throw new ConfigurationException(
View Full Code Here


        final ClassLoader deploymentClassLoader = LifecycleResourceManager.getSingleton().getClassLoaderForDeployment(deployment) ;
        if (deploymentClassLoader != null) {
            Thread.currentThread().setContextClassLoader(deploymentClassLoader) ;
        }
        try {
            service = new Service(
              config.getInitParameter(ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG),
              config.getInitParameter(ListenerTagNames.TARGET_SERVICE_NAME_TAG)
            );
            try {
                serviceInvoker = new ServiceInvoker(service);
View Full Code Here

    private Service service;

    @Initialize
    public void init(ConfigTree config) {
        service = new Service(config.getParent().getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG), config.getParent().getAttribute(ListenerTagNames.SERVICE_NAME_TAG));
    }
View Full Code Here

        assertEquals("C3", publishers.get(2).getCategory() + publishers.get(2).getServiceName());
        assertEquals(null, publishers.get(2).getContractPublisher());
        assertEquals("D4", publishers.get(3).getCategory() + publishers.get(3).getServiceName());
        assertTrue(publishers.get(3).getContractPublisher() instanceof MockContractPublisher);
       
        assertEquals("A1", 1, ServicePublisher.getServicePublishers(new Service("A", "1")).size()) ;
        assertEquals("B2", 1, ServicePublisher.getServicePublishers(new Service("B", "2")).size()) ;
        assertEquals("C3", 1, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
        assertEquals("D4", 1, ServicePublisher.getServicePublishers(new Service("D", "4")).size()) ;
       
        assertEquals("Service count", 4, ServicePublisher.getServices().size());

        final ESBServiceContractReferencePublisher publisher = new ESBServiceContractReferencePublisher(new Service("C", "3"), "test", "endpoint") ;
        ServicePublisher.addContractReferencePublishers(controller2, Arrays.asList(publisher)) ;
        assertEquals("C3", 2, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
       
        assertEquals("Service count", 4, ServicePublisher.getServices().size());
       
        ServicePublisher.removeServicePublishers(controller1);
        publishers = ServicePublisher.getServicePublishers();
        assertEquals(3, publishers.size());
        assertEquals("C3", publishers.get(0).getCategory() + publishers.get(0).getServiceName());
        assertEquals(null, publishers.get(0).getContractPublisher());
        assertEquals("C3", publishers.get(1).getCategory() + publishers.get(1).getServiceName());
        assertTrue("ContractReferencePublisher", publishers.get(1).getPublisher() instanceof ContractReferencePublisher);
        assertEquals("D4", publishers.get(2).getCategory() + publishers.get(2).getServiceName());
        assertTrue(publishers.get(2).getContractPublisher() instanceof MockContractPublisher);
       
        assertEquals("Service count", 2, ServicePublisher.getServices().size());
       
        assertEquals("A1", 0, ServicePublisher.getServicePublishers(new Service("A", "1")).size()) ;
        assertEquals("B2", 0, ServicePublisher.getServicePublishers(new Service("B", "2")).size()) ;
        assertEquals("C3", 2, ServicePublisher.getServicePublishers(new Service("C", "3")).size()) ;
        assertEquals("D4", 1, ServicePublisher.getServicePublishers(new Service("D", "4")).size()) ;
       
        ServicePublisher.removeServicePublishers(controller2) ;
    }
View Full Code Here

            //empty out the DLQ
            Map<URI, Message> messageMap = ms.getAllMessages(MessageStore.CLASSIFICATION_RDLVR);
            for (URI key : messageMap.keySet()) {
                ms.removeMessage(key, MessageStore.CLASSIFICATION_RDLVR);
            }
            Service noneExistingService = new Service("none-exising-category", "none-existing-service-name");
            ServiceInvoker si = new ServiceInvoker(noneExistingService);
            si.deliverAsync(message);
          
            //Adding this control code to show where the message now is.
            Map<URI, Message> rdlvrMessageMap = ms.getAllMessages(MessageStore.CLASSIFICATION_RDLVR);
View Full Code Here

            //empty out the DLQ
            Map<URI, Message> messageMap = ms.getAllMessages(MessageStore.CLASSIFICATION_DLQ);
            for (URI key : messageMap.keySet()) {
                ms.removeMessage(key, MessageStore.CLASSIFICATION_DLQ);
            }
            Service noneExistingService = new Service("none-exising-category", "none-existing-service-name");
            ServiceInvoker si = new ServiceInvoker(noneExistingService);
            si.deliverSync(message, 1000);
        } catch (MessageStoreException mse) {
            throw new ActionProcessingException(mse.getMessage(), mse);
        } catch (MessageDeliverException mde) {
View Full Code Here

        if(targetTokens.length != 2) {
            throw new ConfigurationException("Action not configured properly - 'target' service property must be in format 'category:name'.");
        }

        targetService = new Service(targetTokens[0], targetTokens[1]);
    }
View Full Code Here

           
            if (message!=null && delete(uuid, RedeliverStore.CLASSIFICATION_RDLVR, con)==1) {
                //now any good db should have set a read lock on this record, until we commit.
                //if exception is thrown up the delivery count on the message
                //if exceeds the maxcount then update the classification to DLQ.
                Service to = (Service) message.getProperties().getProperty(ServiceInvoker.DELIVER_TO);
                try {
                    ServiceInvoker si = new ServiceInvoker(to.getCategory(), to.getName());
                    message.getProperties().setProperty(RedeliverStore.IS_REDELIVERY, true);
                    si.deliverAsync(message);
                    isDelivered=true;
                } catch (MessageDeliverException e) {
                    logger.debug(e.getMessage(), e);
View Full Code Here

    addService(def, serviceInfo, binding);
    StringWriter sw = new java.io.StringWriter();
    try {
      getWSDLFactory().newWSDLWriter().writeWSDL(def, sw);
    } catch (WSDLException e) {
      final Service service = serviceConfig.getService() ;
      throw new ConfigurationException("Failed to generate wsdl for service:" + service.getCategory() + "/" + service.getName() , e);
    }
    return sw.toString();
  }
View Full Code Here

  private final String responseLocation ;
  private final boolean addressing ;
 
  public ESBServiceEndpointInfo(final WebserviceInfo webserviceInfo)
      throws UnsupportedEncodingException {
    final Service service = webserviceInfo.getService() ;
    final String name = service.getName() ;
    requestName = name + "Req" ;
    responseName = name + "Res" ;
    faultName = name + "Fault" ;
    bindingName = name + "Binding" ;
    serviceName = name + "Service" ;
    portName = name + "PortType" ;
    operationName = name + "Op" ;
    final String serviceCategory = service.getCategory().replace('/', '_') ;
    final String serviceName = service.getName().replace('/', '_') ;
    servletName = serviceCategory + "_" + serviceName ;
    servletPath = "/" + serviceCategory + "/" + serviceName ;
    wsdlFileName = "WEB-INF/wsdl/" + serviceCategory + "/" + serviceName + ".wsdl" ;
    packageName = "esb.ws." + serviceCategory + "." + serviceName ;
    className = packageName + ".Implementation" ;
    namespace = "http://soa.jboss.org/" + URLEncoder.encode(service.getCategory(), DEFAULT_ENCODING) ;
    requestAction = namespace + "/" + operationName ;
    responseAction = requestAction + "Resp" ;
   
    isOneWay = (webserviceInfo.getOutXsd() == null) ;
    if (isOneWay)
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.Service

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.