use of org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData in project wildfly by wildfly.
the class XTSHandlerDeploymentProcessor method updateXTSEndpoint.
private boolean updateXTSEndpoint(final String endpoint, final EndpointMetaData endpointMetaData, final List<WebserviceDescriptionMetaData> webserviceDescriptions, final DeploymentUnit unit) {
if (endpointMetaData.isWebservice()) {
final List<String> handlers = new ArrayList<String>();
if (endpointMetaData.isBridgeEnabled()) {
handlers.add(TX_BRIDGE_HANDLER);
}
handlers.add(TX_CONTEXT_HANDLER);
if (!isAnyOfHandlersRegistered(unit, endpoint, handlers)) {
final UnifiedHandlerChainsMetaData unifiedHandlerChainsMetaData = buildHandlerChains(handlers);
final QName portQname = endpointMetaData.getWebServiceAnnotation().buildPortQName();
webserviceDescriptions.add(new WebserviceDescriptionMetaData(null, null, null, buildPortComponent(endpointMetaData.isEJB(), endpoint, portQname, unifiedHandlerChainsMetaData)));
registerHandlersWithAS(unit, endpoint, handlers);
return true;
}
}
return false;
}
use of org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData 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