use of org.jboss.wsf.spi.metadata.webservices.JBossWebserviceDescriptionMetaData in project wildfly by wildfly.
the class AbstractMetaDataBuilderEJB method buildWebservicesMetaData.
/**
* Builds webservices meta data. This methods sets:
* <ul>
* <li>context root</li>
* <li>wsdl location resolver</li>
* <li>config name</li>
* <li>config file</li>
* </ul>
*
* @param dep webservice deployment
* @param ejbArchiveMD universal EJB meta data model
*/
private void buildWebservicesMetaData(final Deployment dep, final EJBArchiveMetaData.Builder ejbArchiveMDBuilder) {
final JBossWebservicesMetaData webservicesMD = WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);
if (webservicesMD == null)
return;
// set context root
final String contextRoot = webservicesMD.getContextRoot();
ejbArchiveMDBuilder.setWebServiceContextRoot(contextRoot);
WSLogger.ROOT_LOGGER.tracef("Setting context root: %s", contextRoot);
// set config name
final String configName = webservicesMD.getConfigName();
ejbArchiveMDBuilder.setConfigName(configName);
WSLogger.ROOT_LOGGER.tracef("Setting config name: %s", configName);
// set config file
final String configFile = webservicesMD.getConfigFile();
ejbArchiveMDBuilder.setConfigFile(configFile);
WSLogger.ROOT_LOGGER.tracef("Setting config file: %s", configFile);
// set wsdl location resolver
final JBossWebserviceDescriptionMetaData[] wsDescriptionsMD = webservicesMD.getWebserviceDescriptions();
final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(wsDescriptionsMD);
ejbArchiveMDBuilder.setPublishLocationAdapter(resolver);
}
Aggregations