webservices/server-integration/src/main/java/org/jboss/as/webservices/util/WebMetaDataHelper.java
public static JBossServletsMetaData getServlets(final JBossWebMetaData jbossWebMD) {
        JBossServletsMetaData servletsMD = jbossWebMD.getServlets();

        if (servletsMD == null) {
            servletsMD = new JBossServletsMetaData();
            jbossWebMD.setServlets(servletsMD);
        }

        return servletsMD;
    }
public static JBossServletsMetaData getServlets(final JBossWebMetaData jbossWebMD) {
        JBossServletsMetaData servletsMD = jbossWebMD.getServlets();

        if (servletsMD == null) {
            servletsMD = new JBossServletsMetaData();
            jbossWebMD.setServlets(servletsMD);
        }

        return servletsMD;
    }
Gets servlets meta data from jboss web meta data. If not found it creates new servlets meta data and associates them
with jboss web meta data.

@param jbossWebMD jboss web meta data
@return servlets meta data