Package org.jboss.wsf.spi.metadata.jms

Examples of org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData


    */
   @Override
   protected void build(final Deployment dep, final DeploymentUnit unit)
   {
      this.getAndPropagateAttachment(JMSEndpointsMetaData.class, unit, dep);
      JMSEndpointsMetaData jmsEndpointsMD = dep.getAttachment(JMSEndpointsMetaData.class);
      for (JMSEndpointMetaData endpoint : jmsEndpointsMD.getEndpointsMetaData())
      {
         if (endpoint.getName() == null)
         {
            endpoint.setName(endpoint.getImplementor());
         }
View Full Code Here


                annotations.add(webServiceAnnotation);
            }
        }

        //extract SOAP-over-JMS 1.0 bindings
        final JMSEndpointsMetaData endpointsMetaData = new JMSEndpointsMetaData();
        if (!map.isEmpty()) {

            for (String wsdlLocation : map.keySet()) {
                try {
                    final ResourceRoot resourceRoot = getWsdlResourceRoot(unit, wsdlLocation);
                    if (resourceRoot == null) continue;
                    final UnifiedVirtualFile uvf = new VirtualFileAdaptor(resourceRoot.getRoot());
                    URL url = uvf.findChild(wsdlLocation).toURL();
                    SOAPAddressWSDLParser parser = new SOAPAddressWSDLParser(url);
                    for (AnnotationInstance ai : map.get(wsdlLocation)) {
                        String port = ai.value(PORT_NAME).asString();
                        String service = ai.value(SERVICE_NAME).asString();
                        AnnotationValue targetNS = ai.value(TARGET_NAMESPACE);
                        String tns = targetNS != null ? targetNS.asString() : null;
                        QName serviceName = new QName(tns, service);
                        QName portName = new QName(tns, port);
                        String soapAddress = parser.filterSoapAddress(serviceName, portName, SOAPAddressWSDLParser.SOAP_OVER_JMS_NS);
                        if (soapAddress != null) {
                            ClassInfo webServiceClassInfo = (ClassInfo) ai.target();
                            String beanClassName = webServiceClassInfo.name().toString();
                            //service name ?
                            JMSEndpointMetaData endpointMetaData = new JMSEndpointMetaData(endpointsMetaData);
                            endpointMetaData.setEndpointName(port);
                            endpointMetaData.setName(beanClassName);
                            endpointMetaData.setImplementor(beanClassName);
                            //endpointMetaData.setName(name);
                            endpointMetaData.setSoapAddress(soapAddress);
                            endpointMetaData.setWsdlLocation(wsdlLocation);
                            endpointsMetaData.addEndpointMetaData(endpointMetaData);
                        }
                    }
                } catch (Exception ignore) {
                    ROOT_LOGGER.cannotReadWsdl(wsdlLocation);
                }
View Full Code Here

        throw new IllegalStateException();
    }

    private static boolean isJmsEndpoint(final DeploymentUnit unit, final ClassInfo classInfo) {
        final String endpointClassName = classInfo.name().toString();
        final JMSEndpointsMetaData jmsEndpointsMD = getRequiredAttachment(unit, JMS_ENDPOINT_METADATA_KEY);
        for (final JMSEndpointMetaData endpoint : jmsEndpointsMD.getEndpointsMetaData()) {
            if (endpointClassName.equals(endpoint.getImplementor())) return true;
        }
        return false;
    }
View Full Code Here

    }

    @Override
    protected void build(final Deployment dep, final DeploymentUnit unit) {
        // propagate
        final JMSEndpointsMetaData jmsEndpointsMD = getOptionalAttachment(unit, JMS_ENDPOINT_METADATA_KEY);
        dep.addAttachment(JMSEndpointsMetaData.class, jmsEndpointsMD);

        ROOT_LOGGER.creatingEndpointsMetaDataModel("JAXWS", "JMS");
        for (final JMSEndpointMetaData jmsEndpoint : jmsEndpointsMD.getEndpointsMetaData()) {
            final String jmsEndpointName = jmsEndpoint.getName();
            ROOT_LOGGER.jmsName(jmsEndpointName);
            final String jmsEndpointClassName = jmsEndpoint.getImplementor();
            ROOT_LOGGER.jmsClass(jmsEndpointClassName);
            final String jmsEndpointAddress = jmsEndpoint.getSoapAddress();
View Full Code Here

    private static boolean isJaxrpcEjbDeployment(final DeploymentUnit unit) {
        return getJaxrpcEjbs(unit).size() > 0;
    }

    private static boolean isJaxwsJmsDeployment(final DeploymentUnit unit) {
        final JMSEndpointsMetaData jmsEndpointsMD = getOptionalAttachment(unit, JMS_ENDPOINT_METADATA_KEY);
        if (jmsEndpointsMD != null) {
            return jmsEndpointsMD.getEndpointsMetaData().size() > 0;
        }
        return false;
    }
View Full Code Here

    }

    @Override
    protected void build(final Deployment dep, final DeploymentUnit unit) {
        // propagate
        final JMSEndpointsMetaData jmsEndpointsMD = getOptionalAttachment(unit, JMS_ENDPOINT_METADATA_KEY);
        dep.addAttachment(JMSEndpointsMetaData.class, jmsEndpointsMD);

        WSLogger.ROOT_LOGGER.trace("Creating JAXWS JMS endpoints meta data model");
        for (final JMSEndpointMetaData jmsEndpoint : jmsEndpointsMD.getEndpointsMetaData()) {
            final String jmsEndpointName = jmsEndpoint.getName();
            WSLogger.ROOT_LOGGER.tracef("JMS name: %s", jmsEndpointName);
            final String jmsEndpointClassName = jmsEndpoint.getImplementor();
            WSLogger.ROOT_LOGGER.tracef("JMS class: %s", jmsEndpointClassName);
            final String jmsEndpointAddress = jmsEndpoint.getSoapAddress();
View Full Code Here

    private static boolean isJaxwsEjbDeployment(final DeploymentUnit unit) {
        return getJaxwsEjbs(unit).size() > 0;
    }

    private static boolean isJaxwsJmsDeployment(final DeploymentUnit unit) {
        final JMSEndpointsMetaData jmsEndpointsMD = getOptionalAttachment(unit, JMS_ENDPOINT_METADATA_KEY);
        if (jmsEndpointsMD != null) {
            return jmsEndpointsMD.getEndpointsMetaData().size() > 0;
        }
        return false;
    }
View Full Code Here

        throw new IllegalStateException();
    }

    private static boolean isJmsEndpoint(final DeploymentUnit unit, final ClassInfo classInfo) {
        final String endpointClassName = classInfo.name().toString();
        final JMSEndpointsMetaData jmsEndpointsMD = getRequiredAttachment(unit, JMS_ENDPOINT_METADATA_KEY);
        for (final JMSEndpointMetaData endpoint : jmsEndpointsMD.getEndpointsMetaData()) {
            if (endpointClassName.equals(endpoint.getImplementor())) {
                return true;
            }
        }
        return false;
View Full Code Here

                    WSLogger.ROOT_LOGGER.cannotReadWsdl(wsdlLocation);
                }
            }

        }
        unit.putAttachment(JMS_ENDPOINT_METADATA_KEY, new JMSEndpointsMetaData(list));
    }
View Full Code Here

     * @param dep webservice deployment
     * @param unit deployment unit
     */
    @Override
    protected void build(final Deployment dep, final DeploymentUnit unit) {
        final JMSEndpointsMetaData jmsEndpointsMD = ASHelper.getRequiredAttachment(unit, WSAttachmentKeys.JMS_ENDPOINT_METADATA_KEY);
        dep.addAttachment(JMSEndpointsMetaData.class, jmsEndpointsMD);
        for (JMSEndpointMetaData endpoint : jmsEndpointsMD.getEndpointsMetaData()) {
            if (endpoint.getName() == null) {
                endpoint.setName(endpoint.getImplementor());
            }
            this.newJMSEndpoint(endpoint.getImplementor(), endpoint.getName(), dep);
        }
View Full Code Here

TOP

Related Classes of org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData

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.