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();
}
}
}
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);
}
}
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));
}
}
Aggregations