use of org.jboss.as.webservices.publish.WSEndpointDeploymentUnit in project wildfly by wildfly.
the class ModelDeploymentAspect method start.
@Override
public void start(final Deployment dep) {
final DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
if (unit instanceof WSEndpointDeploymentUnit)
return;
final DeploymentResourceSupport deploymentResourceSupport = unit.getAttachment(Attachments.DEPLOYMENT_RESOURCE_SUPPORT);
for (final Endpoint endpoint : dep.getService().getEndpoints()) {
final ModelNode endpointModel;
try {
endpointModel = deploymentResourceSupport.getDeploymentSubModel(WSExtension.SUBSYSTEM_NAME, PathElement.pathElement(ENDPOINT, URLEncoder.encode(getId(endpoint), "UTF-8")));
} catch (final UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
endpointModel.get(ENDPOINT_NAME).set(getName(endpoint));
endpointModel.get(ENDPOINT_CONTEXT).set(getContext(endpoint));
endpointModel.get(ENDPOINT_CLASS).set(endpoint.getTargetBeanName());
endpointModel.get(ENDPOINT_TYPE).set(endpoint.getType().toString());
endpointModel.get(ENDPOINT_WSDL).set(endpoint.getAddress() + "?wsdl");
}
}
Aggregations