Search in sources :

Example 1 with WebservicesMetaData

use of org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData in project wildfly by wildfly.

the class WebservicesDescriptorDeploymentProcessor method deploy.

public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit unit = phaseContext.getDeploymentUnit();
    final ResourceRoot deploymentRoot = unit.getAttachment(Attachments.DEPLOYMENT_ROOT);
    final URL webservicesDescriptorURL = getWebServicesDescriptorURL(deploymentRoot);
    if (webservicesDescriptorURL != null) {
        final WebservicesPropertyReplaceFactory webservicesFactory = new WebservicesPropertyReplaceFactory(webservicesDescriptorURL, JBossDescriptorPropertyReplacement.propertyReplacer(unit));
        final WebservicesMetaData webservicesMD = webservicesFactory.load(webservicesDescriptorURL);
        unit.putAttachment(WSAttachmentKeys.WEBSERVICES_METADATA_KEY, webservicesMD);
        if (hasJaxRpcMapping(webservicesMD)) {
            throw WSLogger.ROOT_LOGGER.jaxRpcNotSupported();
        }
    }
}
Also used : ResourceRoot(org.jboss.as.server.deployment.module.ResourceRoot) WebservicesPropertyReplaceFactory(org.jboss.as.webservices.metadata.WebservicesPropertyReplaceFactory) WebservicesMetaData(org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData) DeploymentUnit(org.jboss.as.server.deployment.DeploymentUnit) URL(java.net.URL)

Example 2 with WebservicesMetaData

use of org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData in project wildfly by wildfly.

the class AbstractDeploymentModelBuilder method propagateAttachments.

private void propagateAttachments(final DeploymentUnit unit, final ArchiveDeployment dep) {
    dep.addAttachment(DeploymentUnit.class, unit);
    unit.putAttachment(DEPLOYMENT_KEY, dep);
    final JBossWebMetaData webMD = getJBossWebMetaData(unit);
    dep.addAttachment(JBossWebMetaData.class, webMD);
    final WebservicesMetaData webservicesMD = getOptionalAttachment(unit, WEBSERVICES_METADATA_KEY);
    dep.addAttachment(WebservicesMetaData.class, webservicesMD);
    JBossWebservicesMetaData jbossWebservicesMD = getOptionalAttachment(unit, JBOSS_WEBSERVICES_METADATA_KEY);
    if (unit.getParent() != null) {
        jbossWebservicesMD = JBossWebservicesMetaData.merge(getOptionalAttachment(unit.getParent(), JBOSS_WEBSERVICES_METADATA_KEY), jbossWebservicesMD);
    }
    dep.addAttachment(JBossWebservicesMetaData.class, jbossWebservicesMD);
    final JAXWSDeployment jaxwsDeployment = getOptionalAttachment(unit, JAXWS_ENDPOINTS_KEY);
    dep.addAttachment(JAXWSDeployment.class, jaxwsDeployment);
    final EjbJarMetaData ejbJarMD = getOptionalAttachment(unit, EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
    dep.addAttachment(EjbJarMetaData.class, ejbJarMD);
    final RejectionRule rr = getOptionalAttachment(unit, REJECTION_RULE_KEY);
    if (rr != null) {
        dep.addAttachment(RejectionRule.class, rr);
    }
}
Also used : JBossWebMetaData(org.jboss.metadata.web.jboss.JBossWebMetaData) ASHelper.getJBossWebMetaData(org.jboss.as.webservices.util.ASHelper.getJBossWebMetaData) RejectionRule(org.jboss.wsf.spi.invocation.RejectionRule) EjbJarMetaData(org.jboss.metadata.ejb.spec.EjbJarMetaData) JBossWebservicesMetaData(org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData) JBossWebservicesMetaData(org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData) WebservicesMetaData(org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData) JAXWSDeployment(org.jboss.as.webservices.metadata.model.JAXWSDeployment)

Example 3 with WebservicesMetaData

use of org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData in project wildfly by wildfly.

the class XTSHandlerDeploymentProcessor method deploy.

public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit unit = phaseContext.getDeploymentUnit();
    final List<WebserviceDescriptionMetaData> webserviceDescriptions = new ArrayList<WebserviceDescriptionMetaData>();
    boolean modifiedWSMeta = false;
    for (String endpoint : getDeploymentClasses(unit)) {
        try {
            final EndpointMetaData endpointMetaData = EndpointMetaData.build(unit, endpoint);
            if (endpointMetaData.isXTSEnabled()) {
                XTSDeploymentMarker.mark(unit);
                final boolean result = updateXTSEndpoint(endpoint, endpointMetaData, webserviceDescriptions, unit);
                modifiedWSMeta = modifiedWSMeta || result;
            }
        } catch (XTSException e) {
            throw new DeploymentUnitProcessingException("Error processing endpoint '" + endpoint + "'", e);
        }
    }
    if (modifiedWSMeta) {
        unit.putAttachment(WSAttachmentKeys.WEBSERVICES_METADATA_KEY, new WebservicesMetaData(null, webserviceDescriptions));
    }
}
Also used : WebserviceDescriptionMetaData(org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData) DeploymentUnitProcessingException(org.jboss.as.server.deployment.DeploymentUnitProcessingException) ArrayList(java.util.ArrayList) EndpointMetaData(org.jboss.as.xts.jandex.EndpointMetaData) WebservicesMetaData(org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData) DeploymentUnit(org.jboss.as.server.deployment.DeploymentUnit)

Aggregations

WebservicesMetaData (org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData)3 DeploymentUnit (org.jboss.as.server.deployment.DeploymentUnit)2 URL (java.net.URL)1 ArrayList (java.util.ArrayList)1 DeploymentUnitProcessingException (org.jboss.as.server.deployment.DeploymentUnitProcessingException)1 ResourceRoot (org.jboss.as.server.deployment.module.ResourceRoot)1 WebservicesPropertyReplaceFactory (org.jboss.as.webservices.metadata.WebservicesPropertyReplaceFactory)1 JAXWSDeployment (org.jboss.as.webservices.metadata.model.JAXWSDeployment)1 ASHelper.getJBossWebMetaData (org.jboss.as.webservices.util.ASHelper.getJBossWebMetaData)1 EndpointMetaData (org.jboss.as.xts.jandex.EndpointMetaData)1 EjbJarMetaData (org.jboss.metadata.ejb.spec.EjbJarMetaData)1 JBossWebMetaData (org.jboss.metadata.web.jboss.JBossWebMetaData)1 RejectionRule (org.jboss.wsf.spi.invocation.RejectionRule)1 JBossWebservicesMetaData (org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData)1 WebserviceDescriptionMetaData (org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData)1