Search in sources :

Example 1 with JBossWebserviceDescriptionMetaData

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);
}
Also used : PublishLocationAdapter(org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter) JBossWebserviceDescriptionMetaData(org.jboss.wsf.spi.metadata.webservices.JBossWebserviceDescriptionMetaData) JBossWebservicesMetaData(org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData)

Aggregations

PublishLocationAdapter (org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter)1 JBossWebserviceDescriptionMetaData (org.jboss.wsf.spi.metadata.webservices.JBossWebserviceDescriptionMetaData)1 JBossWebservicesMetaData (org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData)1